Skip to main content

VerticalTrendLineAnnotation

VerticalTrendLineAnnotation📘 is a one-point annotation that keeps the line vertical, making it useful for time markers and event boundaries.

It inherits the shared multi-point editing and label behavior from scichart-financial-tools.

sciChartSurface.annotations.add(
new VerticalTrendLineAnnotation({
isEditable: true,
points: [{ x: 4, y: 3 }],
stroke: "#A78BFA",
strokeThickness: 3,
extendStart: true,
extendEnd: true,
labels: [
{
anchorMode: EMultiPointLabelAnchorMode.Axis,
axisLabelDrawMode: EAxisLabelDrawMode.X,
pointIndex: 0,
text: "Event"
}
],
axisLabelStroke: "#FFF",
gripVisibility: EAnnotationVisibilityMode.Always
}),
new VerticalTrendLineAnnotation({
isEditable: true,
points: [{ x: 6, y: 5 }],
stroke: "#22C55E",
strokeThickness: 2,
strokeDashArray: [16, 4],
extendStart: false,
extendEnd: true
})
);
tip
  • extendStart and extendEnd let you choose whether the marker runs through the full chart height or behaves like a shorter vertical cue.
  • strokeDashArray is useful when you want the marker to sit in the background while still remaining easy to align against.
  • If you need a clean axis-aligned guide, you can keep the point label visibility on and let the grip stay visible during interaction.

See Also​