VividCharts
Search…
Option

Using Option

The VividChart object can have any field associated with its chart type set by using the options method. The VividChart object will then use the value provided when it queries the table. Options is overloaded and can accept 3 different types of input.
Tips: Using options will override any fields provided by the chart object.

Using option to assign a field using a field name and value

Options can accept a string containing the chart field name to be used followed by a value representing the value to assign to the field.
Using options with a field name and value:
1
var vividChart = new VividChart(chart);
2
vividChart.setType('donut matrix');
3
vividChart.option('record_limit', 10);
Copied!

Using option with a JavaScript object

Options can accept a JavaScript object which contains key/value pairs corresponding to chart fields and the values to use. This can accept more than one field option.
Using options with a JavaScript object.
1
var vividChart = new VividChart(chart);
2
vividChart.setType('donut');
3
vividChart.option({
4
'record_limit': 10,
5
'table': 'incident',
6
'group_by': 'priority'});
Copied!

Using option with JSON

Options can accept JSON which contains key/value pairs corresponding to chart field and the values to use. This can accept more than one field option.
Using options with JSON:
1
var vividChart = new VividChart();
2
vividChart.setType('arc score');
3
vividChart.option('{"table":"task", "conditions":"priority=1"}');
Copied!
Last modified 1yr ago