-
Notifications
You must be signed in to change notification settings - Fork 80
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
Any slider demos with graphs? #85
Comments
Hey there. It would be great to have a demo like that but that's not something that has come up before. Should be pretty doable. I don't think I would use another library for the that if it's just a bar chart. Most of those libraries are pretty bulky and you can just render the SVG with some odds and ends from D3. Here's a simple responsive bar chart in a sandbox: It needs some clean up but hopefully that helps. I think you just need setup the layout with the slider and grey out the bars that are outside the range but I'm not sure exactly how you want it to work. |
Also, if you want it to animate as the data is changing, that sandbox is based off a demo I did for react-move. You can see it here https://react-move.js.org/#/demos/node-group |
Thanks @sghall Your responsive bar chart, especially with the react-move demo, looks great! For now I'm using react-chartjs-2. I'll have a think about creating an Airbnb style demo with the demos you listed. Apart from a smaller build size, I like the idea of compound components a lot, even if it requires a bit more thought in how to render everything. |
@sghall I tried a few different chart libraries including https://github.com/recharts/recharts and your demo, but was struggling to get them to do what I wanted exactly. I ended up using react-chartjs-2 to create a very similar functional demo to the Airbnb screenshot above: |
Awesome. Looks pretty good to me. You going to keep that sandbox stable? Can I link to it in the readme? |
Yes I'll keep it stable. I've noticed the codesandbox URL takes a long time to load. Not sure if you find that too? Happy to migrate the code to somewhere else if that is helpful. |
Nice. Alrighty, link has been added to the readme. Also, linked to this issue so people can see the full discussion. Thanks! I wouldn't worry about the load time....codeSandbox is free and everyone knows it's not super fast. |
I think this is the exact range slider opensourced by AirBnb: https://github.com/airbnb/rheostat |
Hi @magician11 |
@siddhijain47 It's a screenshot from an internal system I built for a company. If you have any specific questions on it, I can see about sharing snippets of code. |
This is by far the best slider I have found for my project. I'm looking at adding a histogram similar to the way Airbnb has it
Any demos I've missed? Or any tips on how to implement this? Or recommended graphing libraries?
Thanks.
The text was updated successfully, but these errors were encountered: