Hello,
We are creating a stock chart and are currently at the stage of adding various formations. So far, we have added: trend line (LineAnnotation), vertical and horizontal lines, and a horizontal ray (HorizontalLineAnnotation with x1). We still need the most popular and commonly used formation: the extended line – which is simply a straight line that extends across the entire chart, and its position and angles can be adjusted.
Here’s a link with an example of how it works: https://docs.anychart.com/Stock_Charts/Drawing_Tools_and_Annotations/Infinite_Line
Is it possible to create such a line, or is it currently not supported?
Additionally, the ability to add labels only works in HorizontalLineAnnotation and VerticalLineAnnotation. Will the ability to add labels in LineAnnotation be added?
Best regards,
Kamil
- Kamil Macura asked 1 day ago
- You must login to post comments
Hello,
I believe it is possible to implement the adjustable line with a few Annotations.
There might be some challenges though.
Consider this:
– Annotations support dragging (and resizing) – enable isEditable property
– it is possible to customize adorner highlighting styles that appear in the edit mode
– SciChartSurface intercepts mouse events;
so they could be accessed from a Chart Modifier or drag callbacks on an annotation
– currently, adding some styles upon hover would require adding an AnnotationHoverModifier
– LineAnnotation is not infinite, but you can adjust the endpoints dynamically
Regarding line labels, I believe these could be replicated with AxisMarkerAnnotations.
I’m not sure about adding this to the library as it is a bit unclear to me what should they display.
But you can always vote for a new feature via the request form.
Also, we are working on some improvements to the Annotations API planned in v4.
- Jim Risen answered 9 hours ago
- You must login to post comments
Please login first to submit.