Comments (13)
Looks like presenter will need also cut (for constructing URL links), browser (for additional queries, if necessary, like getting details) and cell detail (to form table headers).
queries
in report(report)
might contain key presenter
to format the query to desired JSON structure (if presenter returns JSON-tranformable object)
from cubes.
I recommend ccc for an open source visualization solution.
from cubes.
We can consider too http://www.humblesoftware.com/flotr2/ is a good library for data visualization and shows you data in table and allows you to download data from graphics.
from cubes.
both (ccc and flotr) look useable. the HTTP API might be simple format=flotr2, what about python interface?
result = browser.aggregate(...)
presenter = cubes.presenter("flotr2", options ...)
chart = presenter.present(result, type="pie", ...)
what do you think about this?
from cubes.
I am agree, so you gives
presenter = cubes.presenter("flotr2", options ...)
to allow modularity in UI libraries ?
from cubes.
@Stiivi when you say:
presenter = cubes.presenter("flotr2", options ...)
chart = presenter.present(result, type="pie", ...)
What contains chart ?, in if we got 2 layers python + JS side we need to response to JS side with JSON so would be better if just dumps result with presenter.
from cubes.
@ovnicraft - you are right. chart
should in fact be flotr2 representation of a chart (data structure that you directly pass to flotr2 libs). For example, *Presenter objects for JS charts should return objects that can be used by JS libraries, if the lib expects JSON, then it should be JSON. The two steps you mentioned have a reason:
presenter = cubes.presenter("flotr2", options ...)
chart1 = presenter.present(result1, type="pie", ...)
chart2 = presenter.present(result2, type="bar", ...)
chart3 = presenter.present(result3, type="line", ...)
I would prefer presenter to return an object that can be JSON-ified (not JSON string), so you can request multiple presentations with one request (for example, for whole report page).
What do you think?
from cubes.
Used cubes.create_presenter()
instead of just cubes.presenter()
to denote that new instance of presenter is created instead of reusing and reconfiguring existing one.
from cubes.
Another interesting JS charting library: Rickshaw
from cubes.
I am agree with you about JSON-fied object, so Presenter class must be implement a json method to return ?
from cubes.
It does not have to (see "text_table" presenter), but for most use cases it is going to be implemented as JSON. Result object should be displayed by caller by no minimal transformation effort at all, or just very minimal.
from cubes.
Another lib: nvd3
from cubes.
What about http://dojotoolkit.org/
from cubes.
Related Issues (20)
- Outer detail method not works HOT 1
- Attributes not generated in slicer denormalize
- Enhancement - manage sparse fact tables
- Question: export/save the cube(s) from a workspace
- GUI to generate and edit model and ini (sql)
- No module named slicer HOT 1
- Logs in a file
- name 'cell' not recognized
- Define cube key
- sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked HOT 1
- Workspace.close() is not implemanted HOT 1
- AttributeError: 'Subquery' object has no attribute 'count' - Hello world example HOT 2
- Errors with latest version of SQL Alchemy HOT 1
- cubes.errors.MappingError:Unable to find detail key (schema None) "date"."id"
- Documentation on nested joins
- ModuleNotFoundError: No module named 'model'
- ArgumentError: List of aggregates should not be empty
- sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) missing FROM-clause entry for table "anon_1"
- How can I use the cubes and sum a json column?
- On prepare_data.py: cannot import name 'Mapping' from 'collections'
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 cubes.