如何使用JFreeChart在图像映射中设置属性

时间:2011-09-24 12:31:07

标签: jfreechart

如何在servlet中使用JFreeChart设置图像映射的属性?

示例:

<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>

我想为每个区域标记设置 id 属性,使其如下所示:

<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>

1 个答案:

答案 0 :(得分:1)

你应该可以使用org.jfree.chart.annotations.XYAnnotation;其中有几个显示heresamples/demos