I tried to use Jfree chart in JSF, when i do that generated image tag is closed without the src and map tag is generated and the image is not at all displayed.
For example:
when i do this:
<h:graphicImage value="#{someMbean.barchart}" usemap="#imgMap1" />
I get output:
<img><map id="imgMap" name="imgMap">
<area shape="rect" coords="93,181,94,202" title="(Acutal, Match1) = 0" alt="" nohref="nohref">
<area shape="rect" coords="93,159,137,180" title="(Estimated, Match1) = 10" alt="" nohref="nohref">
<area shape="rect" coords="93,119,94,140" title="(Acutal, Match2) = 0" alt="" nohref="nohref">
<area shape="rect" coords="93,97,137,118" title="(Estimated, Match2) = 10" alt="" nohref="nohref">
<area shape="rect" coords="93,57,119,78" title="(Acutal, Match3) = 6" alt="" nohref="nohref">
<area shape="rect" coords="93,35,231,56" title="(Estimated, Match3) = 31" alt="" nohref="nohref">
</map>
src="/MyProject/servlet/DisplayChart?filename=jfreechart-61464.png" usemap="#imgMap" />
then if i use JSTL like this
<img src='../<c:out value="${someMbean.barchart}"></c:out>' usemap="#imgMap2"/>
then i am getting image correctly
I am generating a png image like this
FileName[0] = ServletUtilities.saveChartAsPNG(chart, Width, Height, info, session);
ChartUtilities.writeImageMap(PWObj, MapName, info, false);
FileName[1] = ChartUtilities.getImageMap(MapName, info);
can any one help me out.
Image Map generated when i create a image.
-
- Posts: 15
- Joined: Fri Jan 23, 2009 5:36 am
-
- Posts: 15
- Joined: Fri Jan 23, 2009 5:36 am