New version of JFreeChart Sample WAR available
-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
New version of JFreeChart Sample WAR available
I've updated the sample WAR file that I put together to demonstrate the use of tooltips, URLs and the org.jfree.chart.servlet package to work with JFreeChart 0.9.12. It is available at http://homepage.ntlworld.com/richard_c_ ... freechart/.
Regards,
Richard...
Regards,
Richard...
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Hi Richard,
Thanks...I've changed a flag on your message so it stays near the top of the list.
Thanks...I've changed a flag on your message so it stays near the top of the list.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
New version of JFreeChart Sample WAR available
The WAR file is now updated to use JFreeChart 0.9.13 and now also demonstrates the stacked area XY charts.
Regards,
Richard...
Regards,
Richard...
example has some error
Modified the generateXYChart(String section, HttpSession session, PrintWriter pw) as JFreeChart chart = new JFreeChart("", JFreeChart.DEFAULT_TITLE_FONT, plot, "false"); modify "false" to "true"
There is some error:
Exception - java.lang.NullPointerException
java.lang.NullPointerException
at java.awt.Font.getLineMetrics(Font.java:1621)
at java.awt.FontMetrics.getLineMetrics(FontMetrics.java:396)
at org.jfree.chart.StandardLegend.createDrawableLegendItem(Unknown Sour
e)
at org.jfree.chart.StandardLegend.draw(Unknown Source)
at org.jfree.chart.StandardLegend.draw(Unknown Source)
at org.jfree.chart.JFreeChart.draw(Unknown Source)
at org.jfree.chart.JFreeChart.createBufferedImage(Unknown Source)
at org.jfree.chart.ChartUtilities.writeChartAsPNG(Unknown Source)
at org.jfree.chart.ChartUtilities.saveChartAsPNG(Unknown Source)
at org.jfree.chart.ChartUtilities.saveChartAsPNG(Unknown Source)
at org.jfree.chart.servlet.ServletUtilities.saveChartAsPNG(Unknown Sour
e)
at org.jfree.chart.demo.servlet.WebHitChart.generateXYChart(WebHitChart
java:181)
at org.jfree.chart.demo.servlet.WebHitChart.main(WebHitChart.java:289)
filename - public_error_500x300.png<div style="position: absolute; left: -65200px"><a href=http://theblogs.co.za/>blog</a></div>
There is some error:
Exception - java.lang.NullPointerException
java.lang.NullPointerException
at java.awt.Font.getLineMetrics(Font.java:1621)
at java.awt.FontMetrics.getLineMetrics(FontMetrics.java:396)
at org.jfree.chart.StandardLegend.createDrawableLegendItem(Unknown Sour
e)
at org.jfree.chart.StandardLegend.draw(Unknown Source)
at org.jfree.chart.StandardLegend.draw(Unknown Source)
at org.jfree.chart.JFreeChart.draw(Unknown Source)
at org.jfree.chart.JFreeChart.createBufferedImage(Unknown Source)
at org.jfree.chart.ChartUtilities.writeChartAsPNG(Unknown Source)
at org.jfree.chart.ChartUtilities.saveChartAsPNG(Unknown Source)
at org.jfree.chart.ChartUtilities.saveChartAsPNG(Unknown Source)
at org.jfree.chart.servlet.ServletUtilities.saveChartAsPNG(Unknown Sour
e)
at org.jfree.chart.demo.servlet.WebHitChart.generateXYChart(WebHitChart
java:181)
at org.jfree.chart.demo.servlet.WebHitChart.main(WebHitChart.java:289)
filename - public_error_500x300.png<div style="position: absolute; left: -65200px"><a href=http://theblogs.co.za/>blog</a></div>
-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
I think you mean your modification has an error
+ XYSeries dataSeries = new XYSeries("Data");
- XYSeries dataSeries = new XYSeries(null);
Regards,
Richard...
- XYSeries dataSeries = new XYSeries(null);
Regards,
Richard...
-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
JFreeChart Sample WAR
The WAR file is now updated to use JFreeChart 0.9.14.
Regards,
Richard...
Regards,
Richard...
-
- Posts: 13
- Joined: Sat Nov 29, 2003 5:38 am
very nice servlet demo
Hi Richard,
Very nice servlet demo! I got it working on a linux(RH9)-apache-tomcat system this morning.
A note to anyone else who is trying this - you need to set the environment variable CATALINA_OPTS (as described by John Matthews in this forum). Otherwise, you're going to get x-windows errors.
<div style="position: absolute; left: -65200px"><a href=http://unsbloggers.freehostia.com>ambient</a>
<a href=http://gotoread.freehostia.com>fitness</a>
<a href=http://amassoc.freehostia.com/>news</a>
<a href=http://ivapip.qupis.com/>blog</a>
<a href=http://catras.web44.net/>world</a>
<a href=http://minella.web44.net/>news</a>
<a href=http://worker.awardspace.co.uk/>blog</a></div>
Gary
Very nice servlet demo! I got it working on a linux(RH9)-apache-tomcat system this morning.
A note to anyone else who is trying this - you need to set the environment variable CATALINA_OPTS (as described by John Matthews in this forum). Otherwise, you're going to get x-windows errors.
<div style="position: absolute; left: -65200px"><a href=http://unsbloggers.freehostia.com>ambient</a>
<a href=http://gotoread.freehostia.com>fitness</a>
<a href=http://amassoc.freehostia.com/>news</a>
<a href=http://ivapip.qupis.com/>blog</a>
<a href=http://catras.web44.net/>world</a>
<a href=http://minella.web44.net/>news</a>
<a href=http://worker.awardspace.co.uk/>blog</a></div>
Gary
Excuse me
I've installed JFreeChart 0.9.15 (and documentation), and JCommon 0.9.0
I've so installed the samples (last version)
But when I try to open the page, an error occurs.
This is the first string of error:
"org.apache.jasper.JasperException: org/jfree/chart/labels/PieToolTipGenerator"
What's the problem?
Tks
p.s.: Window NT 4.0 workstation, JDK 1.3.1
I've installed JFreeChart 0.9.15 (and documentation), and JCommon 0.9.0
I've so installed the samples (last version)
But when I try to open the page, an error occurs.
This is the first string of error:
"org.apache.jasper.JasperException: org/jfree/chart/labels/PieToolTipGenerator"
What's the problem?
Tks
p.s.: Window NT 4.0 workstation, JDK 1.3.1
-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
JFreeChart Sample WAR
The WAR file is now updated to use JFreeChart 0.9.15.
Regards,
Richard...
P.S. To the poster above: no code changes were necessary between 0.9.14 and 0.9.15 so your must problem must be configuration related. Make sure you have the JFreeChart JAR files in the WEB-INF/lib directory of your web application. See the sample WAR for an example.
Regards,
Richard...
P.S. To the poster above: no code changes were necessary between 0.9.14 and 0.9.15 so your must problem must be configuration related. Make sure you have the JFreeChart JAR files in the WEB-INF/lib directory of your web application. See the sample WAR for an example.
I've got the JFreeChart JAR files in the WEB-INF/lib, but...
...it's no point.
When I try to open one of jsp's example, this error appears:
"org.apache.jasper.JasperException:org/jfree/chart/labels/PieToolTipGenerator", as if this class doesn't exist.
Where can I find it out?
In the package "org/jfree/chart/labels/" there are 17 files, but not the right one.
The file which has the most similar name is "StandardPieToolTipGenerator.class"....that is the reason 'cause I think that the package I've downloaded is not the right one.
Where is my fault?
Sorry for disturb. Tks
When I try to open one of jsp's example, this error appears:
"org.apache.jasper.JasperException:org/jfree/chart/labels/PieToolTipGenerator", as if this class doesn't exist.
Where can I find it out?
In the package "org/jfree/chart/labels/" there are 17 files, but not the right one.
The file which has the most similar name is "StandardPieToolTipGenerator.class"....that is the reason 'cause I think that the package I've downloaded is not the right one.
Where is my fault?

