SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Answered
1
0

Hello,

Currently I am using ViewportManager.AnimateZoomExtents to animate the data to fit the size of the graph. However, the animation causes the data to reach the very edge (X-Axis Max and Y-Axis Max). Is there a way that I can use AnimateZoomExtents to animate the data out but leave a 10% gap between the edge and X-Axis/Y-Axis Max?

I was able to do this using the following code, but I lose complete animation (which is what I’m looking for).

AxisYVisibleRange = new DoubleRange(AxisYVisibleRange.Min, AxisYVisibleRange.Max + (AxisYVisibleRange.Max * .10))
ViewportManager.AnimateZoomExtents(AnimateZoomTimeSpan);
Version
4.2.2.9777
  • You must to post comments
Best Answer
1
0

Hi Daniel

You simply need to set GrowBy on the Axis, e.g.

<s:NumericAxis GrowBy="0.1, 0.1"/>

or

 numerciAxis.GrowBy = new DoubleRange(0.1, 0.1);

This adds a 10% padding at the edges of the axis.

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.