How do I horizontally pan a Smith chart by code?

A forum dedicated to WPF version of LightningChart Ultimate.

How do I horizontally pan a Smith chart by code?

Postby manawyddan » Tue Apr 16, 2019 3:39 pm

Hi,
I am using LightningChartUltimate v7 and I am attempting to programmatically zoom and pan a Smith view using the ZoomCenter and ZoomScale properties.
Is it the right way to do that?
I don't understand the ZoomCenter property. Currently, I get its value and turn it into coordinates by using the Axis.ValueToCoord method. Then I update those coordinates with my horizontal delta and set it back as a value to ZoomCenter (using Axis.CoordToValue to do the conversion). When I do that, the graph shifts upwards as well as to the left.
I did not find any useful information in the documentation. How can I do that?

Thanks,
Eric
manawyddan
 
Posts: 3
Joined: Wed Oct 03, 2018 12:20 pm

Re: How do I horizontally pan a Smith chart by code?

Postby Arction_LasseP » Thu Apr 18, 2019 8:41 am

Hello,

You can pan Smith chart programmatically by changing ZoomCenter as you have done. However, in Smith chart this property is defined in axis coordinates, in other words Real and Imaginary values.
As changing Imaginary value will move chart upwards (or down), only Real value should be updated to achieve the horizontal pan.

Code: Select all
_chart.ViewSmith.ZoomCenter.SetValues(RealValue, ImgValue);
// Change only the RealValue, not ImgValue


Hope this helps. If you have any further questions, feel free to contact our technical support. We are always ready to help.
Arction_LasseP
 
Posts: 5
Joined: Wed Mar 27, 2019 1:05 pm


Return to LightningChart Ultimate WPF

Who is online

Users browsing this forum: No registered users and 3 guests