- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Description
Renders a plot visualization insight that persists for the lifetime of an app.
Input Parameters
Name | Type | Required | Description |
---|---|---|---|
key | Text | Yes | Unique identifier for plot |
on | Boolean | Yes | Visibility toggle (true = show, false = hide) |
[category] | Text | No | Category to group plot within |
[lockerToken] | Text | No | Plot's locker token |
[data1] | Array | No | Plot's required 1st data series |
[data2] | Array | No | Plot's optional 2nd data series |
[data3] | Array | No | Plot's optional 3rd data series |
[data4] | Array | No | Plot's optional 4th data series |
[data5] | Array | No | Plot's optional 5th data series |
[data6] | Array | No | Plot's optional 6th data series |
[data7] | Array | No | Plot's optional 7th data series |
[data8] | Array | No | Plot's optional 8th data series |
[data9] | Array | No | Plot's optional 9th data series |
[data10] | Array | No | Plot's optional 10th data series |
Returns
No return value.
Examples
// 1 series plot example...
// prepare plot data
var series = [10, 25, -30, 50, -15];
// render plot with locker token 'AAA' to insights panel
ai.insights.plot("plot1", true, "Testing", "AAA", series);
// 3 series plot example...
// prepare plot data
var series1 = [10, 25, -30, 50, -15];
var series2 = [22, 54, 38.45, -18, -65];
var series3 = [32.64, 81, 104, -45.3, -12];
// render plot with token 'AAA' to insights panel
ai.insights.plot("plot1", true, "Testing", "AAA", series1, series2, series3);
// hide (remove) a plot from insights panel
ai.insights.plot("plot1", false);
Remarks
Plots are graphical visualizations of data prepared by your scripts. The configuration of each plot, along with any sample data, is developed using Symmetry Pro and stored in your app's locker.
When your script runs, this function will replace the sample data in your plot's configuration with the provided series data. Up to 10 data series are currently supported.