I am trying to remove kendo chart "Y-Axis decimal place" after pannable & Zoom in/ out
How can i remove the decimal values from the y-axis, i tried to set the "Y - axis label format.. but its don't works"
Code i tried
jQuery("#chart_i139_XzCnAHHzIR").kendoChart({
"chartArea": { "background": "#FFFEFC" },
"renderAs": "canvas", "title": { "text": "p1" },
"legend": { "labels": { "template": "#= series.name #" }, "position": "top" },
"series": [{
"name": "Male", "type": "line",
"data": [35171, 36663, 30247, 36479, 34025, 37142, 37295, 36054, 38076, 37725, 34716, 39620, 38296],
"stack": false, "labels": { "format": "{0:n0}", "visible": true, "position": "above" },
"style": "smooth"
}, {
"name": "Female", "type": "line",
"data": [34295, 32586, 36872, 35556, 38839, 36932, 34039, 35055, 35429, 35689, 34528, 31777, 33405],
"stack": false, "labels": { "format": "{0:n0}", "visible": true, "position": "above" },
"style": "smooth"
}], "categoryAxis": [{
"labels": { "rotation": { "angle": "auto" } },
"majorGridLines": { "width": 1, "color": "#dfdfdf", "visible": false },
"line": { "visible": true },
"title": { "text": "years", "position": "left" },
"categories": ["2008", "2007", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2017", "2016", "2018", "2019"]
}], "valueAxis": [{ "majorGridLines": { "visible": false } }],
"transitions": false,
"tooltip": { "template": "#= series.name #: #= kendo.format(\u0027{0:n0}\u0027,value) #", "visible": true },
"pannable": true, "zoomable": true
});
Issue has been resolved after adding this
.ValueAxis(axis => axis.Numeric()
.Labels(labels => labels.Format("{0:0}"))
.MajorUnit(1))