-
Notifications
You must be signed in to change notification settings - Fork 187
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
Tips are chaotic on compound marks #1835
Comments
100% |
Another place where I've run into this chaotic-tips phenomenon in the context of nested data, e.g. when data looks like this: data = [{name: "Series A", points: [{ x, y }, ...] }, { name: "Series B", points: [{ x, y }, ...] }, ...] One way to plot this data as a multiple-line time series is to transform the data into a single array of data.map(series => Plot.line(series.points, { x: 'x', y: 'y', z: () => series.name }) Buti including tips with this second approach causes the same sort of chaotic occlusion as in the screen recording since the individual line marks each have their own tip. I wonder if |
I don’t think that would work well, since Plot.marks would just pick one of the composite marks arbitrarily for the tip, and I don’t think that’s what you want. The only way to do it would be to combine the series into a single line mark. |
Reclassifying this as an enhancement since it’s the documented behavior (“options are passed through to these underlying marks”) but still think we should change it to only pass the tip mark through to one (or none) of the marks, or maybe add a new invisible mark just for the tip. |
When you pass
tip: true
to boxX, I think it passes it on to each of its constituent marks, which results in chaos (demo):Screen.Recording.2023-08-25.at.11.05.52.AM.mov
I noticed this when playing with adding box to Plot.auto (#1423), which automatically sets tip: true. But what would I expect? It's a little hard to say. I guess I'd want one tip that lands on a point for each quartile, and maybe for the outliers. Maybe this just means compound marks should ideally sometimes intercept the tip option and implement their own tip instead of passing the option through to each of their marks.
The text was updated successfully, but these errors were encountered: