SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
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!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
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.