Hi,
I have igDataChart of type "scatterLine". Now I would like to format the X and Y axis i.e if the numbers are too big then would like to show a formatted values. Like if the values ranges as 100,000, 200,000 & 300,000 then would like to show 100k, 200k & 300,000k .
Is there anyway I can achieve this ?
Hi, you can set custom formatting on an axis by setting a function were you control how a double value is rendered to a string, like so:
{
name: "yAxis",
type: "numericY",
minimumValue: 0,
formatLabel: function (val) {
var kVal = (val / 1000),
rounded = Math.round(kVal * 100) / 100;
return rounded + "K";
}
See this running sample:
http://jsfiddle.net/gmurray/jnaaM/
Thanks