Skip to content

Shift ticks and guidline on x-Axis #665

Discussion options

You must be logged in to vote

Hey man :)

I was able fix my issue by using a different to display data.
Before I was using getXStep = { 24f }, in my host (each column displays 1 day -> 24 hours)
The xStep was useful because I only wanted to show the labels for each day. You will have the problem explained above though.

Now I am using the itemPlacer for my top axis:

             itemPlacer = remember {
                    AxisItemPlacer.Horizontal.default(
                        spacing = 24,
                        offset = 12,
                    )
                },

Ignore the custom background coloring in this picture:

This will achieve the same result but the chart will interpret each value as a tick and will th…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nicolasthemmer-aaa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants