I am generating the chart (with using Google Chart) this way:
<%=
area_chart [{:name => "Sold items", data: @items.group(:created_at).count}], :library => {hAxis: {title: "Period"}, vAxis: {title: "Amounts in UDS"}, title: "History Of Sales"}
%>
And the chart is nicely generated, but there's one thing that I am trying to change - the tooltip looks like this:
Information in the tooltip are correct, but instead of displaying Oct 19, 2014, 2:00:00 AM I would love to display only Oct 19, 2014.
Is there any way to do it with Chartkick?
Thank you very much for your time.
This works for the x axis:
<%= line_chart @model.group(:created_at).count, library: { hAxis: { format: 'MM/dd' } } %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With