Problem with Ruby Gem Chartkick

Asked

Viewed 99 times

2

After the change to daylight time I’m encountering a problem with the Gem Chartkick.

I rode my query as follows:

Ticket.unscoped.where('created_at >= ? ', Time.now - 10.days).group_by_day(:created_at).count

The returned result was:

{Mon, 20 Oct 2014 00:00:00 BRST -02:00=>7, Tue, 21 Oct 2014 00:00:00 BRST -02:00=>9, Wed, 22 Oct 2014 00:00:00 BRST -02:00=>6, Thu, 23 Oct 2014 00:00:00 BRST -02:00=>5, Fri, 24 Oct 2014 00:00:00 BRST -02:00=>6, Sat, 25 Oct 2014 00:00:00 BRST -02:00=>0, Sun, 26 Oct 2014 00:00:00 BRST -02:00=>0, Mon, 27 Oct 2014 00:00:00 BRST -02:00=>2, Tue, 28 Oct 2014 00:00:00 BRST -02:00=>1}

The generated graph is as follows:

Parte do gráfico gerado

The data is returning correctly, the problem seems to me that it is of the graph that even receiving the correct data shows everything zeroed.

  • Someone’s had this problem before?

1 answer

2


  • It worked right, thank you very much.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.