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.22k stars 1.03k forks source link

Bar charts with time scale #1913

Open twiddler opened 2 years ago

twiddler commented 2 years ago

Is your feature request related to a problem? Please describe. I'd like to let ResponsiveBar know that the x-axis is a time scale, so that it automatically calculates a sensible amount of ticks and their positions without them overlapping.

RIght now, this is not possible. There is no way to make the x-axis of ResponsiveBar be a time scale. As a result, the component interprets the tick values as simple strings, and thus adds a label to each bar. This creates lots of labels that overlap if the series is long enough.

Describe the solution you'd like I'd like to set the x-scale format to time, similar to nivo line charts as in https://nivo.rocks/storybook/?path=/story/line--time-scale.

Describe alternatives you've considered The only solution I have found is to calculate the tick positions axisBottom.tickValues myself.

Additional context This issue has also been discussed in #407 and #283.

MA-MacDonald commented 2 years ago

I think this would be awesome to have. This is really the only thing preventing me from switching to Nivo from Apex.

It seems like most of the big charting libraries support this as well. (Apex Charts, ChartJS , ..etc)

Carnageous commented 2 years ago

Is this feature considered? Right now we have to prepare the chart data ourselves using d3 time libraries etc. to make it kind of work, and this feature would make our lives so much easier!

karesztrk commented 2 years ago

What alternative do you recommend if a Bar chart is not the way to go to display time-based series?

CoolTechYT commented 1 year ago

Any updates?

Nanak360 commented 1 year ago

Any updates on this issue? If not I can start working on it

plouc commented 1 year ago

@Nanak360, I'm not planning to work on this in the near future, I have other things I'd like to accomplish with the limited time I have to work on the project 😅

sebastienbarre commented 1 year ago

This would be great to have; meanwhile, somebody found some workaround: #1395