Using React (Hooks) with D3 – [13] Filtering Visually (with Brushes, Part I)

preview_player
Показать описание
Code:

Website:

Hope you like it!
Рекомендации по теме
Комментарии
Автор

Hi Muri. I have watched all your videos from this React + D3.js playlist and I am currently coding along. I just needed to give you a big thank you for your amazing work and dedication. It helped me a lot. I am also a Front-end developer with a Design background, who found your videos super-useful. Please, continue your amazing work. Cheers! 👊

GoncaloGuitarist
Автор

Great video, helped me understand how brush works easily. Thanks mate.

hewang
Автор

I’ve seen them all and I’ve to say thank you very much for those great videos!! An extra video on advanced histogram will be great to know how to handle negatives values and also learning how to do histogram with rounded corners instead of rectangles would be awesome!

thibautlevesque
Автор

great content man, just what i needed

mllfll
Автор

Hi muri, I'm finding it difficult to wrap my head around the solution you have suggested to stop the infinite loop. From what I understand, we only want that block of code to be run once at the beginning, but the conditional statement is for if previousSelection is the same as selection, wouldn't this still cause the on 'start brush end' events to be triggered, thus setSelection to be called and the component to be re-rendered again? How does the if statement stop this loop?


Also in our .on(), the callback function where we are using setSelection(indexSelection), I tried to console log both selection and indexSelection to see if selection had been set to indexSelection but selection still shows as [0, 1.5] no matter how much we move the selection brush. This suggests setSelection isn't working but then it seems to be working when we use selection to differentiate the way our circles are rendered and when we display the values of the dots under the brush, how is this possible?

manajalali
Автор

Thank you so much for this video. But If possible, could you point me to the direction where I can find some example code about 2D brush on scatter plots? All the ones I found so far uses d3 v4 and 'selection', which d3 doesn't seem to support any more. Thank you again!

liujunyan
Автор

previousSelection is always NULL for me. explain???!!!!

dianadata