Reading-Notes

Class 12: - Chart.js, Canvas


Chart.js

The Chart.js is imported at by making a script tag at the top of the page like so.

<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>Chart.js demo</title>
        <script src='Chart.min.js'></script>
    </head>
    <body>
    </body>
</html>

Chart.js has different features for drawing line graphs, bar charts, pie charts and all sorts of ways to visualize your data.


Canvas Api

Fills a given text at the given (x,y) position. Optionally with a maximum width to draw.

strokeText(text, x, y [, maxWidth])

Strokes a given text at the given (x,y) position. Optionally with a maximum width to draw.

```