For the example I type it in by hand, I Shift-right-clicked on the chart in Project Browser and selected Copy JSON.
If you are asking how to generate the data by script or by binding then that's a different question and you should start a new question and explain where your data is coming from.