Giter Site home page Giter Site logo

Comments (13)

Stiivi avatar Stiivi commented on May 18, 2024

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.

cwarden avatar cwarden commented on May 18, 2024

I recommend ccc for an open source visualization solution.

from cubes.

ovnicraft avatar ovnicraft commented on May 18, 2024

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.

Stiivi avatar Stiivi commented on May 18, 2024

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.

ovnicraft avatar ovnicraft commented on May 18, 2024

I am agree, so you gives

presenter = cubes.presenter("flotr2", options ...)

to allow modularity in UI libraries ?

from cubes.

ovnicraft avatar ovnicraft commented on May 18, 2024

@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.

Stiivi avatar Stiivi commented on May 18, 2024

@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.

Stiivi avatar Stiivi commented on May 18, 2024

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.

Stiivi avatar Stiivi commented on May 18, 2024

Another interesting JS charting library: Rickshaw

from cubes.

ovnicraft avatar ovnicraft commented on May 18, 2024

I am agree with you about JSON-fied object, so Presenter class must be implement a json method to return ?

from cubes.

Stiivi avatar Stiivi commented on May 18, 2024

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.

Stiivi avatar Stiivi commented on May 18, 2024

Another lib: nvd3

from cubes.

claudiobertoldi avatar claudiobertoldi commented on May 18, 2024

What about http://dojotoolkit.org/

from cubes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.