reports_kit icon indicating copy to clipboard operation
reports_kit copied to clipboard

Is it possible to create mixed charts using reports kit?

Open parabrucha opened this issue 6 years ago • 1 comments

I want to build a mixed chart inclusive of line chart and bar chart. Need help. Thanks in advance.

parabrucha avatar Feb 13 '19 07:02 parabrucha

Hi, i looked through the documentation and didn't see such a possibility. But there are a few work arounds which can get you to do that.

  1. You can make the same query in each of the charts and have them render the information. This will mean several queries which will increase the load on the server, and also take some time because reportskit processes them sequentially. It is possible to log configure them to be run concurrently
ReportsKit.configure do |config|
  config.use_concurrent_queries = true
end

This has a downside that it increases the load on the server but you can handle that by configuring caching on the server so that subsequent request(only redis is supported for now) benefit from the cache

# config/initializers/reports_kit.rb

ReportsKit.configure do |config|
  config.cache_store = Redis.new(url: "redis://:[email protected]:6380/15")
  config.cache_duration = 10.minutes
end

nsoseka avatar Jul 04 '19 10:07 nsoseka