Domanda

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

     Sample Code:
     <%= line_chart Product.group("purchased").maximum(:price) %>
È stato utile?

Soluzione

Yes, with Google Charts, use:

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top