You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change the TopBottomShader.splitY from any TopBottomShader in the Chart9 example.
Observed behavior
When changing the splitY property has no effect, the split effect stays always on the horizontal line at y = 0.
Expected behavior
When the value is 0 (the default), I expect it to be on the gray line, when it is 10 for example, I expect the split to be in the green line.
I might be wrong about the actual behavior since I don't really understand what the docs says about it:
/** * Splits the shaded area into two parts and applies two other [DynamicShader]s, [topShader] and [bottomShader]. * [splitY] expresses the distance of the split from the top of the shaded area as a fraction of the area’s height.*/publicclassTopBottomShader(
publicvartopShader:DynamicShader,
publicvarbottomShader:DynamicShader,
publicvarsplitY:Float = 0f,
) : CacheableDynamicShader()
Vico version(s)
2.0.0-alpha.19
Android version(s)
I tried both api level 24 and 34.
Additional information
No response
The text was updated successfully, but these errors were encountered:
Hello! As described in the newly added warning box here, this behavior is expected, and the ability to split a LineCartesianLayer line’s style at any y value, not just y = 0, is a planned addition. I’ll thus be closing this issue.
To paraphrase the documentation, when a TopBottomShader is applied to an area whose bottom edge is at b and whose top edge is at t, the border between the topShader and bottomShader areas is positioned at b − splitY × (b − t). (This is in the Canvas coordinate system, which has an inverted y-axis.) If splitY is 0, topShader is applied to the entire area. If splitY is 1, bottomShader is applied to the entire area.
How to reproduce
Change the
TopBottomShader.splitY
from anyTopBottomShader
in the Chart9 example.Observed behavior
When changing the
splitY
property has no effect, the split effect stays always on the horizontal line at y = 0.Expected behavior
When the value is 0 (the default), I expect it to be on the gray line, when it is 10 for example, I expect the split to be in the green line.
I might be wrong about the actual behavior since I don't really understand what the docs says about it:
Vico version(s)
2.0.0-alpha.19
Android version(s)
I tried both api level 24 and 34.
Additional information
No response
The text was updated successfully, but these errors were encountered: