Reputation: 102
Please can anyone help me with this issue? I have A ruby on rails app and I am trying to use ChartKick. I have the following code in my Controller to get all Publications:
@mentor_pub = Publication.all.where(user: current_user).order("mentor ASC")
And I am using the code below in my views.
<%= column_chart @mentor_pub.group(:mentor).count, height: "600px", discrete: true%>
You can see the image of what I am talking about here
the chart is displaying the way I want it, but The Yaxis is displaying decimal numbers instead of integers. Please How would I modify the Yaxis to show integers?
Upvotes: 1
Views: 650
Reputation: 742
Chartkick uses Google Visualization under the hood and allows you to pass options directly to the library using the library
option like so:
<%= line_chart data, library: {backgroundColor: "#eee"} %>
for your exact problem you'll have to look into Googles documentation or this stackoverflow answer https://stackoverflow.com/a/16036721/390977 might help.
Upvotes: 1