Clickable Annotation?
Clickable Annotation?
Is there any way to create an annotation with a mouse-click event? Specifically, I'm using an XYTitleAnnotation and would like to call some code if the user clicks it.
Re: Clickable Annotation?
implements chartmouselistner in your class and in chartMouseClicked method you have to check is this event on xytitleannotation
for getting on which title click you have to set tooltip on xytitleannotation and you will get tooltip in chartMouseClicked method:
Code: Select all
event.getEntity() instanceof TitleEntity
Code: Select all
String tooltipid = event.getEntity().getToolTipText();
Re: Clickable Annotation?
Thanks! I will give this a try.