plouc / nivo

nivo provides a rich set of dataviz components, built on top of the awesome d3 and React libraries
https://nivo.rocks
MIT License
13.08k stars 1.02k forks source link

Line Layer over Grouped Bar Chart #2017

Closed sharaku17 closed 1 year ago

sharaku17 commented 2 years ago

Hi Guys,

I am trying to achieve a Line Chart over a Grouped Bar Chart. I followed the example in an older issue that I found here, which is shown in this CodeSandbox This is also working but I have a Problem when I use Grouped Bars and add a new entry in the "Keys" Array for the Bar. The Line gets manipulated and behaves incorrectly ( The first and last point of the Line get connected) as soon as the Bar chart is using the Grouped mode.

It looks like this: Screenshot 2022-05-26 160710

Any Idea how to solve this?

plouc commented 2 years ago

@sharaku17, it's hard to tell without seeing the code, Can you please share the new sandbox?

stale[bot] commented 2 years ago

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[bot] commented 1 year ago

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!

msolano00 commented 1 year ago

@plouc here is an example: https://codesandbox.io/s/nivo-bar-extra-layers-forked-xg3xkf

That being said, I did found an example of a working hack. The developer here is super-positioning two individual bar and line charts: https://codesandbox.io/s/practical-pare-6oq93n