Say I have the following code
<% data = [
[1,1],[2,3],[3,5],[4,8],[6,4],[7,2]
] %>
<%= line_chart data, {discrete: true, library: {width: 600} }%>
Using chartkick, this produces the following graph
I want the vertical axis to be labeled using integers. (not decimals) I thought that the discrete
option was supposed to do this but for this example all it did was change the format of the elements on the horizontal axis from time to number (i.e. the following code
<%= line_chart data, {library: {width: 600} }%>
produces this
).
So my question is: what exactly does discrete
do, other than change dates that were actually numbers to numbers. How can I use it to make the numbers on the vertical axis integers? (Or, if it can't be used to do this, what can I use?)