I'm using a date series in a line chart with week and month groupings. It is currently displaying each point as what appears to be an average of data for that time period. I need it to display as a sum.
Here is my initial chart code:
$("#overall-chart").kendoChart({
title: {
visible: false
},
dataSource: SPIData['trends']['dataUnfiltered'],
legend: {
visible: false
},
seriesDefaults: {
aggregate: "sum"
},
series: updateSeries,
valueAxes: valueAxes,
valueAxis: {
majorGridLines: {
visible: false
},
minorGridLines: {
visible: false
},
line: {
visible: false
}
},
categoryAxis: {
majorGridLines: {
visible: false
},
minorGridLines: {
visible: false
},
majorTicks: {
visible: false
},
minorTicks: {
visible: false
},
//baseUnit: "months"
baseUnit: bUnit
},
seriesClick: onSeriesClick,
});
I have it set to swap out the chart to different data elements in the array using a radio, here is the push for that
updateSeries.push({
name: checkedVals[i],
type: "line",
axis: "metric",
field: checkedVals[i],
categoryField: "date",
color: "#479ec2",
aggregate: "sum"
});
When I inspect in console I can see the options.series.aggregate is set to "sum", but it still does not show the summation on the chart. Is there something else I need to do?
Here is my initial chart code:
$("#overall-chart").kendoChart({
title: {
visible: false
},
dataSource: SPIData['trends']['dataUnfiltered'],
legend: {
visible: false
},
seriesDefaults: {
aggregate: "sum"
},
series: updateSeries,
valueAxes: valueAxes,
valueAxis: {
majorGridLines: {
visible: false
},
minorGridLines: {
visible: false
},
line: {
visible: false
}
},
categoryAxis: {
majorGridLines: {
visible: false
},
minorGridLines: {
visible: false
},
majorTicks: {
visible: false
},
minorTicks: {
visible: false
},
//baseUnit: "months"
baseUnit: bUnit
},
seriesClick: onSeriesClick,
});
I have it set to swap out the chart to different data elements in the array using a radio, here is the push for that
updateSeries.push({
name: checkedVals[i],
type: "line",
axis: "metric",
field: checkedVals[i],
categoryField: "date",
color: "#479ec2",
aggregate: "sum"
});
When I inspect in console I can see the options.series.aggregate is set to "sum", but it still does not show the summation on the chart. Is there something else I need to do?