Simple XML for timelines
Custom visualizations use a namespaced syntax for Simple XML. Specific visualization properties are appended to the app and visualization context.
Add a timeline to a dashboard panel
You can add a timeline to a dashboard panel using Simple XML. Use this syntax to specify the app and visualization context.
<viz type="timeline_app.timeline"> </viz>
Configure timeline properties
To configure a timeline property, add any of the following property names and a value to this syntax.
<option name= "timeline_app.timeline.[property_name]">[property_value] </option>
Option name | Accepted values | Default | Example |
---|---|---|---|
useColors | [ true | false] | true | <option name="timeline_app.timeline.useColors">false</option> |
colorMode | [ categorical | sequential] | categorical | <option name="timeline_app.timeline.colorMode = categorical</option> |
minColor | Any valid CSS color string. | #FFE8E8 | <option name="timeline_app.timeline.minColor">#6db7c6</option> |
maxColor | Any valid CSS color string. | #DA5C5C | <option name="timeline_app.timeline.maxColor">#d93f3c</option> |
numBins | Any number from 3-9. | 6 | <option name="timeline_app.timeline.numOfBins">3</option> |
axisTimeFormat | [ DAYS | MINUTES | SECONDS | SUBSECONDS ] | SECONDS | <option name="timeline_app.timeline.axisTimeFormat">MINUTES</option> |
tooltipTimeFormat | [ DAYS | MINUTES | SECONDS | SUBSECONDS ] | SECONDS | <option name="timeline_app.timeline.tooltipTimeFormat">MINUTES</option> |
Example Simple XML source
Here is an example dashboard panel.
<dashboard> <label>Timeline Dashboard example</label> <row> <panel> <title>My timeline example</title> <viz type="timeline_app.timeline"> <search> <query>| inputlookup outages.csv | where Year = 2006 | head 20 | rename "Date Event Began" AS start_date | rename "Date of Restoration" AS end_date | rename "Time Event Began" AS start_time | rename "Time of Restoration" AS end_time | eval _time = strptime(start_date." ".start_time, "%m/%d/%Y %H:%M %p") | eval end_time = strptime(end_date." ".end_time, "%m/%d/%Y %H:%M %p") | eval duration = (end_time - _time) * 1000 * (random()%5) | eval duration = IF(duration < 86400000, 0, duration) | stats count by _time, duration, "NERC Region", "Event Description" | table _time "NERC Region" duration</query> <earliest>0</earliest> <latest></latest> </search> <option name="timeline_app.timeline.useColors">true</option> <option name="timeline_app.timeline.colorMode">categorical</option> <option name="timeline_app.timeline.numOfBins">6</option> <option name="timeline_app.timeline.maxColor">#DA5C5C</option> <option name="timeline_app.timeline.minColor">#FFE8E8</option> <option name="timeline_app.timeline.axisTimeFormat">DAYS</option> <option name="timeline_app.timeline.tooltipTimeFormat">DAYS</option> </viz> </panel> </row> </dashboard>
Add a timeline visualization to a dashboard | Release notes |
This documentation applies to the following versions of Timeline (EOL): 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.6.1, 1.6.2
Feedback submitted, thanks!