-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Bottom margin only for stacked columns #781
Comments
Hi @ivanleong, with |
@Gowsky Thanks, that fixed it! However when i use |
@Gowsky I just need to shift all the columns (stacked) off the bottom axis by x amount. Similar to this graph. It works for a single stack but it gets uneven on multiple stacks |
You are actually shrinking the bottom one.
It doesn't work at all. The columns become shorter than they should be based on the data. What you are looking to do relates to the y range. For example, in the picture, the minimum y value is effectively less than 0. You can't do this with margins as they are unrelated to the chart data. You can adjust the y value range by using |
@Gowsky Great thanks that seemed to work but unfortunately when i used |
You can solve this by calculating the y range dynamically based on the length of the default. All the required information is passed to override fun getMinY(minY: Float, maxY: Float, extraStore: ExtraStore) = minY - (maxY - minY) * .1f |
Vico v2.0.0-alpha.22 fixes the bug with the margins. Cheers! |
How to reproduce
Set 2 series with mergeMode set to Stacked. Apply bottom margin to bottom line component only:
Observed behavior
Both series showing bottom margins
Expected behavior
Only bottom series to have bottom margin
Vico version(s)
2.0.0-alpha.21
Android version(s)
13
Additional information
No response
The text was updated successfully, but these errors were encountered: