API REFERENCE
series
Display multiple series together. Set a name, values, color, and display options for each series. Each series follows the data type of the selected chart.
Definition
| Item | Value |
|---|---|
| JavaScript property | series |
| HTML attribute | Pass objects, arrays, and callbacks as JavaScript properties |
| Type | LineChartSeries[] | ScatterChartSeries[] |
| Default | undefined |
undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.
- LineChartSeries
Type definition
- ScatterChartSeries
Type definition
Configuration example
// Register sy-line-chart and create the element before configuring it.
chart.series = [
{
"name": "Organic",
"color": "#8263d9",
"values": [
24,
29,
27,
38,
43,
40,
52,
58,
53,
68,
76,
84
]
},
{
"name": "Direct",
"color": "#239c91",
"values": [
15,
19,
17,
24,
22,
29,
32,
30,
39,
42,
40,
51
]
},
{
"name": "Referral",
"color": "#e99954",
"values": [
8,
11,
9,
15,
13,
19,
17,
23,
22,
28,
25,
33
]
}
];