Create a Stacked Bar Chart
Create a stacked bar chart to display timeline data.
Click on Chart and drag onto your code/output window.
Double click your new chart button to open the button inspector. Under the Chart Type dropdown menu, select Stacked Bar. Give the chart a name & button ID.
By default, the button name will display below the chart.
Navigate to the Script tab of the inspector.
Tip: To quickly see all of the available script options for charts, type 'ch' then press ESC. You will see the list of possible script syntax as shown below. We'll go ahead and walk through an example in this tutorial.
Note in the image above that you can display colors by replacing the RGB % color values in the script with other options, such as a button ID or button name.
The following example shows instances for rows "Earth", "Wind" & "Fire"
$var1 = instances where row = "Earth" - (repeat for other variables)
chart (count $var1, "Earth", color (100,0,0), $var1) - (repeat for other variables)
In the above script -chart (count $var1, "Earth", color (100,0,0), $var1);
Chart - Defines that we want to display data as a selected chart style.
count $var1 - Defines the data to chart.
"Earth" - Defines the data point names.
color (100,0,0) - Defines what color this section should be from the RGB scale.
$var1 - This final variable links the desired video to the data section of the chart.
You can now adjust how your chart data is displayed by selecting the second tab on the inspector, Display Labels.
As shown in the image below, this tab allows you to adjust the following:
- Axis Names
- Value Data Format
- Axis Options
Once you have made adjustments to the style of your chart, and you are in either code mode or report mode, the chart will update from the timeline live.
You can also click on any section to view video of tagged instances (provided you added this script as detailed above).