With a different height
Sets a height in pixels for the chart, defaulting to 400
. This is useful where the chart might appear in a narrow column and the default height would be too tall.
The component is not currently responsive.
How it looks (preview)
How to call this example
<%= render "govuk_publishing_components/components/chart", {
chart_heading: "Page views",
h_axis_title: "Day",
v_axis_title: "Views",
minimal: true,
chart_overview: "This is a graph of views per day",
height: 200,
keys: [
"1st",
"2nd",
"3rd",
"4th",
"5th",
"6th",
"7th"
],
rows: [
{
label: "January 2015",
values: [
5,
119,
74,
117,
33,
89,
79
]
},
{
label: "January 2016",
values: [
3,
8,
37,
82,
118,
85,
80
]
}
]
} %>