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

Feature (or example) request: Brush #32

Open
jfsiii opened this issue Aug 22, 2017 · 42 comments
Open

Feature (or example) request: Brush #32

jfsiii opened this issue Aug 22, 2017 · 42 comments
Labels

Comments

@jfsiii
Copy link

jfsiii commented Aug 22, 2017

This is a common, but often challenging, interaction. It'd be great to see how it should work in nivo.

@guzmonne
Copy link

I created a simple line chart with a brush using nivo components. I didn't create a pull request since I had to do some hacked actions to make it work.

  1. I had to add a new child component called Brush inside the Line component.
  2. I added three new props to the Line component that are then passed to the Brush component. Two to set the initial Brush position, and a callback to call onBrush.
  3. I had to modify the SvgWrappercomponent to provide a handler to each children, that gives them access to a ref of the parent svg component. I needed this ref to convert mouse coordinates to svg coordinates.

Do you approve of these API modification, or would you do things differently. I can generate a pull request from your comments if you want.

@IonicaBizau IonicaBizau mentioned this issue Jan 25, 2018
@stahlmanDesign
Copy link

@guzmonne this is great. Your description and examples of 'hacked actions' to make this work are helpful for understanding how to customize or enhance Nivo.

Here's what I was thinking of doing with a stacked bar chart. I've seen this before with D3 but wasn't sure how to bring it to Nivo:

capture d ecran 2018-02-18 a 20 47 48

@guzmonne
Copy link

I believe you could accomplish it with nivo by extending the Bar components to handle child components, or hacking it like I did with the Line component.

I published a medium article explaining how I did it, and the shortcomings of my method.

@MarcMagnin
Copy link

Great work @guzmonne!
I've just noticed this issue while I was exposition such feature in a 'zoom' related issue.
I'm thinking about the same "generic" kinda brush feature that would simply return the range (start/end) of the selected data to be able to do whatever you want with it such as this sample from highcharts:
https://www.highcharts.com/demo/line-time-series

Having a generic simple capability to select an area by dragging dropping the mouse to act on it is a top feature.

@ghost
Copy link

ghost commented Jan 3, 2020

@guzmonne this is great. Your description and examples of 'hacked actions' to make this work are helpful for understanding how to customize or enhance Nivo.

Here's what I was thinking of doing with a stacked bar chart. I've seen this before with D3 but wasn't sure how to bring it to Nivo:

capture d ecran 2018-02-18 a 20 47 48

can I get your code for bar chart with nivo-brush-zoom its too urgent for me please

@ghost
Copy link

ghost commented Jan 3, 2020

@stahlmanDesign please share your code for bar charts nivo-brush-zoom. please its too urgent

@stahlmanDesign
Copy link

Sorry, I never moved forward with this so I don't have a working solution. I am still interested if someone is able to make it work.

@ghost
Copy link

ghost commented Jan 3, 2020 via email

@stale
Copy link

stale bot commented Oct 29, 2020

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Oct 29, 2020
@sattuchin
Copy link

This feature would be very useful. Please prioritize when possible. Thank you!

@stale stale bot removed the stale label Nov 3, 2020
@wolasss
Copy link

wolasss commented Dec 29, 2020

I agree, this is needed

@RafaelZamoraBallerTV
Copy link

bump

@asherccohen
Copy link

Bump

@Ynng
Copy link

Ynng commented Mar 4, 2021

bump

2 similar comments
@nico-hernandez
Copy link

bump

@shockhs
Copy link

shockhs commented Apr 5, 2021

bump

@swest06
Copy link

swest06 commented Apr 9, 2021

Can someone explain how to do this with the responsive heat map.

@yuqian5
Copy link

yuqian5 commented Apr 30, 2021

Very essential features for mobile viewing support. Bump.

@stale
Copy link

stale bot commented Jul 29, 2021

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Jul 29, 2021
@kbzowski
Copy link

bump

@stale stale bot removed the stale label Jul 29, 2021
@lm93547
Copy link

lm93547 commented Sep 28, 2021

bump

1 similar comment
@AmalRichwin-AT
Copy link

bump

@Kvodnon
Copy link

Kvodnon commented Oct 29, 2021

bump

@stale
Copy link

stale bot commented Jan 27, 2022

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Jan 27, 2022
@wolasss
Copy link

wolasss commented Jan 28, 2022

bump

@stale stale bot removed the stale label Jan 28, 2022
@natBizitza
Copy link

Bump

@stale
Copy link

stale bot commented Jul 30, 2022

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Jul 30, 2022
@wolasss
Copy link

wolasss commented Jul 30, 2022

bump

@stale stale bot removed the stale label Jul 30, 2022
@JavaScriptJohn
Copy link

bump

1 similar comment
@umble
Copy link

umble commented Sep 28, 2022

bump

@bjorn-bakken
Copy link

Is this still stale? Would be very handy.

@stale
Copy link

stale bot commented Mar 11, 2023

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Mar 11, 2023
@wolasss
Copy link

wolasss commented Mar 11, 2023

bump

@stale stale bot removed the stale label Mar 11, 2023
@RajaTheKing826
Copy link

BUMP

@xuoutput
Copy link

bump

2 similar comments
@PawelGIX
Copy link

PawelGIX commented Jul 5, 2023

bump

@DKeken
Copy link

DKeken commented Jul 17, 2023

bump

@lights-a5
Copy link

Bump.

@van-for-days
Copy link

bump

3 similar comments
@huang7017
Copy link

bump

@suchitemedica
Copy link

bump

@sidpremkumar
Copy link

bump

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

No branches or pull requests