New version of JFreeChart Sample WAR available

A free public discussion forum for the JFreeChart class library.

New version of JFreeChart Sample WAR available

Postby richard_atkinson » Thu Sep 11, 2003 8:58 pm

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_atkinson/jfreechart/.

Regards,
Richard...
richard_atkinson
 
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England

Postby david.gilbert » Thu Sep 11, 2003 9:31 pm

Hi Richard,

Thanks...I've changed a flag on your message so it stays near the top of the list.
Dave Gilbert
JFreeChart Project Leader

:idea: Buy the JFreeChart Developer Guide :idea:
david.gilbert
JFreeChart Project Leader
 
Posts: 10759
Joined: Fri Mar 14, 2003 10:29 am
Location: Europe

New version of JFreeChart Sample WAR available

Postby richard_atkinson » Sun Sep 28, 2003 11:28 am

The WAR file is now updated to use JFreeChart 0.9.13 and now also demonstrates the stacked area XY charts.

Regards,
Richard...
richard_atkinson
 
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England

example has some error

Postby pubmail75 » Fri Oct 24, 2003 2:46 am

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>
pubmail75
 
Posts: 6
Joined: Mon Oct 20, 2003 2:23 am

I think you mean your modification has an error

Postby richard_atkinson » Fri Oct 24, 2003 8:12 pm

+ XYSeries dataSeries = new XYSeries("Data");
- XYSeries dataSeries = new XYSeries(null);

Regards,
Richard...
richard_atkinson
 
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England

JFreeChart Sample WAR

Postby richard_atkinson » Wed Nov 19, 2003 10:03 pm

The WAR file is now updated to use JFreeChart 0.9.14.

Regards,
Richard...
richard_atkinson
 
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England

very nice servlet demo

Postby garyn87048 » Wed Dec 03, 2003 8:41 pm

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
garyn87048
 
Posts: 13
Joined: Sat Nov 29, 2003 5:38 am

Postby Cla » Tue Dec 16, 2003 2:28 pm

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
Cla
 
Posts: 5
Joined: Tue Dec 16, 2003 2:20 pm

JFreeChart Sample WAR

Postby richard_atkinson » Thu Dec 18, 2003 9:34 pm

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.
richard_atkinson
 
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England

I've got the JFreeChart JAR files in the WEB-INF/lib, but...

Postby Cla » Fri Dec 19, 2003 2:04 pm

...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? :wink:

Sorry for disturb. Tks
Cla
 
Posts: 5
Joined: Tue Dec 16, 2003 2:20 pm

PieToolTipGenerator

Postby richard_atkinson » Fri Dec 19, 2003 3:54 pm

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...
richard_atkinson
 
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England

Postby Cla » Mon Dec 29, 2003 5:31 pm

Tks...now I'll retry.

Maybe I've made a mistake in downloading War files.... :oops:

Bye, Cla
Cla
 
Posts: 5
Joined: Tue Dec 16, 2003 2:20 pm

Could not download the sample war file

Postby Jey » Fri Jan 23, 2004 2:43 am

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
Jey
 

Postby beems135 » Tue Feb 03, 2004 11:11 am

Hi Richard,

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);


When running the bar chart example, seriesKey is null. but still used to build up the URL:
Code: Select all
url += this.seriesParameterName + "=" + seriesKey.toString();


This is harmless when the demo is installed with context root 'jfreechart-sample', but will throw an exception otherwise.
:shock:
beems135
 

JFreeChart Sample WAR

Postby richard_atkinson » Thu Feb 05, 2004 8:09 pm

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.
richard_atkinson
 
Posts: 115
Joined: Fri Mar 14, 2003 3:13 pm
Location: London, England

Next

Return to JFreeChart - General

Who is online

Users browsing this forum: Google [Bot] and 0 guests