Skip to content

How to show guidelines only for labels on Horizontal axis #768

Discussion options

You must be logged in to vote

Hello, @anshu7vyas! Thanks for the kind words. Applying HorizontalLayout.FullWidth should do the trick:

CartesianChartHost(horizontalLayout = HorizontalLayout.fullWidth(), /* ... */)

HorizontalLayout.FullWidth is used in @npced16’s code snippet, and this is the key point. Both getXStep and AxisItemPlacer.Horizontal.default’s spacing and offset parameters affect what labels are added, but it’s HorizontalLayout that defines (among other things) how ticks and guidelines are positioned relative to the labels. This is described here.

If you have any questions, let me know. Thanks for your input, @npced16!

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@anshu7vyas
Comment options

Comment options

You must be logged in to vote
2 replies
@anshu7vyas
Comment options

@patrickmichalik
Comment options

Answer selected by anshu7vyas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants