Summary

Throughout this chapter, we modified almost all aspects of our code in order to make it more data friendly.

First, you learned the basics of the Chart.js library. We also reasoned about why we are choosing Chart.js over other similar libraries. We went on to make a sample chart using this library, to be used in the later part of the chapter to integrate with out sensor readings.

To prepare for this, the server was made more data friendly through the use of JSON responses. Our frontend was then optimized to utilize these responses.

We finally made use of Chart.js' ranging and data animation features to make our charts look more to scale and to make them dynamic with respect to displaying new data.

Our frontend now looks much richer and more like a fully featured dashboard. However, there are still a few features that we are missing. If you notice, every time we refresh our web page, the data that was there on the chart disappears.

Take a moment to think about why this happens and what you would do to solve it. In the next section, we will address this problem and you will learn how to make our data more persistent.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.8.82