<TimeSeries>
Category: Object tag
The TimeSeries tag can be used to label time series data. Read more about Time Series Labeling in the templates gallery.
Note: The time axis in your data must be sorted, otherwise the TimeSeries tag does not work.
To use autogenerated indices as time axes, don't use the timeColumn parameter.
Use with the following data types: time series.
Attributes
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | yes | — | Name of the element |
| value | string | yes | — | Key used to look up the data, either URLs for your time-series if valueType=url, otherwise expects JSON |
| valueType | url,json | no | url | Format of time series data provided. If set to "url" then Label Studio loads value references inside value key, otherwise it expects JSON. |
| sync | string | no | — | Object name to sync with. |
| cursorColor | string | no | — | Color of the playback cursors used in sync (hex or any SVG-compatible color string) |
| timeColumn | string | no | — | Column name or index that provides temporal values. If your time series data has no temporal column then one is automatically generated. |
| timeFormat | string | no | — | Pattern used to parse values inside timeColumn, parsing is provided by d3, and follows strftime implementation |
| timeDisplayFormat | string | no | — | Format used to display temporal value. Can be a number or a date. If a temporal column is a date, use strftime to format it. If it's a number, use d3 number formatting. |
| durationDisplayFormat | string | no | — | Format used to display temporal duration value for brush range. If the temporal column is a date, use strftime to format it. If it's a number, use d3 number formatting. |
| sep | string | no | , | Separator for your CSV file. |
| overviewChannels | string | no | — | Comma-separated list of channel names or indexes displayed in overview. |
| overviewWidth | string | no | 25% | Default width of overview window in percents |
| fixedScale | true,false | no | false | Whether to scale y-axis to the maximum to fit all the values. If false, current view scales to fit only the displayed values. |
Examples
Example 1
Labeling configuration for time series data stored in a CSV loaded from a URL containing 3 columns: time, sensor1, and sensor2. The time column stores time as a number.
<View>
<TimeSeries name="device" value="$timeseries" valueType="url" timeColumn="time">
<Channel column="sensor1" />
<Channel column="sensor2" />
</TimeSeries>
<TimeSeriesLabels name="label" toName="device">
<Label value="Run" background="#5b5"/>
<Label value="Walk" background="#55f"/>
</TimeSeriesLabels>
</View>
Example 2
Labeling configuration for time series data stored in the task field ts in Label Studio JSON format. The time field is stored as a date in the timeformat field and formatted as a full date on the plot (by default).
<View>
<TimeSeries name="device" value="$ts" timeColumn="time" timeFormat="%m/%d/%Y %H:%M:%S">
<Channel column="sensor1" />
<Channel column="sensor2" />
</TimeSeries>
</View>
MultiChannel
The MultiChannel tag is used to group multiple channels together in a time series visualization. Use this tag within a TimeSeries tag to organize and display multiple data channels in a single view.
Labeling configuration for time series data with multiple channels grouped together:
<View>
<TimeSeries name="ts" value="$timeseries"
valuetype="url"
timeColumn="time"
timeFormat="%Y-%m-%d %H:%M:%S.%f"
>
<MultiChannel>
<Channel column="velocity" />
<Channel column="acceleration" />
</MultiChannel>
</TimeSeries>
<TimeSeriesLabels name="label" toName="ts">
<Label value="Run" background="red"/>
<Label value="Walk" background="green"/>
</TimeSeriesLabels>
</View>
<!-- {
"timeseries": "https://app.heartex.ai/samples/time-series.csv?time=time&values=velocity%2Cacceleration&tf=%25Y-%25m-%25d+%25H%3A%25M%3A%25S.%25f&type=csv"
} -->