reports_kit
reports_kit copied to clipboard
Is it possible to create mixed charts using reports kit?
I want to build a mixed chart inclusive of line chart and bar chart. Need help. Thanks in advance.
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.
- 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