Hello all. I am trying to write a script on an XY chart in perspective to display text in the label underneath it based on the bar and/or section of the bar clicked on.
I tried linking to the tooltip text as seen in the picture but that just gave me the tooltip formatting. What i am wondering is if the string formatting variables ({valueY},{CatergoryX} etc.) are reachable in the onClick event? “self” is a passed in parameter but i am not sure how to get to those values. Thanks in advance.
One thought we had but didnt get a chance to try is to make a flex repeater under the chart and when we populate the chart data also make instances of a view in the flex repeater that are buttons which contain custom properties of the data for the bar on the chart right above it. and then on click you can do what ever you want.
when i was last looking into this (which was a while ago) i was finding something called “Listeners” in the amCharts which is what would be used to fire an event and from what i could see, that functionality wasnt in yet.
Yeah at the moment there isnt any “onActionPerformed” events on the XY Chart, Pie Chart, and a few others that could definitely use it for exactly what you guys have talked about here.
I manage to get this functionality. Like Phil_B suggested I used a flex repeater that are buttons which contain custom properties of the data for the bar on the chart right above it.
@michal.such what is the Ignition version you are using? I tried same with 8.1.7 but i dont have the selection property. So i guess its only available in newer versions.