How to resize servlet graph dynamically

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
renegama
Posts: 1
Joined: Wed Apr 15, 2015 10:57 pm
antibot: No, of course not.

How to resize servlet graph dynamically

Post by renegama » Wed Apr 15, 2015 11:08 pm

Hi,

I have a web page with some info and a space for a chart. The chart's space could resize dynamically when user resize browser window.

I have the following html code for the chart:

Code: Select all

<img src="OTD?width=800&height=400" alt="otd" name="otdGraph" id="otdGraph">
where OTD is a servlet that generates a TimeSeries chart returning a PNG image with given width and height.

I can resize the generated image without problem using javascript, but I'm resizing the resulting image insted of regenerate the chart with new size in

Code: Select all

ChartUtilities.writeChartAsPNG(out, chart, width, height);
Is there a way to dinamically "reload" the servlet (who generates the image) with the new width and height?

Thanks

Locked