Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Load big data to the chart

Hi, everyone! Here s my question. I want to load big data to the chartJS. But everytime i load the big data to the chart, the browser will crush. The data size is more than 5000 or if possible i hope we can load unlimited. I searched many method from the website, something like Google or stackoverflow and so on. Many people said you need to load the data distributed, not load the data once. So my question is, is there any method that can load the data once, not one by one. Hope you guys can help me out, thank you so much!

The reference link is https://playground.anychart.com/gallery/Timeline_Chart/Project_Management_Timeline

My code is here: // range series data function rangeData() { var json = []; for(var i = 2019; i <= 2090; i++) { json.push( { name: 'Planning', start: i+'/01/22', end: i+'/02/04', fill: '#01b53f', stroke: '#01b53f' }, { name: 'Research', start: i+'/02/04', end: i+'/02/18', fill: '#1c4598', stroke: '#1c4598' }, { name: 'Development', start: i+'/02/18', end: i+'/03/22', fill: '#ff6600', stroke: '#ff6600' }, { name: 'Implementation', start: i+'/03/22', end: i+'/04/05', fill: '#00a8e0', stroke: '#00a8e0' }, { name: 'Surveillance', start: i+'/04/05', end: i+'/04/19', fill: '#f6bc16', stroke: '#f6bc16' }, { name: 'Follow-Up', start: i+'/04/19', end: i+'/05/01', fill: '#e51a23', stroke: '#e51a23' }) } return json; }

please checkout the range series data section. Thank you!