Reputation: 1
I am using the ChartKick Ruby gem, and am trying to display the legend at the top (which I manage) with the items vertically (which I don't manage).
The legend keeps being displayed horizontally which is a problem for mobile devices.
My code:
<script>
var Chartkick = {"language": "pt"};
</script>
<%= javascript_include_tag "//www.google.com/jsapi", "chartkick" %>
<%= bar_chart metric, library: {colors: colors, backgroundColor: "#ffffff", hAxis:{title:hAxisTitle, format: '##########'}, vAxis:{title:vAxisTitle}, isStacked: true, legend: {layout: "vertical", position: "top"}, }, height: '200px' %>
The layout:vertical option simply doesn't seem to work :-(
Upvotes: 0
Views: 1163
Reputation: 2492
Please use this option for legend vertically on top
<%= pie_chart @job_acceptance , library: {legend: {position: "top"}}%>
Upvotes: 1