I created a chart of User registered/Month chart with Chartkick, however, some data at xAxis is not visible, such as this:
Aralık means "December" and Şubat means "February". Even though there aret users registered at "November", there is no representing label in xAxis. There should be a label for every month, however I could not achieve it. My current rails code is this:
<%= line_chart User.group_by_month(:created_at).count %>
and the output from grouping query is this:
{Sun, 01 Nov 2015 00:00:00 UTC +00:00=>1, Tue, 01 Dec 2015 00:00:00 UTC +00:00=>1, Fri, 01 Jan 2016 00:00:00 UTC +00:00=>1, Mon, 01 Feb 2016 00:00:00 UTC +00:00=>1, Tue, 01 Mar 2016 00:00:00 UTC +00:00=>1}
I've also tried using the Google Charts library like this,
{library: {discrete: true, hAxis: {format: "MMMM yyyy", ticks: @patient_month_distribution.keys}}}
Google Charts outputs this error:
How can I modify my code so that every month/year is visible?