Page 1 of 1
Graphic Line with 6 decimals
Posted: Thu Jun 14, 2012 1:15 pm
by 7669317
Hello there,
I'm trying to pass values with 6 decimals double number to the graphic.
The problem is: The graphic is showing only with 3 decimals instead of 6.
Am i missing something ?
Follows the images:
Re: Graphic Line with 6 decimals
Posted: Fri Jun 15, 2012 11:44 am
by narcis
Hi Lourival,
You just need to set series' ValueFormat, for example:
Code: Select all
Line series = new Line(tChart1.getChart());
series.add(0.123456);
series.add(1.123456);
series.add(2.123456);
series.add(3.123456);
series.add(4.123456);
series.getMarks().setVisible(true);
series.setValueFormat("#.######");
Re: Graphic Line with 6 decimals
Posted: Fri Jun 15, 2012 1:17 pm
by 7669317
That's it! Thanks NarcĂs.
PS: Is there a way to allow any digits, so i don't need to always specify it? Like "*.*" or something like that...
Re: Graphic Line with 6 decimals
Posted: Fri Jun 15, 2012 1:37 pm
by narcis
Hi Lourival,
DecimalFormat is being used here. You'll probably need to use as many "0" or "#" as decimals you want to guarantee in your charts.