Closed egeozin closed 7 years ago
I've fixed this. Will push an update in the morning.
ah good bc I have been looking at it for the past half hour trying to understand the problem! 😌
Discrepancy fixed in c75e9c4, but after deselecting the final tag in busTypes/instaTopics chart, brush is still there but without filtering the cells on the map.
You have to move the brush to start refiltering correctly.
@Kallirroi , do you know how to remove the brush at any time on dc charts. That might be useful in this context
maybe this can help? https://github.com/dc-js/dc.js/issues/151
@Kallirroi , that didn't help, but if we can solve this the big problem will end.
I will work on implementing the Case Studies and will return to this and OBI later.
To be more specific:
https://github.com/dc-js/dc.js/blob/master/web/examples/replacing-data.html
But, unfortunately, this produced some(mostly around 40) rect - NaN errors, although we were able to get the pre-filterCells-function/tag-selection filters on dc charts.
I would not recommend going this route, as a more trained eye will notice those errors on chrome inspector, and it will not look fun.
One more idea on this (that is most likely to work):
Keep the old configuration, make brushes look weird when brushed and tag selected but find a way to bind originalData to charts dimension when deselecting all tags.
Fixed in e55e0a5
@Kallirroi if you have time, an extra hand/mind would help me a lot. I have a question for you in the end.
So our probably last major challenge,
[1] When a brush is selected in any of the dc charts, [2] and a particular business type or instagram topic is repetitively selected and deselected a couple of times (try 4 or 5),
selecting and deselecting 3 times:
selecting and deselecting 5 times:
a. the dc charts y-axis scale changes b. the data within the brush range doesn't change but because the scale of the unbrushed bins change we only see the bins in the brushed range reduce in size to the point where they become barely visible.
[3] When the brush is released from that dc chart, the data looks skewed and the number of cells show mistakenly large number for example for SanJose, it shows 16 095 cells after selecting and deselecting a business type repetitively for 5 times.
[4] The data becomes normal when no brush is selected in any dc chart but a business type or an instagram topic is selected and deselected. Because what happens here is we bind the original data(the one that is not filtered with anything) to window.ndx.
Possible solutions:
This records the previous filters on a dc chart and reapplies them after ndx.remove() but before ndx.add() . I've tried this but some cells were not able to be assigned to something so this " NaN" errors proliferated(around 36 errors,) but everything looks like how we wanted to be.
Find a way to reapply the original data to dc chart after filterCells update (Any ideas on this @Kallirroi)
Disabling selecting brushes before selecting a type or topic tag but enabling after selecting a type or topic tag . (Which is a little weird to ask from people)