Image Map generated when i create a image.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
skalluraya
Posts: 15
Joined: Fri Jan 23, 2009 5:36 am

Image Map generated when i create a image.

Post by skalluraya » Thu Feb 19, 2009 6:17 am

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.

skalluraya
Posts: 15
Joined: Fri Jan 23, 2009 5:36 am

Post by skalluraya » Thu Feb 19, 2009 12:50 pm

There is second question i would like to add to same post

I have a Bar chart which have Subtitles. If the length of subtitles increase then ellipses are shown. Can i give Tooltip to these subtitles.

Locked