YAxis Maximum value

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
CLON
Posts: 5
Joined: Wed Nov 15, 2017 12:34 pm

YAxis Maximum value

Post by CLON » Thu Nov 16, 2017 1:51 pm

Hi,

I'm working on a small WPF application using the chart to display a single bar serie. I couldn't find the right option on the YAxis element that could display a small space between the maximum value of the serie and the top margin of the chart area. Right now the highest bar is stucked to the top of the chart, i would like to display on the axis the closest greater interval.

Moreover, is there a way to display on the axis the exact maximum value ?

Regards,

Clément

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

Re: YAxis Maximum value

Post by ArctionKestutis » Thu Nov 16, 2017 3:13 pm

Hi,

There is property for the gap left into top and bottom of Y axes. This is View fitting margin in pixels, which is used together with ZoomToFit(). For example,

Code: Select all

_chart.ViewXY.ZoomPanOptions.ViewFitYMarginPixels = 5;
_chart.ViewXY.ZoomToFit();
Or you could simple set range in a way you like:

Code: Select all

Axis.SetRange(minValue, maxValue);
Not sure that you are asking this thing, but if you don't like automatic axis' label placement, you should use CustomTicks. Please corresponding examples in our Demo App.

All the best.

Post Reply