swing - Java JFreeChart: customize tooltip screen position -
i implemented own jfreechart xytooltipgenerator
and, chart used on full screen, tooltip position (on screen) hides point related (e.g. in bottom right corner, since seems tooltip configured positioned south-east of mouse / data point). problem because user needs able click on chart's data points (as generates specific action).
is there way either define dynamically position of tooltip (e.g. data points bottom right ask tooltip shown north-west) or, alternatively, define systematic position (e.g. north-west instead of south-east default)?
this problem has given me headaches last few days - or hint more welcome.
many thanks! thomas
here's answer posted on jfreechart forum:
jfreechart using standard swing tool tip mechanism. in chartpanel class, gettooltiptext(mouseevent) method overridden return appropriate text tooltip, , that's it.
swing gives option override gettooltiplocation(mouseevent) method, , that's need here.
Comments
Post a Comment