Comments (2)
What would be the output in this "mode" if there's no dimensions defined in the report?
I wouldn't be against a PR to see how it would look, though perhaps this is better served in your app with via a decorator layer/utility class that does whatever formatting you want instead. This feels more like a very specific usecase for your implementation.
That said, I'm not sold on the naming. I feel there would be a better option name to describe what would come out of #result
rather than results_with_labels
...
from active_reporting.
I managed to get the desired result with Hash[results.map { |r| [ r.fetch_values('dimension1_name', 'dimension2_name'), r.fetch('measure_name')] }] but I feel like there is probably a better way. I am really liking the gem and thought adding an option like raw_sql_results: true
or results_with_labels: false
to the report object might be an option. Would you be opposed to a PR if I can make it work?
from active_reporting.
Related Issues (18)
- Any plan to support mongoid? HOT 2
- Performance? HOT 2
- Support for multiple aggregations like sum and count together HOT 1
- Set custom name on dimension HOT 1
- Implicit hierarchies with datetime columns on model relations HOT 7
- Allow datetime hierarchies with date fields too
- Change Mini Test by Rspec + FactoryBot + Dummy App
- Possibly incorrect code example in wiki HOT 1
- avoid using Order as an object name in the documentation HOT 1
- default dimension_filters HOT 2
- Consider null values ββwhen group by dimension HOT 2
- Support for weighted Average HOT 1
- FactModels Table HOT 5
- Color coding rows in the report HOT 2
- sample rails app to test HOT 2
- [FAQ] has_many relationships do not work HOT 2
- [FAQ] reports_kit vs active_reporting vs datagrid HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from active_reporting.