Charts
DashboardContent has sections and cards, which organize charts. Each chart has a title, colors (optional), a type, a dataset and options (optional).
A Bars chart
A Pie chart with legend
Here is the JSON representation of a chart.
1
{
2
"title": "Device form factors", // Could be an empty string
3
"type": "Bars", // Bars || Pie || Metric || Radar
4
"dataset": { // See Datasets and datasources page
5
"type": "OTQL",
6
"query_id": "50171"
7
},
8
"options": {} // Options depending on the type of chart
9
}
Copied!

Bars charts

Here are the different states of a Bars chart depending on its options and the dataset
Columns and bars charts
The available options for the bars chart are
1
"options": {
2
"legend": {
3
enabled: boolean; # Show or hide the legend. Defaults to FALSE.
4
position: ‘bottom’ | ‘right’; # Display legend on the bottom or on the right of the chart. Defaults to bottom
5
},
6
"colors": string[]; # Defaults to current theme colors
7
"format": ‘count’ | ‘percentage’ | ‘index’; # Defaults to count. Pass percentage or index if dataset is compatible (comes from a percentage or index transformation) to automatically change labels, and tooltips and have more info.
8
"drilldown": boolean; # Enables drill down if dataset is compatible. Defaults to FALSE
9
"stacking": boolean; # Enables stacking if dataset is compatible. Prioritized over drilldown. Defaults to FALSE
10
"type": ‘bar’ || ‘column’; # Set to ‘bar’ to display horizontal bars instead of columns. Defaults to ‘column’
11
"plot_line_value": int; # Set to draw a line at the specified value
12
"hide_x_axis": boolean; # TRUE to hide X axis. Defaults to FALSE
13
"hide_y_axis": boolean; # TRUE to hide Y axis. Defaults to FALSE
14
"tooltip": {format: string} # Highcharts tooltip pointFormat. Defaults to “{point.y}” if dataset don’t have a -count field,{point.y}% ({point.count})” otherwise.
15
"big_bars": boolean; # TRUE displays large bars close to each other, FALSE smaller bars with more space between them. Defaults to TRUE
16
}
Copied!
See Hicharts.filter for the data_labels.filter format.

Area charts

Here are the different states of an Area chart depending on its options and the dataset
Area and line charts
The available options for the area chart are
1
"options": {
2
"legend": {
3
enabled: boolean; # Show or hide the legend. Defaults to FALSE.
4
position: ‘bottom’ | ‘right’; # Display legend on the bottom or on the right of the chart. Defaults to bottom
5
},
6
"colors": string[]; # Defaults to current theme colors
7
"format": ‘count’ | ‘percentage’; # Defaults to count. Pass percentage if dataset is compatible (comes from a percentage transformation) to automatically change labels, and tooltips and have more info.
8
"type": ‘area’ || ‘line’; # Set to ‘line’ to only display lines and no area. Defaults to ‘area’
9
"plot_line_value": int; # Set to draw a line at the specified value
10
"hide_x_axis": boolean; # TRUE to hide X axis. Defaults to FALSE
11
"hide_y_axis": boolean; # TRUE to hide Y axis. Defaults to FALSE
12
"double_y_axis": boolean; # TRUE for each serie to have its own scale (and shows 2 vertical axis). Defaults to FALSE
13
"tooltip": {format: string} # Highcharts tooltip pointFormat. Defaults to “{point.y}” if dataset don’t have a -count field,{point.y}% ({point.count})” otherwise.
14
}
Copied!
See Hicharts.filter for the data_labels.filter format.

Pie charts

Here are the different states of the Pie charts depending on its options and the dataset
The available options for the pie charts are
1
"options": {
2
"legend": {
3
"enabled": boolean; # Show or hide the legend. Defaults to FALSE.
4
"position": ‘bottom’ | ‘right’; # Display legend on the bottom or on the right of the chart. Defaults to bottom
5
},
6
"colors": string[]; # Defaults to current theme colors
7
"drilldown": boolean; # Enables drill down if dataset is compatible. Defaults to FALSE
8
"inner_radius": boolean; # True displays the chart as a Donut, false as a Pie. Defaults to TRUE
9
"is_half": boolean; # True to only display half of a donut or half of a pie. Defaults to FALSE.
10
"size": number | string | undefined; # The diameter of the pie relative to the plot area. Can be a percentage (75%) or a value.
11
"data_labels": {
12
"enabled": boolean; # If labels are displayed or not, default to TRUE
13
"distance": int; # Distance between labels and the figure. Defaults to 10 if isHalf:true, else 0
14
"format": string; # Labels text. See Labels and string format. Defaults to “{point.percentage:.2f}%” if legend.enable:false,{point.name} {point.percentage:.2f}%” otherwise.
15
"filter": Highcharts.filter; # To hide labels under certain values. Defaults to undefined.
16
};
17
"tooltip": {"format": string} # Highcharts tooltip pointFormat. Defaults to “{point.percentage:.2f}%” if legend.enable:false,{point.name} {point.percentage:.2f}%” otherwise.
18
}
Copied!
See Hicharts.filter for the data_labels.filter format.

Radar charts

Here are the different states of the Radar charts depending on its options and the dataset.
The available options for the Radar charts are
1
"options": {
2
"legend": {
3
"enabled": boolean; # Show or hide the legend. Defaults to FALSE.
4
"position": ‘bottom’ | ‘right’; # Display legend on the bottom or on the right of the chart. Defaults to bottom
5
},
6
"colors": string[]; # Defaults to current theme colors
7
"format": ‘count’ | ‘percentage’; # Defaults to count. Pass percentage if dataset is compatible to automatically change labels, and tooltips.
8
"data_labels": {
9
"enabled": boolean; # If labels are displayed or not, default to TRUE
10
"format": string; # Labels text. See Labels and string format. Defaults to “{point.y}” if dataset don’t have a -count field,{point.y}%” otherwise
11
"filter": Highcharts.filter; # To hide labels under certain values. Defaults to undefined.
12
};
13
"tooltip": {"format": string} # Highcharts tooltip pointFormat. Defaults to “{point.y}” if dataset don’t have a -count field,{point.y}% ({point.count})” otherwise.
14
}
Copied!
See Hicharts.filter for the data_labels.filter format.

Metric charts

Metric charts are either displayed as percentages or as count, depending on its options.
With percentage format
With count format
Here are the available options for the e charts
1
"options": {
2
"format": ‘count’ | ‘percentage’ | 'float'; # Defaults to count. If count, simply displays the number, else displays the number with %
3
}
Copied!