JFreeChart on Linux (Pie3DPlot.PERCENT_LABELS)
JFreeChart on Linux (Pie3DPlot.PERCENT_LABELS)
Hi,
plot.setSectionLabelType(Pie3DPlot.PERCENT_LABELS); is working on windows os, same thing is not working on Linux....
Can anybody tell me whe it's not working on Linux..
Thanx
Subhani
plot.setSectionLabelType(Pie3DPlot.PERCENT_LABELS); is working on windows os, same thing is not working on Linux....
Can anybody tell me whe it's not working on Linux..
Thanx
Subhani
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Are you sure you are running the same version of JFreeChart on both platforms? In 0.9.17 the way labels are generated on the pie charts changed, so maybe you are running 0.9.17 on Linux.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


JFreeChart on Linux
Yes , Same versions of JFreeChart - 0.9.16 is running on both platforms.
But I am not getting it on Linux.
But I am not getting it on Linux.
JFreeChart on Linux
Hi Dave Gilbert,
I' ve installed linux version of JFreeChart - 0.9.16 on Linux and windows version of JFreeChart - 0.9.16 on windows. And also we purchased developer's guide from you. In developer's guide I found the syntax for labling : plot.setSectionLabelType(Pie3DPlot.PERCENT_LABELS);
I think Linux version of JFreeChart is different from windows version, even is has same version names.
Can you please provide the solution for it....
Thank you & regards
Subahni
I' ve installed linux version of JFreeChart - 0.9.16 on Linux and windows version of JFreeChart - 0.9.16 on windows. And also we purchased developer's guide from you. In developer's guide I found the syntax for labling : plot.setSectionLabelType(Pie3DPlot.PERCENT_LABELS);
I think Linux version of JFreeChart is different from windows version, even is has same version names.
Can you please provide the solution for it....
Thank you & regards
Subahni
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
The two archives (jfreechart-0.9.17.zip and jfreechart-0.9.17.tar.gz) are built from the *same* source code, I promise. The script that is used to build the archives is included in the distribution (ant/build.xml) if you want to see how it works.
So, to figure out your problem you will need to explain in more precise detail what is going wrong on Linux. Are you seeing any error messages?
So, to figure out your problem you will need to explain in more precise detail what is going wrong on Linux. Are you seeing any error messages?
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Its giving following error:
Generated servlet error:
[javac] Compiling 1 source file
[javac] /home/jboss-3.2.3/server/default/work/MainEngine/localhost/JFreeChartNew/mypie_chart_jsp.java:113: cannot resolve symbol
[javac] symbol : variable PERCENT_LABELS
[javac] location: class org.jfree.chart.plot.PiePlot
[javac] plot.setSectionLabelType(PiePlot.PERCENT_LABELS);
[javac] ^
[javac] 1 error
Can you please provide the solution for it....
And also, I have tested with following code to check variable PERCENT_LABELS is exist or not in PiePlot object. That variable is there in PiePlot object...
Pie3DPlot plot = (Pie3DPlot) chart.getPlot();
java.lang.reflect.Field[] f = plot.getClass().getSuperclass().getDeclaredFields();
for(int i=0;i<f.length;i++){
System.out.println("declared fields in PiePlot object "+f.toString());
}
Thank you & regards
Subhani
Generated servlet error:
[javac] Compiling 1 source file
[javac] /home/jboss-3.2.3/server/default/work/MainEngine/localhost/JFreeChartNew/mypie_chart_jsp.java:113: cannot resolve symbol
[javac] symbol : variable PERCENT_LABELS
[javac] location: class org.jfree.chart.plot.PiePlot
[javac] plot.setSectionLabelType(PiePlot.PERCENT_LABELS);
[javac] ^
[javac] 1 error
Can you please provide the solution for it....
And also, I have tested with following code to check variable PERCENT_LABELS is exist or not in PiePlot object. That variable is there in PiePlot object...
Pie3DPlot plot = (Pie3DPlot) chart.getPlot();
java.lang.reflect.Field[] f = plot.getClass().getSuperclass().getDeclaredFields();
for(int i=0;i<f.length;i++){
System.out.println("declared fields in PiePlot object "+f.toString());
}
Thank you & regards
Subhani
Hi Subhani,
I just checked this on the two versions of JFC that I happen to have around. Plot.PERCENT_LABELS exists in JFC 0.9.15, but it has been removed in JFC 0.9.17.
You have to change your mypie_chart JSP page. You need to make it use org.jfree.chart.labels.StandardPieItemLabelGenerator, with a format string.
In the format string:
{0} is the key of the data item,
{1} is the value,
{2} is the percentage.
So you could use "{0} - {2}" for example, as a formatstring.
HTH
I just checked this on the two versions of JFC that I happen to have around. Plot.PERCENT_LABELS exists in JFC 0.9.15, but it has been removed in JFC 0.9.17.
You have to change your mypie_chart JSP page. You need to make it use org.jfree.chart.labels.StandardPieItemLabelGenerator, with a format string.
In the format string:
{0} is the key of the data item,
{1} is the value,
{2} is the percentage.
So you could use "{0} - {2}" for example, as a formatstring.
HTH
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
There is some problem in your environment, but I do not know what it is.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

