Jump to content
Software FX Community

How to use Zoom?


Recommended Posts

Just need to call this method:

private void NormalLineChart()


Axis a = new Axis();

a.Min = 0;

a.Max = 50;


List dps = LoadRandomDateTimeData(10,0,50,10);

SeriesAttributes series = new SeriesAttributes("What");

series.BindingPathX = "When";

series.Gallery = Gallery.Line;

series.ItemsSource = dps;

series.AxisY = a;

series.Marker.Visibility = Visibility.Collapsed;

series.StrokeThickness = 2;

chart1.Zoom.Mode = ZoomMode.Magnifier;


chart1.AxisX.Labels.Format = AxisFormat.Date;


private List LoadRandomDateTimeData(int seed, int min, int max, int correlation)


List dps = new List();

Random rnd = new Random(seed);

int last = min;

for (int i = 0; i < 100; i++)


int itm = rnd.Next(last-correlation, last+correlation);

if (itm

if (itm > max) itm = rnd.Next(last-correlation, max);

last = itm;

dps.Add(new DataPoint(itm, DateTime.Today.AddDays(i)));


return dps;


public class DataPoint


public double What { get; set;}

public DateTime When { get; set;}

public DataPoint()


public DataPoint(double what, DateTime when)


What = what;

When = when;



Link to comment
Share on other sites

  • 3 weeks later...

Please try invoking the code that sets the Zoom mode in the Page/Window loaded event instead of the Page/Window constructor.

We will try to fix this in future builds but in the meantime setting the Zoom mode in the Loaded event should work as expected.


Link to comment
Share on other sites

Zoom (and Scroll) is one of the areas where we are actively working on. Because of this we will separate Magnifying from the other zoom modes. This will allow using the magnifier after zoom has been applied and will allow us to clean up the API. In future builds to turn on the magnifier you will need the following code

chart1.Zoom.Magnifier.IsEnabled = true;

We apologize in advance for the inconvenience but this is a change we felt would improve the product significantly. If you are interested in testing our newer builds please send a message to wpf at softwarefx dot com.



Link to comment
Share on other sites

  • 1 year later...

Current builds support the magnifier through Zoom.Magnifier, e.g.

chart1.Zoom.Magnifier.IsEnabled = true/false;

There are other setings such as the size of the magnifier or the magnification factor you can also control through other properties in the ZoomMagnifier class.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...