Offset for Axis Label text

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
lokesh
Posts: 45
Joined: Tue Feb 14, 2017 8:48 am

Offset for Axis Label text

Post by lokesh » Mon Apr 17, 2017 6:47 pm

Hi,
I was working with custom ticks in axis and I ended up with the below:
markerLabel.png
markerLabel.png (2.85 KiB) Viewed 9245 times
I am wondering if there is a way to apply an offset to the custom label text so it could be displayed just above the line? Or is it possible to redraw the text at a location with offset?

Thanks,
Lokesh

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Offset for Axis Label text

Post by ArctionPasi » Tue Apr 18, 2017 7:54 am

Hi Lokesh,

that approach needs using two CustomAxisTicks per tick position. One with text and one without it. Give a slightly higher value for tick with a text. You can utilize yAxis.CoordToValue and ValueToCoord method to convert between screen coordinates and axis values as necessary.
LightningChart Support Team, PT

lokesh
Posts: 45
Joined: Tue Feb 14, 2017 8:48 am

Re: Offset for Axis Label text

Post by lokesh » Tue Apr 25, 2017 2:30 pm

Hi Pasi,
Sorry for the late response.
Thank you for the work around. That was a pretty simple one and I feel bad it didn't cross my mind. Works great.

Thanks again.

Lokesh

Post Reply