ngx-charts icon indicating copy to clipboard operation
ngx-charts copied to clipboard

Round the individual bars up

Open kallebjork opened this issue 3 years ago • 7 comments

What kind of change does this PR introduce? (check one with "x")

  • [x ] Bugfix

What is the current behavior? (You can also link to an open issue here) Small gaps appear between bars in stacked bar chart. The scale function works with fractions. Since those fractions are used to set height and y for bars, we end up with fractions of a pixel. It is then up to the browser to round it and browsers do that differently. If bar #1 is rounded down and bar #2 is rounded up, we get gaps. Issue: https://github.com/swimlane/ngx-charts/issues/892

What is the new behavior? To round all of the bar heights up, since the scale function works with fractions.

❗ Please consider if this is the way to go or if you rather want to move towards scale functions not working on fractions. If so then this PR should be scrapped.

Before image

After image

Does this PR introduce a breaking change? (check one with "x")

  • [ ] Yes
  • [x ] No

kallebjork avatar Jul 01 '20 14:07 kallebjork

Please merge this one..

rienk-git avatar Aug 04 '20 14:08 rienk-git

Hi !

I'm interested in this fix. Upvote for a merge 👍 😃

couaky avatar Jan 07 '21 14:01 couaky

Any updates on this one? Would be super useful if this could be merged!

If maintainers have changes required could they please comment so we can implement.

hill avatar Mar 29 '21 00:03 hill

Upvote for a merge

cgo123 avatar May 17 '21 14:05 cgo123

Any update on this?

apoorvsukumar avatar Jun 06 '23 17:06 apoorvsukumar

Any update on this? When will this me merged. I am using this in my project and this is affecting my page view.

MubasheerHaq avatar Jun 14 '23 17:06 MubasheerHaq

Update on the issue please.

gregkaczan avatar Oct 05 '23 14:10 gregkaczan