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

Range bar chart #2140

Closed aduarterengifo closed 1 year ago

aduarterengifo commented 1 year ago

It would be great if the bar component worked with ranges.

So you could pass it data like this:

    const data =
        [{
            donut: [-10,10],            
            user: 'toby',
        }, {
            donut: [3,30],
            user: 'george',
        }]

to make a range range bar chart.

I tried using the diverging bar example to hack something together but I couldn't get it to work.

stefanroeck commented 1 year ago

+1 This would allow time-series barcharts like this one https://apexcharts.com/react-chart-demos/timeline-charts/basic/

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

faahim commented 1 year ago

Ah yeah! This looks like exactly what I'm trying to achieve!

I'm trying to create a chart like this one:

But I'm not too sure if it's doable with Nivo currently. It seemed like the diverging stacked chart will do it, but turns out, it always assumes the centre of the diverging point to be in the middle. Doesn't work well when working with time series. This is what I currently have:

Screenshot 2023-02-20 at 12 34 38 PM

I need to start from 10 PM and go up to 2 PM, so 0 is not the centre. Any idea if Nivo is capable of doing this? Or should I move on?

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

ivan-sparq commented 5 months ago

bump

Zhuohui-Li commented 1 month ago

Any update?