Hi all,
In my chart I have ZoomPanModifier. I should load historical data, when user dragged the chart backwards.
- How can I catch event when chart drag is completed?
- Is there any easy way to fill the gaps in the data series? (the gaps are defined in the series as “”)
Best regards,
Arthur
- Arthur Romanov asked 12 years ago
- You must login to post comments
Hi there,
- Please, try out this:
public class ZoomPanModifierEx: ZoomPanModifier { public event EventHandler DragCompleted; public override void OnModifierMouseUp(ModifierMouseArgs modifierMouseArgs) { base.OnModifierMouseUp(modifierMouseArgs); OnDragComplete(); } private void OnDragComplete() { var handler = DragCompleted; if(handler != null) { handler(this, EventArgs.Empty); } } }
If you use SciStockChart, you need to replace the old modifier with this new:
var group = ((ModifierGroup) stockChart.ChartModifier); //Find and remove old ZoomPan var panModifier = group["ZoomPanModifier"]; group.ChildModifiers.Remove(panModifier); //Create new modifier and subscribe it var zoomPan = new ZoomPanModifierEx(); zoomPan.DragCompleted += OnDragCompleted; //Add to ModifierGroup group.ChildModifiers.Add(zoomPan);
- You should use Update(x, y) or FindIndex(oldValue)/RemoveAt(index)/Insert(index, newValue)
Hope this is helpful!
Best regards,
Yuriy
- Yuriy Zadereckiy answered 12 years ago
-
Hi, Thank you, I'll change it for MVVM. Thanks, Arthur
- You must login to post comments
Please login first to submit.