Pre loader

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

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hi, Andrew. sorry to bother you.

if i changed the YValue by drag the point on series(http://support.scichart.com/index.php?/Knowledgebase/Article/View/17239/32/custom-chartmodifiers—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
1
0

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,
Andrew

  • 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