Home › forums › Using CanvasJS › chart json data click option function not working
Since I need to dynamically generate server-side chart data (json), I want to also pass the click option (click: onClick) in JSON. However, it turned out not working. I am using the jQuery way to render charts. Is it possible that you can show me how to generate the click event in jQuery?
You cannot send function as part of JSON data directly. Though you can serialize function on the server before sending, this is generally not suggested. Instead we suggest adding these event handlers on the client side after receiving the json data.
You must be logged in to reply to this topic.