Documentation

  1. Installation
  2. Source Code
  3. Usage
    1. Line Chart
    2. Grouped Bar Chart
    3. Stacked Bar Chart
    4. Histogram Chart
    5. Pie Chart
    6. Doughnut Chart

Installation

bower install --save canvas-charts

or

git clone https://github.com/borisovg/canvas-charts-dist.git

Source Code

https://github.com/borisovg/canvas-charts/

Usage

Full API docs can be found here.

The examples below show sample code for generating each type of graph.

By default, line and bar charts (except for histograms) support a maximum of 8 colours. Pie and doughnut charts support a maximum of 9 colours. If you are hitting these limits please consider simplifying your chart, or refer to the API docs for a constructor option to change the colours.

The default colours were picked to be friendly to colourblind people.

The bar and line charts support negative values.

Line Chart

Grouped Bar Chart

Stacked Bar Chart

Histogram Chart

Pie Chart

Doughnut Chart