Hi
I am totally new to JFreeChart. I just started doing my Research. My requirement is to plot a line chart and display it as part of a java server page. I tried the example program for pie chart given in the JFreeChart.pdf file. I included that code in a JSP and I couldn't see anything plotted. Could anyone please help me in meeting my requirement.
Thanks in advance
Praveena
How to insert a linechart in a Java Server Page
Re: How to insert a linechart in a Java Server Page
I'm new to JFreeChart as well, but I would imagine that you would have to either convert the chart object to an Applet --- or write the chart to a graphics file.
Re: How to insert a linechart in a Java Server Page
You can't insert an image directly in the JSP since the resulting document is HTML. You can use the *Servlet* supplied with the JFreeChart distribution to generate the image (in PNG format) and can be viewed on the HTML page using the <IMG> tag.
<img src="/servlet/YourChartingServlet">
where "YourChartingServlet" will produce a PNG format Image. For more information, you can go through *JFreechartServletDemo" source code.
<img src="/servlet/YourChartingServlet">
where "YourChartingServlet" will produce a PNG format Image. For more information, you can go through *JFreechartServletDemo" source code.
Re: How to insert a linechart in a Java Server Page
Thanks for your responses
Hari
If you have a running servlet class for any chart could you please send me the class and source to my mail address which is Praveena_S@ureach.com I would like to test the above suggestion you made but I don't know where to start.
Thanks
Praveena
Hari
If you have a running servlet class for any chart could you please send me the class and source to my mail address which is Praveena_S@ureach.com I would like to test the above suggestion you made but I don't know where to start.
Thanks
Praveena