AngleLineAnnotation
AngleLineAnnotation📘 draws a two-point angled guide line. It is a simple directional annotation for highlighting slope or projection.
It inherits the shared multi-point editing and label behavior from scichart-financial-tools.
- TS
sciChartSurface.annotations.add(
new AngleLineAnnotation({
isEditable: true,
points: [
{ x: 1.5, y: 3 },
{ x: 4, y: 6 }
],
angleGuideLength: 60,
stroke: "#F97316",
strokeThickness: 3,
guideStrokeThickness: 1,
guideDashArray: [3, 2],
// formatAngleLabel: ({ angleLabel }) => angleLabel
}),
new AngleLineAnnotation({
isEditable: true,
points: [
{ x: 5.5, y: 7 },
{ x: 8, y: 4.5 }
],
stroke: "#22C55E",
strokeThickness: 3,
strokeDashArray: [12, 2],
formatAngleLabel: ({ angle }) => `${Math.round(angle)}°`,
guideDashArray: [10, 0], // no dash -> solid line
guideStrokeThickness: 1,
labelFontSize: 13,
labelPadding: 20, // default is 10
angleGuideLength: 100,
// labelColor: "#FFF", // optional
})
);