-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add support for biaxial charts #172
Comments
Hello, For now, it's not, the only way to achieve this will be to stack 2 charts and hide x-axis for one of them, really hacky :/ There's an ongoing work on scales to be able to support multiple scales (and axes), but it requires a lot of work and unfortunately I don't have any time left for my side projects for now. |
Oh, bad news! I really like how Nivo looks. Thank you so much for your work! |
@dragosdydy did you manage to accomplish the biaxial chart with this hacky solution? and if yes, how? |
@stephanoshadjipetrou not really, in the meantime I switched to another library with more options for advanced data viz (amCharts), but not so beautiful as nivo. |
@plouc Hi again :) In order to implement this bi-axial feature does it depend on some other libraries modifications/additions or this could be done "right away" in the @nivo/line package? Thanks |
@plouc - just wondering if you have any plans or that we can plan together on the implementation of this feature? Once we have some kind of plan based on the idea, we could potentially draw up some ETA's and see how has time to do what. We would like to contribute back and this seems like a proper contribution depending on time etc. When you talk abt 'a lot of work' could you define that a bit more? As in 30 hours lots of works or 30 days? |
@plouc will this issue be re-opened? |
I wonder if this could be achieve with the Layers api? |
@wyze, this could be implemented using the layers API, but with a lot of manual work. |
Ok @plouc thanks for the update and thanks for re-opening this ticket. Can we make a little plan for this, like a 'plan project' https://github.com/plouc/nivo/projects ? That way we can start some backlog of desired functionality and the steps toward adding that support. We @zimmerman-zimmerman are happy to invest resources into this part, seeing we will most definitely make use it. Team member @stephanoshadjipetrou will also be happy to chip in here. Awaiting your humble next steps. |
I would really like to see this feature implemented. A lot. Wish I could build it. |
Hi @plouc could you start a Project, so we can plan around that work? Or you have other ideas to manage this work? |
This would be super awesome. I currently have two charts on top of one another but this breaks the crosshair and legends. and trying to fix these is making my head hurt lol +1 to letting @zimmerman-zimmerman have a go at a fix 💃 |
Hi @siemvaessen - just wondering if you made any progress on the biaxial chart? I looked through PRs and didn't see anything so thought I'd ask. Thanks! |
Hi @plouc, Do we have any update on biaxial support?. I need to have a line chart with 2 x-axis (top and bottom). The top x-axis would represent Jan to December 2019 and the bottom x-axis would represent Jan to December 2020. Is this something doable with Nivo at least a little bit of customization? It would be really great if you could provide some pointers to achieve this |
@premuditha - same here, would be great to see if it's possible. |
I was using it, but because of this I required to change to some other framework, I hope this get done some day or have the time and knowledge to do it by my self and push it. |
i'm also in need of this feature .. where would i find information/documentation about the layer api? |
I'll add my voice to the chorus. Would love to see this added. If not that, if anyone has successfully done the hack above, seeing how that was implemented would help a ton. |
This is how I hacked this. https://codesandbox.io/s/nivo-biaxis-chart-qv65c Just stacked two charts on each other. Seems to be working ok |
@plouc earlier you mention that figuring out an API that supports this might be the hardest part. These guys https://apexcharts.com/javascript-chart-demos/mixed-charts/multiple-yaxis/ have a solution... not sure but might be able to use some of the ideas from there. For the record.. but not advocating for anyone to switch to that lib... i had initially looked at it for a project but ultimately went with Nivo. Nivo has a more active community and more full featured library. |
Nice! Did you manage to get the tooltip to work for both lines? |
Works great, thanks! |
Building on @jmirick his solution, added a tooltip. With thanks to @stephanoshadjipetrou for coming up with the idea on how to chef this. https://codesandbox.io/s/pensive-jackson-q4rpj |
Nice! |
@DavidTawil you can have a bar chart as the first rendered chart (non-interactive), and pass its data to the second chart to find the y value at the hovered x point. The trick part would be to align the bars with the line dots... you can check a brief check did in codesandbox - https://uv0no.csb.app/ |
Hi, thanks for an effort, any news here ? Is there a plan to implement this future soon ? thanks |
In my case I needed a bar chart + line chart, the easiest solution was to create the line chart as an extra layer for the bar chart (I followed an example I found here) and manually draw the lines, tooltips and right y-axis legend (the ticks for the legend was the hardest part). |
@ginchauspe could you please share a link to the example you mentioned or a sinppet of how you implemented this and especially rescaled using d3.scaleLinear ? I have a similar problem. Thanks. 🙏 |
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! |
bump |
I would love to see a proper biaxial chart as well as I have a need for it too |
We are interested by this feature. |
Still interested. What about grouped biaxial bar charts? |
Hey guys I found this one here! The only problem is the crosshair. |
Hello, sorry for not responding before 🤦 here is the code of the component I created for this case, basically is just a layer that we add to the bar chart: https://github.com/devgateway/seeds-dashboard/blob/develop/ui/src/embeddable/chart/BarAndLineChart/index.jsx |
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! |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
Just want to add a bump for this if it's not too late. Thanks! |
bump |
Bump |
would love to see this implemented. |
Also manifesting interest for this |
bump |
Hello,
I have looked around, i have checked the docs, I can't still figure out how to do a biaxial line chart. I have added the axisRight, but it is possible to use different key for that axis ?
I am looking for something that Left Axis is the line chart for 1 value and the Right Axis is a line for other type of value.
It is achievable with Nivo? I could show some examples if needed.
Thank you.
The text was updated successfully, but these errors were encountered: