Chart.js

A simple chart component that takes in json data and displays it in various chart styles using Chart.js.

Examples

7-day forecast

City: Columbus

Single data

Multiple data

Components

  • chart

    A chart that illustrates a single y value across the x axis.

    Attributes

    NameDescriptionTypeExample
    dataan array of key value pair
    Array
    [{"country":"France","population":"67.97"},{"country":"Germany","population":"83.8"},{"country":"Japan","population":"125.1"},{"country":"Canada","population":"38.93"}]
    typechart type: line, bar, pie, donut, bubble, area, radar.String
    elementidid unique to the chart componentString
  • multi-chart

    A chart that illustrates a multiple y value across the x axis.

    Attributes

    NameDescriptionTypeExample
    dataan array of arrays of key value pair
    Array
    [[{"year":2000,"count":16},{"year":2010,"count":40},{"year":2020,"count":51}],
    [{"year":2000,"count":16},{"year":2010,"count":40},{"year":2020,"count":51}],
    [{"year":2000,"count":16},{"year":2010,"count":40},{"year":2020,"count":51}],]
    datalabelsan array that corresponds to each elemenr in the data arrayArray
    ["France","Germany","Japan","Canada"]
    typechart type: line, bar, pie, donut, bubble, area, radar.String
    elementidid unique to the chart componentString

Changelog

  • v1.0.1

    Apr 13, 2014

    [Bug Fixed]
    - Charts are now more responsive on smaller screens.
    - Attributes tables in the home page are now also responsive.

  • v1.0.0

    Apr 13, 2014

    Initial launch of the Chart.js package.
    Added chart and multi-chart components.