Vertical table
Reorient the table to better suit the output of some data sets.
How it looks (preview)
Page views chart
Data table
January 2015 | January 2016 | |
---|---|---|
1st | 5 | 3 |
2nd | 119 | 8 |
3rd | 74 | 37 |
4th | 117 | 82 |
5th | 33 | 118 |
6th | 89 | 85 |
7th | 79 | 80 |
How to call this example
<%= render "govuk_publishing_components/components/chart", {
chart_heading: "Page views chart",
table_direction: "vertical",
h_axis_title: "Day",
v_axis_title: "Views",
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
]
}
]
} %>