nivo icon indicating copy to clipboard operation
nivo copied to clipboard

Bar charts with time scale

Open twiddler opened this issue 3 years ago • 7 comments

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.

twiddler avatar Jan 29 '22 16:01 twiddler

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)

MA-MacDonald avatar Feb 20 '22 01:02 MA-MacDonald

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!

Carnageous avatar Aug 30 '22 13:08 Carnageous

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

karesztrk avatar Sep 10 '22 10:09 karesztrk

Any updates?

CoolTechYT avatar Feb 07 '23 05:02 CoolTechYT

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

Nanak360 avatar Apr 19 '23 06:04 Nanak360

@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 😅

plouc avatar Apr 27 '23 11:04 plouc

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

sebastienbarre avatar May 02 '23 06:05 sebastienbarre