Question

Does Chartkick allow users to label the x/y axies?

     Sample Code:
     <%= line_chart Product.group("purchased").maximum(:price) %>
Était-ce utile?

La solution

Yes, with Google Charts, use:

<%= line_chart Product.group("purchased").maximum(:price), {library: {hAxis: {title: "X"}, vAxis: {title: "Y"}}} %>

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top