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

How to set spacing between bars on a BarChartDataEntry #4352

Closed
inigollamosas opened this issue Apr 28, 2020 · 1 comment
Closed

How to set spacing between bars on a BarChartDataEntry #4352

inigollamosas opened this issue Apr 28, 2020 · 1 comment

Comments

@inigollamosas
Copy link

Hi. I am trying to create a HorizontalBarChartView with multiple yValues per bar and some spacing between each yValue. On HorizontaBarChartRendererer, I have tried modifying the prepareBuffer() method, around line 170 (version 3.4.0) by simply adding some space:

barRect.origin.x = (k > 0) ? left + 10 : left

But I am obviously missing something. Did anybody achieve separation between yValues.

Many thanks.

@inigollamosas
Copy link
Author

If anybody ever comes with this problem: On HorizontalBarChartRenderer.prepareBuffer(), change y value when k > 0 :

y = (k > 0) ? posY + MySpacing : posY

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

No branches or pull requests

1 participant