JSP and Tags

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

JSP and Tags

Post by skhandwa » Mon Sep 24, 2001 5:41 pm

I've have JSP/Tags/JFreeChart working using OrionServer. Had to fix a couple of things and add some attributes. I'm also in the process
of adding a Database Datasource, so you can use SQL to
generate data sets.

E.g.,
select table1.xvalue as 'Column1', table2.xvalue as 'Column2'
from table1, table2 where table2.idx=table1.idx and
table1.coveredDates between '01-June-1999' and '30-May-2000'

the idea is that you specify tags something like this:

<chart:chart type="LINE"
height="200"
width="400"
title="Stock Performance"
chartid="some_unique_string"
jdbcDataSource="jdbc/MyDS"
sql= "select table1.xvalue as Column1,
table2.xvalue as Column2
from table1, table2
where table2.idx=table1.idx and
table1.coveredDates
between '01-June-1999' and '30-May-2000'"
/>

I'm also in the process of eliminating the need for intermediate
files to be generated, by directly delivering PNG output via
a servlet, the chartid attribute is for this.
The chartid attribute is a key to retrieving the attributes
specified in the tag and then using a servlet/JFreeChart combo
to render the chart and deliver it back as a PNG image stream.

As soon as this is complete, I'll write up a how-to and post
examples and source.

cheers,
--Sunil

Locked