SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
The default appearance for the vertical line annotation is for the series name and Y value to be displayed next to the data point. Is it possible to move this display elsewhere? On sine wave type data it doesn’t work so good because the text box moves up and down so much as the user scrolls the line annotation. Even just putting it at the bottom of the chart right above the X axis would be a huge improvement.
I assume this is a ControlTemplate modification type issue but I don’t know where to start looking.
I did it in the hard way:
Hi David, Kristjan,
Thanks for your questions. Actually, there are several possible positions reserved for annotation labels, additionally they can be shifted changing label’s Margin. You can see this in the Annotation Are Easy example, notice that vertical/horizontal lines there have additional labels above/aside of them. To achieve this, you should define labels inside the annotation in this way:
<s:VerticalLineAnnotation ShowLabel="False" ... > <!-- Defines the label at the top left corner --> <s:AnnotationLabel LabelPlacement="TopRight" Text="..."/> .... <!-- Defines the label at the bottom just above the XAxis --> <s:AnnotationLabel LabelPlacement="Bottom" Text="..."/> </s:VerticalLineAnnotation>
So the LabelPlacement property determines position of a label (+ Margin to shift). And to disable the default label, just set ShowLabel=”False” on an annotation.
Hope it is clearer now! Please feel free to comment if you have any questions,
Please login first to submit.