Jump to content
Software FX Community

Recommended Posts

Posted

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;
Posted

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

Posted

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;

}

}

  • 3 weeks later...
Posted

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.

Posted

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

Posted

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

  • 1 year later...
Posted

 

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

 

Posted

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

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.

Guest
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...