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


Hi all,

  1. How to find out chart’s zoom percentage (chart has multiple X and multiple Y axes.)?
  2. How can I programmatically pan a linear chart, which have a point outside of a visible range?
  3. How can I check is the point outside of a visible range?


  • You must to post comments

Hi Arthur,

Regarding the first question, I’m not sure it is reasonable in the case of multiple axes, because each axis can have it’s own zoom level unless they all have the same data extents and shared VisibleRanges. We are going to introduce the ScaleFactor property in next version, which will allow to control zoom scale on an axis. Is it applicable in your case? Could you provide us with more detailed explanation on what you want to achieve? We can consider it as a use-case then.

You can programmatically pan the chart using Scroll…() methods on axes(modifiers call them internally), please, refer to Axis Interactivity (Zoom, Scroll, Pan Programmatically) for more info.

Concerning the third, do you mean a data point or pixel coordinates? In the first case, just check if X and Y lies inside the VisibleRange. In the second, you need to convert them to chart coords using convertion API, the easiest way is via the IAxis.GetDataValue(..) method. Please, let me know and I will point you to some threads.

Hope the above helps!

Best regards,

  • Arthur Romanov
    Hi Yuriy, 1. I should to save chart zoom and restore it after load. I'm saving the chart with the single X and Y Axis(save VisibleRange (XMin/XMax, YMin/YMax)) and it's working fine. But when I have multiple x/y axes I dont know what can I do. I think I can convert min max into points and make zoom, but I don't know, how. 3. But, when the point is outside of the VisibleRange, how can I move it to center of the chart Visible range? Thanks, Arthur
  • Yuriy Zadereckiy
    Hi Arthur, There is the IAxis.Id property, you should save it as well in the case of multiple axes. If you deal with axes of different types, you need to save its type also. VisibleRange.Min/Max can be converted to doubles and then restored corresponding to the axis type. Then just need to apply it - or am I missing something? Does this make sense for you? By the way, we are going to provide built-in feature for saving/restoring chart data to/from XML in next version. It's under testing now and hopefully will be out in early February. Regarding the second question, you need to do some calculations here. There is API for scrolling the chart as well as for converting data points to pixels and vice versa. The two methods seems to be applicable in this case, IAxis.Scroll(pixels) and IAxis.ScrollBy(points). So you need to calculate how many data points or pixels you need to scroll the chart by, you can use IAxis.GetDataValue(pixels) and IAxis.GetCoordinate(dataValue) for conversion. Hope this helps! Best regards, Yuriy
  • Arthur Romanov
    Hi Yuriy, Thanks!!! Best regards, Arthur
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.