Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bars sizes are rounded and don't take the whole chart area #840

Closed
constgen opened this issue Jan 23, 2020 · 10 comments
Closed

Bars sizes are rounded and don't take the whole chart area #840

constgen opened this issue Jan 23, 2020 · 10 comments

Comments

@constgen
Copy link

Bars lines in Bar chart do not cover all area of a chart (SVG element). Their sizes are rounded. That's why we can see gaps on the left and right. This screenshot shows this issue comparing Histograms with Timeline

Screenshots
image

To reproduce this you can use for example width=200 and 92 child items

Expected behavior
Bars should take all space from left to right. The dimensions are integers <g transform="translate(8, 20)">. But float numbers are expected

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Firefox
  • Version 0.61.1
@constgen
Copy link
Author

The proposed PR fixes the issue. Now Histograms look correct
image

Demensions look as expected <g transform="translate(2.150537634408602, 14)">

@ghost
Copy link

ghost commented Jun 30, 2020

👍
maybe make this an option

@constgen
Copy link
Author

Maybe not. Because coordinates on all other charts are float numbers

@stale
Copy link

stale bot commented Oct 29, 2020

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 stale bot added the stale label Oct 29, 2020
@constgen
Copy link
Author

bump

@stale stale bot removed the stale label Oct 29, 2020
@wyze
Copy link
Contributor

wyze commented Nov 1, 2020

@constgen Can you provide a CodeSandbox demonstrating above, or close to it, so I can check it out against your proposed PR please?

@constgen
Copy link
Author

constgen commented Nov 2, 2020

I will try

@wyze
Copy link
Contributor

wyze commented Nov 12, 2020

Here is one that represents the issue: https://codesandbox.io/s/busy-violet-s19us

@constgen
Copy link
Author

@wyze
Copy link
Contributor

wyze commented Nov 18, 2020

This was added in #1282. You can use indexScale={{ type: 'band', round: false }}. This will be available in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants