Pre loader

How to notify Viewmodel in better way if the YValue of datapoint on series was changed?


Hi, Andrew. sorry to bother you.

if i changed the YValue by drag the point on series(—part-5—select-and-drag-a-data-point), i want to set data repository dirty. how to notify the viewmodel, by even, or binding. could you tell me the better( rational, even best ) way?

sorry, i’m a newer to WPF.

many thanks

  • You must to post comments

Hi Wang,

In the article Custom ChartModifiers – Part 5 – Select and Drag a Data-Point we present a custom ChartModifierBase which allows you to select and drag data-points.

You can modify this code to notify your viewmodel in one of the following ways:

  1. Add an event which is raised in OffsetPointAt(). Use EventToCommand to notify the viewmodel

  2. Inside OffsetPointAt(), cast this.DataContext to your viewmodel type and call a method directly

Method (1) would be preferable, but requires slightly more code. It’s up to you how you with to implement this, hopefully I’ve given you some ideas!

Best regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies