Chart (experimental) example

Default

How it looks (preview)

Page views chart

This chart is a visual representation of the data available in the table.
Data table
2015-01-01 2015-01-02 2015-01-03 2015-01-04 2015-01-05 2015-01-06 2015-01-07 2015-01-08 2015-01-09 2015-01-10
January 2015 500 1,190 740 820 270 450 110 210 670 430

How to call this example

<%= render "govuk_publishing_components/components/chart", {
  chart_heading: "Page views chart",
  h_axis_title: "Day",
  v_axis_title: "Views",
  overview: "This chart shows page views for January 2015.",
  hide_legend: true,
  keys: [
    "2015-01-01",
    "2015-01-02",
    "2015-01-03",
    "2015-01-04",
    "2015-01-05",
    "2015-01-06",
    "2015-01-07",
    "2015-01-08",
    "2015-01-09",
    "2015-01-10"
  ],
  rows: [
    {
      label: "January 2015",
      values: [
        500,
        1190,
        740,
        820,
        270,
        450,
        110,
        210,
        670,
        430
      ]
    }
  ]
} %>