reading-notes

HOME

Easily Create Stunning Animated Charts With Chart.JS

  1. create canvas element in HTML
  1. drawing bar chart, similar to previous steps:

# Canvas

FALLBACK CONTENT

-provide fallback content so it can be displayed in older browsers by placing alternat conent inside of the element

RENDERING CONTEXT

CHECK FOR SUPPORT by using getContext

Drawing Shapes With Canvas

The coordinate space/grid uses (x,y) coordinates for position and rotations

DRAW USING CANVAS

refer to drawing principles

Apply Styles and Colors

Drawing Text

render using:

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

Style text

font = value textAlign = value textBaseline = value direction = value

HOME