问题
Can anyone explain how to use writeChartAsPNG
in JSP?
回答1:
please check this link out.Its good.
How to use writeChartAsPNG
They have used ChartUtilities.writeChartAsPNG()
methods in the example given over there.
回答2:
<img src="/path/to/chart" />
and have this path handled by a servlet, where:
ChartUtilities.writeChartAsPng(response.getOutputStream(), ....);
回答3:
Not totally related, but you might also consider Cewolf (http://cewolf.sourceforge.net/new/), which provides a JSP tag-library on top of JFrechart, and thus liberates you from using JSP scriplets.
来源:https://stackoverflow.com/questions/5496411/how-to-use-writechartaspng-in-jsp