SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

0
0

Hi,

I have a VerticalLineAnnotation that can be dragged over the chart by clicking and dragging on the line itself. (See attached image). The problem is, whenever I put the chart in front of a user, they try to drag by clicking on the label (the blue label with the time in the image).

How can I make this label draggable like the line?

Thanks.

Images
  • You must to post comments
0
0

I found a solution – I create the AnnotationLabel in code and forward its mouse events to the VerticalLineAnnotation:

var line = new VerticalLineAnnotation();
var label = new AnnotationLabel {Cursor = Cursors.Hand};

label.MouseDown += (sender, args) => line.RaiseEvent(args);
label.MouseUp += (sender, args) => line.RaiseEvent(args);
label.MouseMove += (sender, args) => line.RaiseEvent(args);

line.AnnotationLabels = new ObservableCollection<AnnotationLabel> {label};
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.