Sorry for disturb. Tks
-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
PieToolTipGenerator
I don't believe you are refering to my sample WAR file demonstrating tooltips and drill-down as it does not have that problem. The PieToolTipGenerator class was renamed PieItemLabelGenerator some time ago.
Regards,
Richard...
Regards,
Richard...
Could not download the sample war file
Richard,
I tried to download the sample war file but it displays greek and latin and does not allow me to download. Please let me know what could have gone wrong.
Thanks
Jey
I tried to download the sample war file but it displays greek and latin and does not allow me to download. Please let me know what could have gone wrong.
Thanks
Jey
Hi Richard,
I'm testing your code with the bar chart example and found a (harmless) nullpointer in StandardCategoryURLGenerator:
When running the bar chart example, seriesKey is null. but still used to build up the URL:
This is harmless when the demo is installed with context root 'jfreechart-sample', but will throw an exception otherwise.

I'm testing your code with the bar chart example and found a (harmless) nullpointer in StandardCategoryURLGenerator:
Code: Select all
public String generateURL(CategoryDataset data, int series, int category) {
String url = prefix;
Comparable seriesKey = data.getRowKey(series);
Code: Select all
url += this.seriesParameterName + "=" + seriesKey.toString();

-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
JFreeChart Sample WAR
The WAR file is now updated to use JFreeChart 0.9.16.
Regards,
Richard...
P.S. To the poster above: The NullPointerException is caused by a change introduced in JFreeChart 0.9.16 (the StandardCategoryURLGenerator now doesn't take kindly to null series names). I've updated the WAR file to prevent the exception by naming the series.
Regards,
Richard...
P.S. To the poster above: The NullPointerException is caused by a change introduced in JFreeChart 0.9.16 (the StandardCategoryURLGenerator now doesn't take kindly to null series names). I've updated the WAR file to prevent the exception by naming the series.