displayed label({0}) name would like to use in a SQL query!
Trying to clarify your question:
This is Vision? You are wanting to run a sql query any time the tool tip becomes visible using the first value in it?
1 Like
It is in Vision!
if I go with the mouse on pie chart on it, after a second one gets the name (label{0}) !in my example "RRC" It is a shortened machine name!I want to use this value(RRC) with other chart for SQL query to filter!
The Name(label{0}) changes where mouse is located!
This script gets the value you are looking for from the mouseMoved event handler:
from org.jfree.chart.entity import PieSectionEntity
entity = event.source.getEntityForPoint(event.x, event.y)
if isinstance(entity, PieSectionEntity):
value = entity.sectionKey
else:
value = ''
#for illustration purposes only:
event.source.parent.getComponent('TooltipCatagoryLabel').text = 'Mousover Text = ' + value
Result:
Thank you!!!