holtzy / D3-graph-gallery

A collection of simple graphics made with D3.js
https://www.d3-graph-gallery.com
MIT License
789 stars 237 forks source link

Brush Functionality in Scatter plot. #94

Open ghost opened 1 year ago

ghost commented 1 year ago

Hi, I tried the given example of brushing in scatter plot. I created the plot with number values on x and y axis and added the brush into that. In this case brushing works properly. Below is the code and gif for the same.

`<!DOCTYPE html>

` ![numberScrub ](https://user-images.githubusercontent.com/84004504/221146945-4b3351d4-4eb7-4bda-b922-11968746fc17.gif) After that I created the plot with string data that is on y axis added the string values. But in this case the brushing is not works properly. In the number values plot when we extent the brush in small portion it adds the brush but in the string case when the brush extent to small it will not add brush and when we extent to large portion then it will add. So we get an wrong behavior in string values. Below is the code and gif for the same. `
` ![stringScrub ](https://user-images.githubusercontent.com/84004504/221148526-b9e0eca8-8fc5-473a-b9d5-430848253238.gif) So can you please provide an sample example of string values for scatter plot creation with brushing functionality.