Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more than one set of data being expressed in one graph #66

Open
marimeireles opened this issue Oct 23, 2020 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@marimeireles
Copy link
Member

marimeireles commented Oct 23, 2020

You should be able to do an N number of queries and get each one of these results expressed in one graph with them overlaying each other.
A way to achieve this is allow the user to choose which column they want to show to each graph...
The current syntax is: %XVEGA_PLOT X_FIELD Level Y_FIELD Hitpoints MARK area WIDTH 100 HEIGHT 200 <> SELECT Level, Hitpoints FROM players
Could be changed for something like: %XVEGA_PLOT COLUMN Character VALUE Wizard MARK area COLOR red, VALUE Warrior COLOR blue MARK line X_FIELD Level Y_FIELD Hitpoints WIDTH 100 HEIGHT 200 <> SELECT Character, Level, Hitpoints FROM players

@marimeireles
Copy link
Member Author

marimeireles commented Oct 27, 2020

These should probably be renamed for the names the Vega API is using.
I think vega offers an API for having two graphs? Maybe it's possible to do with these offsets?

            // Fill in Position and Offset Properties
            serialize(j, x(), "x");
            serialize(j, x2(), "x2");
            serialize(j, width(), "width");
            serialize(j, height(), "height");
            serialize(j, y(), "y");
            serialize(j, y2(), "y2");
            serialize(j, xOffset(), "xOffset");
            serialize(j, x2Offset(), "x2Offset");
            serialize(j, yOffset(), "yOffset");
            serialize(j, y2Offset(), "y2Offset");

@marimeireles
Copy link
Member Author

Character Level HP
Wizard 1 10
Wizard 2 15
Warrior 1 40
Warrior 3 200

This would generate two lines in the graph visualization.

@marimeireles marimeireles added the enhancement New feature or request label Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant