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

Ordinal scale inversion #598

Closed
wants to merge 1 commit into from
Closed

Ordinal scale inversion #598

wants to merge 1 commit into from

Conversation

jasondavies
Copy link
Contributor

For use with d3.svg.brush e.g. for brushing histograms with ordinal scales. This is a very simple implementation; ideally we want to take into account the current type of range in use.

If I'm headed in the right direction, I'd be happy to improve it and add tests. :)

@mbostock
Copy link
Member

Hmm. I'm not sure this is a good idea; the brush makes more sense with quantitative scales. There's an example using a brush with an ordinal scale, but normally I think of toggling individual values rather than selecting a range.

@jasondavies
Copy link
Contributor Author

Hmm, good point. Closing for now, in that case.

@BenMakesGames
Copy link

ordinal scale inversion is exactly what I need for mouse interaction with bar charts. I'll definitely add this little patch to the copy of d3 we're using for our project.

@cherdarchuk
Copy link

Ordinal scales where this would be really handy:
low, medium, high
bottom, middle, top
alpha, bravo, charlie, delta, echo

@deanmalmgren
Copy link
Contributor

I was just making a parallel coordinates chart like this one and to look at correlations between ordinal data sets. Was a little disappointed that this feature didn't move forward as scale inversion would have made this much easier.

@mbostock Is there an example for 'toggling distinct values'? I haven't run across this example yet and it would be pretty helpful in this case. [now that I've declared that I haven't seen this example yet, I will almost certainly find it soon and update this thread accordingly]

@SalahAdDin
Copy link

What's about this man?

@curran
Copy link
Contributor

curran commented Jun 10, 2016

This issue has been superceded by this other one d3/d3-scale#60 There you can find an active effort towards this by @jheer and @mbostock .

It looks like ordinal scale inversion will land in D3 4.0.

@curran
Copy link
Contributor

curran commented Jun 10, 2016

Also here's an example that pretty much does invert an ordinal scale:

http://bl.ocks.org/mbostock/4349509

@onursagir
Copy link

@curran inverting still seems absent, has this been implemented another way?

@curran
Copy link
Contributor

curran commented Nov 11, 2021

What do you mean? What would the semantics look like? What function is expected and what would be the input and output in particular?

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

Successfully merging this pull request may close these issues.

None yet

8 participants