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&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.
精彩评论