Archives de
Étiquette : Canvas

Chart.js

Chart.js

Il y a quelques temps j’ai eu l’idée de récupérer les données d’une station météo afin de faire un affichage de ces données sur une page WEB. Pour par exemple l’affichage des températures du jour je pourrais faire cela : Bon effectivement j’ai bien pour chaque heure de la journée les bonnes températures mais c’est pas très lisible, difficile de voir l’évolution tout au long de la journée! J’aimerais bien avoir cela : Avec cette courbe j’ai bien la représentation…

Lire la suite Lire la suite

The <canvas> element

The <canvas> element

<canvas> is an HTML5 element that allows the creation and manipulation of graphical elements (paths, shapes, text, bitmap images) via a scripting language, most often JavaScript. All modern browsers support it natively, and can render it using hardware acceleration. To start, we add the following tag to the page, specifying the width and height attributes: Drawing lines Let’s draw a primitive C using two lines: Drawing a shape Now, let’s add a D using the context method arc. It accepts the following arguments: Drawing text Next up, we’ll write an A using…

Lire la suite Lire la suite