Kendo Dataviz Chart Stack Causes Axis to be High
I have a Kendo Dataviz column stacked graph and the axis value is
extremely higher than the values in the chart. For example, I have two
groups, one has a value of 1 stacked on a value of 1 and the axis goes to
30. When I turn stacking off, it goes to 2.5. I'm not sure what is causing
this. Has anyone ever encountered that issue? I can't set a max because
the values will always be different. Is there a way to dynamically set the
max?
function createChart() {
$("#chart").kendoChart({
dataSource: {
transport: {
read:
"http://localhost:8888/available_sold_graph.php",
dataType: "json"
},
schema: {
data: "data"
},
sort: {
field: "DateHeader",
dir: "asc"
}
},
title: {
text: "Available / Sold"
},
legend: {
position: "bottom"
},
seriesDefaults: {
type: "column",
stack: true
},
series:
[{
field: "Available",
name: "Available",
color: "#3c9ad1"
}, {
field: "Sold",
name: "Sold",
color: "#9dcb4a"
}],
categoryAxis: {
field: "DateHeader",
labels: {
rotation: -0
}
},
tooltip: {
visible: true,
format: "N0"
}
});
}
$(document).ready(createChart);
$(document).bind("kendo:skinChange", createChart);
</script>
No comments:
Post a Comment