c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.35k stars 1.39k forks source link

Bar items don't resize #1254

Open JosephOR opened 9 years ago

JosephOR commented 9 years ago

Hi,

I have a timeseries barchart with 30 items on it. when I use the range function to set a min and max(date picker option) the bars on the chart stay the same size. so if I select a 4 day range I end up with 4 bars only a few pixels wide spread over the whole distance of the chart. Is there a way to grow and shrink the bars so they always have the same gap between each bar?

another small thing I noticed that might be of use, the legend text on my chart was being cutoff due to an overflow:hidden on the chart. After spending some time I noticed that on the main div for my page I had letter-spacing set to 1. this set the legend text to have to same spacing and therefore ran off the page, might be worth defaulting that in the css as it was tricky to find.

cheers, joey

elnino1 commented 9 years ago

Hi, I think your bar width issue is related to mine (#1241). Have a try with version 0.4.9, it does the trick for me. I also use date pickers to change chart range and in some cases it is required to flush or rebuild the chart to get the rendering as expected.

DanielApt commented 9 years ago

Seeing this issue as well, v0.4.10 introduces this bug.

aendra-rininsland commented 8 years ago

This has been irritating me all week. I might PR it if I get a chance tomorrow. Confirming as bug.

teameh commented 7 years ago

Any news on this one?

iloveluce commented 7 years ago

Are there any known workarounds for this issue?