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

Zooming for ordinal charts #416

Closed
matthull opened this issue Nov 14, 2013 · 3 comments
Closed

Zooming for ordinal charts #416

matthull opened this issue Nov 14, 2013 · 3 comments
Labels
Milestone

Comments

@matthull
Copy link
Contributor

Currently mouse scrolling causes a series of errors on the box plot example if you enable mouse zooming. Looks like this is an issue with ordinal charts in general.

What is the expected behavior for mouse zooming on ordinal charts? Brushing is disabled if chart is ordinal - should zooming be disabled too?

@jrideout
Copy link
Contributor

Brushing is disabled if chart is ordinal - should zooming be disabled too?

I think it probably should be disabled. But then again we also have #348. Maybe we need a "focus" for ordinal charts that allows for arbitrary categorical filtering?

@matthull
Copy link
Contributor Author

So I could do ordinalChart.focus(["exp-2", "exp-4", "exp-5"]) and it would select just those three items? That could be useful - the one downside I see is that it is inconsistent with focus(rangeFilter) semantics of non-ordinal coordinate grid where focus always takes 2-element array as argument. But ordinal chart is a different kind of beast so probably that's OK...

Something to note - right now filter() getter for ordinal chart has weird behavior (only returns first selection after you click multiple items.) So it seems like both focus() and filter() need to be defined - perhaps filter() should just be an alias for filters() in ordinal chart.

One final thought - if I focus(["exp-2", "exp-4", "exp-5"]), perhaps it zooms in based on min/max of focused set and excludes "exp-1"? Not really useful for typical ordinal with small set of categories, but keeps ordinal chart behavior more consistent with non-ordinal and could be useful if someone wants to do a giant boxplot with associated range selection chart.

@gordonwoodhull
Copy link
Contributor

The new ordinal range/focus example demonstrates zooming on an ordinal chart, by mapping the keys to and from integers and using a linear scale.

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

No branches or pull requests

3 participants