kelias Posted March 31, 2009 Report Posted March 31, 2009 I have tried to turn on the zoom feature and I can get the magnifier to appear but it doesn't seem to respond to mouse input. I can't drag it or move it around at all. What am I missing? I'm doing this: chart1.Zoom.Mode = ZoomMode.Magnifier; Quote
JuanC Posted April 1, 2009 Report Posted April 1, 2009 Have you tried moving your mouse over the magnifier after it appears? Can you post/send a small sample that reproduces the bug where we do not track the mouse movements? Regards, JuanC Quote
kelias Posted April 1, 2009 Author Report Posted April 1, 2009 Just need to call this method: private void NormalLineChart() { Axis a = new Axis(); a.Min = 0; a.Max = 50; chart1.AxesY.Add(a); 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.Series.Add(series); 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; } } Quote
kelias Posted April 20, 2009 Author Report Posted April 20, 2009 Any idea why I can't seem to move the magnifier? It doesn't seem to respond at all to the mouse. I've tried left-clicking and dragging, I've right-clicked and tried dragging etc.. but nothing. Quote
JuanC Posted April 20, 2009 Report Posted April 20, 2009 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. JuanC Quote
kelias Posted April 20, 2009 Author Report Posted April 20, 2009 Nice, works like a charm. Thanks! Quote
JuanC Posted April 21, 2009 Report Posted April 21, 2009 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. JuanC ChartFXWPFTest15.zip Quote
kelias Posted April 22, 2009 Author Report Posted April 22, 2009 How do I zoom back out again? I'm setting the chart zoom to selected, and it works fine, but I can't seem to see a nice way to zoom back out again. Quote
kelias Posted April 22, 2009 Author Report Posted April 22, 2009 Nevermind I got it. Just ChartControl.Zoom.Mode = ZoomMode.Off; Could have swore I did that earlier. Quote
Ethankie Posted March 7, 2011 Report Posted March 7, 2011 Hi Juan, I am evaluating the ChartFx for WPF(trial version8.0.3581.26941). And I have a problem with zooming which is I can notfind the Zoom.Mode = ZoomMode.Magnifier. There are only 3 options as "Off, Selection,Zoomed". Anything I missed? Thanks Quote
JuanC Posted March 7, 2011 Report Posted March 7, 2011 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. JuanC Quote
Recommended Posts
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.