how to make PointLineSeries points at x = 0 visible when the range starts at x = 0

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
mat-d
Posts: 19
Joined: Sat Jun 26, 2021 4:27 am

how to make PointLineSeries points at x = 0 visible when the range starts at x = 0

Post by mat-d » Wed Nov 09, 2022 12:35 am

Hello,

our application has an X axis that begins at 0, and the first point needs to be at x = 0.
this point is usually only partially visible, as it is right on the left edge of the chart.

Is there a way to slightly expand the range of the chart without changing the range of the X Axis, as I still want the axis to display as starting at 0. Is there a padding value to expand the plotted area beyond the Axis by a certain number of pixel?

The best I can think of is to start at -0.001 and round the displayed values. Do you have any better suggestions,




I moved the y axis away from the edge to make sure it's not the axis obscuring the the dot.
```

Code: Select all

_chart.ViewXY.AxisLayout.YAxisAutoPlacement = YAxisAutoPlacement.Off;
_chart.ViewXY.YAxes[0].PositionOffset = -5;
```
Thanks Mat

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: how to make PointLineSeries points at x = 0 visible when the range starts at x = 0

Post by ArctionKestutis » Wed Nov 09, 2022 8:34 am

Typically objects like Point's symbols is centered at given axis value. If that axis value appears at the edge (i.e. at Axis' Min/Max) then object will be cut in half.
There is no other way to avoid clipping but to increase Axis range or shift. How much of shift is required depend of screen-coordinates and axis-value relationship.
I don't see why you would need any rounding for small shift like -0.001. Automatic tick calculator should still place major tick at 0 value. If for some reason ticks are not at position you expect, you can use CustomTicks (see User Manual chapter 6.2.8).

mat-d
Posts: 19
Joined: Sat Jun 26, 2021 4:27 am

Re: how to make PointLineSeries points at x = 0 visible when the range starts at x = 0

Post by mat-d » Fri Nov 25, 2022 10:59 am

Thank you Kestutis,
That has worked well

Post Reply