Page 1 of 1

Round the decimal value problem

Posted: Wed May 04, 2016 11:32 am
by 15677821
If we pass the decimal value to the series, the same value should be displayed in the legend and the segment of pie chart. Instead it displays like 5.30,3.50,2.50,7.50,1.70 .

It seems the value "0" is appended to each value of series array.

function draw() {
Chart1=new Tee.Chart("canvas");
Chart1.addSeries(new Tee.Pie([5.3,3.5,2.5,7.5,1.7],['Sun','Mon','Tue','Wed','Thu']) );
Chart1.draw();
}

Is there any way to fix this for decimal values?

Re: Round the decimal value problem

Posted: Wed May 04, 2016 3:39 pm
by yeray
Hello,

Yes, you can change the decimals property for that series:

Code: Select all

Chart1.series.items[0].decimals = 1;

Re: Round the decimal value problem

Posted: Thu May 05, 2016 3:16 am
by 15677821
Thanks. It is working now as expected.