Home forums Using CanvasJS chart json data click option function not working

This topic contains 1 reply, has 2 voices, and was last updated by  Vishwas R 9 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #9776



    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?



    Vishwas R

    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.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.