ChartJS on click

Hi there,

we work with ChartJS (advanced mode) within WeWeb. We have built an onClick function into options. We would like to continue working with the output in WeWeb. How is this possible?

e.g. we create an onClick Javascript variable and want to save the value in a WeWeb variable.

Hey,
if you enable developper information, you will be able to know the technical id of your variable.


Then on your JS action, you can call wwLib.wwVariable.updateValue(varId, value)

1 Like

This is exactly what we were looking for. Thank you very much!

You probably want to do something else after the change variable ? If so, you can also call a global workflow. wwLib.executeWorkflow(workflowId, {param1: 'myValue'})

Be aware we are working on a new on click event on chartjs. As we will also use the options it may break what you’ve done. We will try to make your options win over our own internal configuration.

2 Likes