开发者

How to set attribute in image map using JFreeChart

How can I set an attribute of an image map using JFreeChart in servlet?

Example:

<map id="imageMap" name="imageMap">
<area shape="rect" coords="98,200,155,328" title="(Section, First Section) = 9" alt="" href="index.html?series=Section&amp;category=First+Section"/>
<area shape="rect" coords="50,301,674,643" title=" axisType='XAXIS' " alt=""/>
<area shape="rect" coords="0,0,50,342" title=" axisType='YAXIS' " alt=""/>
</map>

I want to set the id or the class attribute for 开发者_开发百科each area tag for it to look like this:

<map id="imageMap" name="imageMap" class="sectionImageMap">
<area id="sec_1" class= "section" shape="rect" coords="98,200,155,328" title="(Section, First Section) = 9" alt="" href="javascript:getReports('this')"/>
<area id="sec_2" class= "section" shape="rect" coords="50,301,674,643" title=" axisType='XAXIS' " alt="" href="javascript:getReports('this')"/>
<area id="sec_3" class= "section" shape="rect" coords="0,0,50,342" title=" axisType='YAXIS' " alt="" href="javascript:getReports('this')"/>
</map>


You should be able to use org.jfree.chart.annotations.XYAnnotation; several are shown here and in the samples/demos.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