Chart (experimental) example

Default

How it looks (preview)

Page views chart

This chart shows page views for January 2015.
This chart is a visual representation of the data available in the table.
Skip to "Page views chart" data table

How to call this example

<%= render "govuk_publishing_components/components/chart", {
  chart_heading: "Page views chart",
  h_axis_title: "Day",
  v_axis_title: "Views",
  chart_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
      ]
    }
  ]
} %>