Was hoping for a hint in the right direction. I have created a Bar chart very similar to the one in the WebHit Servlet Demo (uses a CategoryDataset). The resulting chart is exactly what I want to see but I want to change the URLs in the Image Map while maintaining the section names displayed on the Category Axis. For instance, lets assume I create the chart exactly in the example (the first section name is called Catalog). The resultant URL mapped to the first bar is then:
... /xy_chart.jsp?series=0§ion=Catalog
What is the best way to change this to:
... /xy_chart.jsp?series=0§ion=Catalogue
and still keep the label "Catalog" on the charts axis.
Thanks,
Rick
Category Data ImageMap URL
Re: Category Data ImageMap URL
Oops - looks like the ampersands in the urls didn't translate so good. I'll substitute a "+" instead. Should read:
.
.
.
... /xy_chart.jsp?series=0+section=Catalog
What is the best way to change this to:
... /xy_chart.jsp?series=0+section=Catalogue
.
.
.
.
.
.
... /xy_chart.jsp?series=0+section=Catalog
What is the best way to change this to:
... /xy_chart.jsp?series=0+section=Catalogue
.
.
.
Re: Category Data ImageMap URL
Develop a class that implements the CategoryURLGenerator interface and does what you need and set it as a property of the VerticalBarRenderer. You might want to take a look at the StandardCategoryURLGenerator for ideas (package com.jrefinery.chart.urls).
http://cvs.sourceforge.net/cgi-bin/view ... cvs-markup
Hope that helps.
Regards,
Richard...
http://cvs.sourceforge.net/cgi-bin/view ... cvs-markup
Hope that helps.
Regards,
Richard...
Re: Category Data ImageMap URL
Thanks for the quick response Richard.
For the record, I was somewhat successful by intercepting the ChartRenderingInfo's entity collection after the chart was created and changing it just before writing the imagemap but my code faultered when I hit a "zero" value (ie. No iteration for that category) and nothing synced up after. Wasn't sure if I should pursue my current course of try another way. Your suggestion sounds like a cleaner way to do it so I'll give it a shot.
Many thanks!!!,
Rick
For the record, I was somewhat successful by intercepting the ChartRenderingInfo's entity collection after the chart was created and changing it just before writing the imagemap but my code faultered when I hit a "zero" value (ie. No iteration for that category) and nothing synced up after. Wasn't sure if I should pursue my current course of try another way. Your suggestion sounds like a cleaner way to do it so I'll give it a shot.
Many thanks!!!,
Rick