ksugiarto
ksugiarto

Reputation: 951

How to set custom y axis Chartkick

So, I tried using Chartkick on my project, and it all work fine, but there is one thing I can't make it done, which is set custom y axis. What the tutorial said was about using count. While I need some kind of this code:

@foo = Bar.select("SUM(payment_amount)").group(:payment_date)

So I need that the y axis consist of cumulative amount of those data, how should I do this with Chartkick?

Upvotes: 2

Views: 1311

Answers (1)

Andrew Kane
Andrew Kane

Reputation: 3236

Try:

Bar.group(:payment_date).sum(:payment_amount)

Upvotes: 3

Related Questions