In this article
Define chart type outside or within series to display multiple series in a chart. Different charts for different series are possible using this method.
To display multiple series in a chart, you can define the chart type outside of the series, which applies it to all series. Alternatively, you can apply a different chart type to each series by defining the chart type within the series.
Line chart with two series Example of a Line chart with two series View CDL widget chart#linechart5 { label: "Line chart with two series" size: halfwidth legend: bottomCenter palette: "#0000FF", "#82D854","#FFBD5B", "#FA5263" chart line { lineType: linear } series { label: "LTR" value: average(score(relationship:recommend.1)) format: formatterMetric } series { label: "OSAT" value: average(score(relationship:OSAT.1)) format: formatterMetric } category date { value: relationship:interview_start breakdownBy: calendarQuarter format: dateFormat } } | Clustering with Multiple Series Example of a chart using clustering with multiple series View CDL widget chart#copy_of_linechart5 { label: "Clustering with multiple series" size: halfwidth legend: bottomCenter palette: "#0000FF", "#82D854","#FFBD5B", "#FA5263" chart bar { } series { label: "LTR" value: average(score(relationship:recommend.1)) format: formatterMetric chart bar #barChart { mode: "clustered" } } series { label: "OSAT" value: average(score(relationship:OSAT.1)) format: formatterMetric } category date { value: relationship:interview_start breakdownBy: calendarQuarter format: dateFormat } axis category#categoryAxis { } axis primary #primaryAxis { } axis secondary #secondaryAxis { hide: true } } | Different charts for different series) Using different charts for different series View CDL widget chart#linechart6 { label: "Different charts for different series" size: halfwidth legend: bottomCenter palette: "#82D854","#FFBD5B", "#FA5263" chart line { lineType: linear } series { label: "OSAT" value: average(score(relationship:OSAT.1)) format: formatterMetric } series { label: "LTR" value: average(score(relationship:recommend.1)) format: formatterMetric chart bar { } } category date { value: relationship:interview_start breakdownBy: calendarQuarter format: dateFormat } axis category #categoryAxis { } axis primary #primaryAxis { } axis secondary #secondaryAxis { hide: true } } |