I'm trying to serialize a Chart from Chart.js into a JSON in order to save it into a database and de-serialize it later to render it again, but I'm stuck.
If I try to use JSON.stringify on the chart object or with the result of .getDatasetMeta(), I can't because I have circular structure and the method can't convert it (Uncaught TypeError: Converting circular structure to JSON).
I developed an interface to make the user able to custom his Chart the way he wants and so I'm only interested by saving important data that the user would have set( data itself, labels, colors, beginAtZero, fill ... )
Thank you very much for your help.