Hi - The charts.js example on wix code site does not seem to be working any more. The charts don’t get displayed. Further, it does not function when you open the example in editor either.
Did something change? Thanks
Hi - The charts.js example on wix code site does not seem to be working any more. The charts don’t get displayed. Further, it does not function when you open the example in editor either.
Did something change? Thanks
Hi,
It seems like an issue on our end. I’ve forwarded it to the relevant department. I’ll get back to you once it is resolved.
Thanks for notifying us,
Tal.
Tal any updates - hope Wix has been able to address this.
Teji
I’m wondering as well. Thanks!
me too
Anyone have a working example they could share of Wix site + Chart.js where the chart interacts with the html?
george, I am not an expert but this should work. Go to the charts.js example open it in the editor.
On the page code replace all instances of postMessage(flights[year]) with postMessage(JSON.stringify(flights[year]))
In the html code, find the window.onmessage function block and replace it with this code:
window.onmessage = function(event){
if (event.data && Array.isArray(JSON.parse(event.data))) {
myChart.data.datasets[0].data = JSON.parse(event.data);
myChart.update();
}
else {
console.log("HTML Code Element received a generic message:");
console.log(event.data);
}
};
Beautiful, thanks Teji, hope returns! I am completely new to this so having a working example is invaluable. If anyone from Wix is listening, please edit your source in the example.
Thanks,
George
This example is still a broken reference. Any ideas where can I see a chart.js example?
This is an old post and is being closed. If you have further questions please open a new thread with your own problem/issue.
Bumping up old posts is against the Community Guidelines .