How to display more than 1 chart in the servlet.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Navin Pathuru

How to display more than 1 chart in the servlet.

Post by Navin Pathuru » Sat Mar 09, 2002 10:30 pm

Hello,
JFreeChartServletDemo displays only one chart at a time, Does anyone know how to display more than one chart at a time. Any help is much appreciated.

Thank you,
Navin Pathuru

Bryan

Re: How to display more than 1 chart in the servlet.

Post by Bryan » Mon Mar 11, 2002 12:33 pm

Navin

An option might be to have a servlet/jsp/html which acts as the front end of the page you are trying to present. This page can have multiple <image> tags to the chart servlet(s).

Bryan

Navin Pathuru

Re: How to display more than 1 chart in the servlet.

Post by Navin Pathuru » Mon Mar 11, 2002 7:26 pm

Hi Bryan, I appreciate your feedback. Please correct me if i am not, it looks to me like you want me to save the charts as different temporary file names and then generate the Image tags dynamically which would map to the temporary files. I will give a try. Thank you very much.

Regards,
Navin Pathuru.

Bryan

Re: How to display more than 1 chart in the servlet.

Post by Bryan » Tue Mar 12, 2002 4:26 am

Navin

Not quite what I meant. Why bother generating to temporary files? You could include the servlet URL directly.

Example
http://coyote.aad.gov.au/marine/test/DataAvailable.html
Is a static HTML page which includes two plots. Both images are dynamically generated from servlets at request time.

Navin Pathuru

Re: How to display more than 1 chart in the servlet.

Post by Navin Pathuru » Tue Mar 12, 2002 4:08 pm

Hi Bryan, I appreciate your feedback. Thank you very much. I was pretty busy yesterday and i could not give a try. But your input is very useful and i will give it a try and let you know.

Thank you,
Navin Pathuru.

Irene

Re: How to display more than 1 chart in the servlet.

Post by Irene » Thu Mar 14, 2002 4:53 pm

Hello!!
I have the same problem as navin but I don´t know how can I do the static HTML page, my servlet now show only one plot using response.setContentType("image/jpeg"); Can you give a short example of the HTML page??

Navin Pathuru

Re: How to display more than 1 chart in the servlet.

Post by Navin Pathuru » Fri Mar 15, 2002 7:48 pm

Hi Irene, Are you saying that you want to display more than one chart at a time? Please give more details if not.



Regards,
Navin Pathuru

Navin Pathuru

Re: How to display more than 1 chart in the servlet.

Post by Navin Pathuru » Fri Mar 15, 2002 7:50 pm

Hi Bryan, i was wondering if you could pour some light here, i did not really try this but wanted to see if you could give me some pointers, i would like to display a Table and a Chart together using the servletDemo. Since we set the content type to Jpeg, i was wondering if this is not possible. Any help is much appreciated.

Regards,
Navin Pathuru.

Dim

Re: How to display more than 1 chart in the servlet.

Post by Dim » Fri Mar 29, 2002 11:23 am

Hi all,

To include several images, you'll have to produce a text/html page wich will then contains your charts. To insert a chart in the html page, use

<img src="http://myserver.tld/charts.jgi?myparameters">

That works fine for me, and allow you to give as many charts as you want on a unique HTML page.

Regards,
Dimitri.

Navin Pathuru

Re: How to display more than 1 chart in the servlet.

Post by Navin Pathuru » Fri Mar 29, 2002 4:09 pm

Hi Dimitri, this is resolved. Thank you for your reply.

Regards,
Navin Pathuru

Locked