Adding an HTML5 time series

We should now decide upon a charting library based on HTML5 and JavaScript to use. Although there are many options available, Chart.js ( is ideal because of its permissive MIT license and relatively simple APIs. Starting from the QML graph example of Chapter 30Building a Mobile Dashboard to Display Real-Time Sensor Data, we will re-implement it with Chart.js. I won't go into the details of the re-implementation since this is out of scope for this title — you can check out the Chart.js documentation and samples to get the specifics. Besides Chart.js, we'll be using Moment.js, which fully integrates with the charting library for the easy handling of dates and times. The following is the ...

Get End to End GUI Development with Qt5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.