We have an Advanced Bar Chart and wanted to define a custom on-click event. We followed the instructions in the docs for the event handler, but can’t get it to work.
According to the docs, the event should expose Serie, X, and Y values from the clicked data point into the triggered action, but the Context data comes back empty.
Setup:
The chart’s Category Property is a Datetime grouped by month, and the Value Property is aggregated with Sum.
Chart’s On Series Click calls an action with matching params: X (datetime), Serie (string), Y (float).
For now, the action only writes the action params to app variables.
We tried binding the params explicitly and leaving them unbound, in case the values are passed implicitly by name.
After clicking a bar, none of the three App Variables update. The action params appear to always be empty.
I checked the Showroom but couldn’t find any examples of charts using On series click.
Has anyone gotten this to work? Is our setup wrong, or is this a platform issue?
Your setup is correct, and you’ve found a bug on our side. When you bind action params in the On Series Click event, the X output is always treated as a Float, whatever your Category Property is. Because the picker only offers outputs whose type matches the param, your Datetime X param is never offered the X output. That’s why it stays empty. We’re logging this with the team so it can be fixed.
This explains X, but it shouldn’t stop Serie and Y from coming through. Could you help us check a few things?
When you bind the params explicitly, which event outputs appear in the list for each param? Is X missing for the Datetime param while Serie and Y are there?
If you bind only Serie and click a bar, does its App Variable update? A quick way to check whether the action runs at all is to add a Show Message node as the first step.
Is Disable tracking turned on in the chart’s properties? It switches off mouse interaction, so clicks never reach the event handler.
About leaving the params unbound: values aren’t passed by matching names, so each param needs an explicit binding to an event output.
We’ll update this thread when the fix is out. Sorry for the trouble!
Regarding X, I bound it to a float param now, and I can see all 3 values being passed (although the datetime is treated as a float so the output is not correct).
Two follow-up questions:
do I understand it right that in order to be able to use a click event, we wouldn’t be able to turn off the default on hover event?
is there a way to get information about all series from a stacked bar, or is the current setup limited to the specific serie that’s clicked only?