MarksStyle.PERCENT - decimal places

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Wheb
Newbie
Newbie
Posts: 8
Joined: Fri Jan 25, 2008 12:00 am
Location: Brazil

MarksStyle.PERCENT - decimal places

Post by Wheb » Tue Jul 12, 2011 8:15 pm

I want display marks with MarksStyle.PERCENT and I implemented this code:

Code: Select all

 com.steema.teechart.TChart t = new com.steema.teechart.TChart();
        getContentPane().add(t, BorderLayout.CENTER);
        com.steema.teechart.styles.HorizBar b = new com.steema.teechart.styles.HorizBar();
        t.addSeries(b);
        b.add(35);
        b.add(12);
        b.add(7);
        b.add(2);
        b.add(1);
        b.add(1);
        b.add(1);
        b.add(1);
        b.add(1);
        b.getMarks().setStyle(com.steema.teechart.styles.MarksStyle.PERCENT);
And show me this:
Image

But the sum of the values is 61 and 35 is equivalent to 57,37%, 12 is equivalent to 19,67% ...
How can I display 57,37% in place of 57% ?

Yeray
Site Admin
Site Admin
Posts: 9534
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: MarksStyle.PERCENT - decimal places

Post by Yeray » Thu Jul 14, 2011 7:59 am

Hello Wheb,

With the actual sources it has been modified and the result I get with your code is now the following:
Chart.png
Chart.png (24.2 KiB) Viewed 7612 times
So the next release should behave as shown.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply