Page 1 of 1

MarksStyle.PERCENT - decimal places

Posted: Tue Jul 12, 2011 8:15 pm
by 10548077
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% ?

Re: MarksStyle.PERCENT - decimal places

Posted: Thu Jul 14, 2011 7:59 am
by yeray
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 1477 times
So the next release should behave as shown.