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

Use Vega-Lite layering to support tooltip on line charts and area charts #1

Closed
light-and-salt opened this issue Feb 28, 2016 · 6 comments
Milestone

Comments

@light-and-salt
Copy link
Contributor

Currently tooltip for line chart does not report correct data because data is bound to path, not to points. In the screenshot below, price should be a number around 200 and date should be in human-readable format (that's another issue).
screen shot 2016-02-28 at 1 17 04 pm

@kanitw
Copy link
Member

kanitw commented Feb 29, 2016

This will be partially addressed by fixing vega/vega-lite#508, but we should wait until we have layering support first.

@kanitw
Copy link
Member

kanitw commented Mar 2, 2016

One thing that we can do now is

  • from the item parameter we get. Is there a way to know that the mark is a line, then we can drop quantitative values?

@kanitw kanitw added this to the 1.0 milestone Mar 2, 2016
@light-and-salt
Copy link
Contributor Author

Partially fixed in PR #16, which only displays qualitative fields for line charts and area charts, and gives warnings in the console.

@kanitw
Copy link
Member

kanitw commented Apr 4, 2016

Hmm. If it is partially fixed and should be further fixed, I don't think we should close it.

@kanitw kanitw reopened this Apr 4, 2016
@light-and-salt light-and-salt changed the title Tooltip for line chart does not show correct data Use Vega-Lite layering to support tooltip on line charts and area charts Apr 19, 2016
@light-and-salt light-and-salt modified the milestones: Later, 1.0 Apr 19, 2016
@light-and-salt
Copy link
Contributor Author

Dropping quantitative fields does seem to solve the problem for the line_color example we have above, but if the stocks.csv data set contains some additional qualitative fields, shouldn't those fields be dropped too? An additional field's value will vary for a line/area mark, but before we add layering support, tooltip will only pick up one datum for a line/area mark, which may be inaccurate.

As a better partial fix, we may drop fields in the x and y channels and only show fields in the other encoding channels (typically color). In this way, if a qualitative field is not used for encoding, it will not show up in the tooltip.

I am writing down this thought for logging purpose. I know we will have layering really soon, so we may not even need to implement this "better partial fix" -- we may go straight into "using layering to properly show all fields" for line charts and area charts.

I wrote down these thoughts as comments in PR #16.

@light-and-salt
Copy link
Contributor Author

Close via #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants