Page 1 of 1

YAxis Maximum value

Posted: Thu Nov 16, 2017 1:51 pm
by CLON
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

Re: YAxis Maximum value

Posted: Thu Nov 16, 2017 3:13 pm
by ArctionKestutis
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.