dc-js / dc.js

Multi-Dimensional charting built to work natively with crossfilter rendered with d3.js
Apache License 2.0
7.43k stars 1.8k forks source link

"Anti-selection" paradigm #586

Open bloer opened 10 years ago

bloer commented 10 years ago

A while back I made a d3 dashboard from scratch before I was aware of dc (which is awesome by the way). One useful concept I had that I think would really enhance dc is an anti-selection or multi-selection concept similar to combo boxes. .

It makes the most sense on bubble, row, or pie charts: With a left click, you select exactly one group, and ctrl-click adds or subtracts from that group. In principle you could do a shift-click to select a whole range for row charts, but it's hard to define a consistent axis for other chart types.

The main problem this solves is trying to select "all but n" of some group with a large number of elements. I think it shouldn't be too hard to detect the modifier keys using the shiftKey and ctrlKey methods of the event object.

gordonwoodhull commented 10 years ago

Yeah. Right now I believe it's hard-coded based on whether the axis is ordinal, what kind of selection happens. It would be nice to be able to select from a number of modes instead.

gordonwoodhull commented 10 years ago

Just to cross reference, this is part of what #601 does.

Thanks @bloer!