Hello,
Consider the following code we tried out in the Dojo:
It's just a short version of the demo code for stacked and grouped bars, but once you get into negative values, some of them stack up as positive instead of negative...
See screenshot too.
Thanks!
Consider the following code we tried out in the Dojo:
// Add chart configuration code
$("#donut").kendoChart({
theme: $(document).data("kendoSkin") || "default",
title: {
text: "World population by age group and sex"
},
legend: {
visible: false
},
seriesDefaults: {
type: "column"
},
series: [{
name: "0-19",
stack: "Female",
data: [1100941, 1139797]
}, {
name: "20-39",
stack: "Female",
data: [810169, 883051]
}, {
name: "0-19",
stack: "Male",
data: [-1155600, -1202766]
}, {
name: "20-39",
stack: "Male",
data: [-844496, -916479]
}],
seriesColors: ["#cd1533", "#d43851", "#dc5c71", "#e47f8f"],
valueAxis: {
labels: {
template: "#= kendo.format('{0:N0}', value / 1000) # M"
}
},
categoryAxis: {
categories: [1990, 1995]
},
tooltip: {
visible: true,
template: "#= series.stack #s, age #= series.name #"
}
});
It's just a short version of the demo code for stacked and grouped bars, but once you get into negative values, some of them stack up as positive instead of negative...
See screenshot too.
Thanks!