Giter Site home page Giter Site logo

Support custom values about chartbrew HOT 5 CLOSED

justmiles avatar justmiles commented on May 20, 2024
Support custom values

from chartbrew.

Comments (5)

justmiles avatar justmiles commented on May 20, 2024 1

Using count(*) may have not been the best example because the count also returns the number of records. What I'm hoping for is to set the y-axis value in the SQL itself. A better example might be to use an AVG, SUM, or even an existing column.

SELECT role_name, avg(age) as y_axis FROM users

The "setup the fields" page is effectively selecting the column to use on the x-axis, with the y-axis being the count of instances for that column. The ability select a column that overrides the y-axis drastically increases what these charts can visualize.

from chartbrew.

razvanilin avatar razvanilin commented on May 20, 2024 1

Just a quick update that this feature is being worked on in #57

Not planning to add field selection through the SQL query just yet. Will have to experiment with that after the new updates

from chartbrew.

razvanilin avatar razvanilin commented on May 20, 2024

Your example is currently supported through the pattern charts that are available for all the charts except Line.

If you query your data with SELECT role_name FROM users you can select the role_name field and then you will be able to see how many roles of each type you have in your data.

I agree it's a bit confusing at the moment, but this part will be re-worked soon. Also, time filtering is not yet available for pattern charts, but it's the next big thing that's on my list of development 😁

Let me know if my quick guide above didn't make sense so I can offer a better explanation.

I'm assuming you want to create something like this, right? 👇

from chartbrew.

razvanilin avatar razvanilin commented on May 20, 2024

Gotcha! I'm planning to work on offering more customizability for Beta.13. The "Setup the fields" page will be revamped to offer the option to select custom fields on top of the date. I will also experiment with queries like the one you mentioned to see how I can design the UI for that kind of scenario.

The idea of selecting the axis from the SQL query is interesting and can definitely be placed in the ideas list. I'll add this issue there to keep track of it.

Thanks a lot for the suggestion and let me know if you come up with similar ideas or ways you'd like to use Chartbrew. It really helps! 😁

from chartbrew.

razvanilin avatar razvanilin commented on May 20, 2024

This is now implemented in Beta 13

from chartbrew.

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.