Skip to content

Time Range props

A Time Range component above clean dashboard tiles

PowerChart Ultra Time Range (same palette category) is the chart's time picker on its own, for the top of a dashboard: the same panel (quick ranges, From and To, the calendar, relative expressions), back and forward, zoom out and Live. Bind each chart's range prop to its value, and one picker moves every chart; bind queries to its start and end.

Prop Default Meaning
from, to now-8h, now The range, as in the time picker. Written back when the user picks one, or when a chart bound to it zooms or pans (see Synchronised charts); set them to move it.
timeZone "" IANA zone for the range. Empty: the browser's.
maxRangeDays 366 Longest range that can be picked.
quickRanges the 12 above The quick ranges, as on the chart (see Quick ranges).
refreshSeconds 10 While live: how often start and end are written again.
start, end, live, label Written by the component: the range in epoch ms, whether it follows the clock, and the range in words.
value Written by the component: all of the above together with its timeZone and source (its id, new each time it shows), for a chart's range. A chart bound to it works From and To out in that zone, so it reads the same hours as the picker and the queries bound to start and end, also when the chart shows another zone.

In the Designer the Time Range writes none of these (the Designer saves every prop a component holds with the view): a chart bound to it follows it in a session.

The sample project's /dashboard page shows it: one time range above four clean charts.

As the Designer gets them from the component's props schema.

Prop Type Default
from string "now-8h"
to string "now"
quickRanges array the 12 built-in quick ranges
timeZone string ""
maxRangeDays number 366
refreshSeconds number 10
start number
end number
live boolean
label string
value object {"from":"now-8h","to":"now"}

Copied from the section "Time Range component" of the README when the site is built; the types and defaults from common/src/main/resources/powerchartultra.timerange.props.json. Source: README.md.