Is it possible to create tooltips and linkgenerators over ValueMarkers?
So when the mouse is moved over a value marker i can click a link..
I can do it with an ordinary XY dataset but i have no idea with my value markers.
Any help is greately appreciated
Thanks
Chris
tooltips using ValueMarkers
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
It isn't supported, but only because the code that draws these markers doesn't add a ChartEntity for it. With a little refactoring this could be added, and it would certainly be a nice addition.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 13
- Joined: Mon May 08, 2006 1:27 pm
Tooltips for Marker - and Dragging
Was this ever implemented by anyone? I want to be able to set a different cursor when over a marker to indicate it is draggable.
It looks as though the latter is not simple to do but for the moment I intend to simulate it with a line that I move over the chart panel and re-draw the marker when the mouse button is released.
It looks as though the latter is not simple to do but for the moment I intend to simulate it with a line that I move over the chart panel and re-draw the marker when the mouse button is released.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Tooltips for Marker - and Dragging
No, it hasn't been implemented. What's needed (in XYPlot for example) is to replace the drawDomainMarker() and drawRangeMarker() methods with variants that accept a PlotRenderingInfo instance - then check if the owner (ChartRenderingInfo) has a non-null EntityCollection...if it does, then add a new ChartEntity for each marker drawn. You'll probably want to extend the ValueMarker and RangeMarker classes to carry optional tooltip and URL details, which you can use to populate the ChartEntity. I don't think this is a really difficult change, but just requires a little care to ensure that it doesn't break the existing API (deprecating some methods is OK).Mike Watts wrote:Was this ever implemented by anyone? I want to be able to set a different cursor when over a marker to indicate it is draggable.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

