Graphic Line with 6 decimals

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Softwell
Newbie
Newbie
Posts: 24
Joined: Tue Sep 16, 2008 12:00 am

Graphic Line with 6 decimals

Post by Softwell » Thu Jun 14, 2012 1:15 pm

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:
Attachments
resultWeb.png
Result
resultWeb.png (128.35 KiB) Viewed 11889 times
doubleValue.png
Double Value
doubleValue.png (59.66 KiB) Viewed 11854 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Graphic Line with 6 decimals

Post by Narcís » Fri Jun 15, 2012 11:44 am

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("#.######");
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Softwell
Newbie
Newbie
Posts: 24
Joined: Tue Sep 16, 2008 12:00 am

Re: Graphic Line with 6 decimals

Post by Softwell » Fri Jun 15, 2012 1:17 pm

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...

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Graphic Line with 6 decimals

Post by Narcís » Fri Jun 15, 2012 1:37 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply