Displaying multiple charts
Many times, you need to display more than one chart in a page to present different sets of data, or different views of the same data using different chart types. You may also wish to draw multiple charts over the same axes, so they can be compared. Another possibility is to use Canvas to draw over or under a chart and add context or additional data. All these scenarios are possible in Chart.js, but they require different strategies.
Rendering many charts on one page
You can render several different charts on the same page by simply drawing a separate Canvas for each one.
The following example displays four charts on one page that share the same data. First, we need to set up the canvases using HTML and CSS:
<html lang="en"> <head> <script src=".../Chart.min.js"></script> <style> .container { width: 98%; height: 80vh; position: absolute; } .top { height...