ChartAnnotation
ChartForgeX.Core
Represents fixed chart annotation geometry and identity with optional mutable authoring stroke styling.
Inheritance
- object
- ChartAnnotation
Usage
Explore 16 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 8
- Property Chart.Annotations
- Extension method ChartAnnotation.StrokeStyle
- Extension method ChartAnnotation.ValueAxis
- Method ChartAnnotation.LineSegment
- Method ChartAnnotation.Note
- Method ChartAnnotation.ParallelChannel
- Method ChartAnnotationFluent.StrokeStyle
- Method ChartAnnotationFluent.ValueAxis
Accepted by parameters 8
- Method Chart.AddAnnotation
- Method Chart.RemoveAnnotation
- Method Chart.ReplaceAnnotation
- Method Chart.ReplaceAnnotation
- Extension method ChartAnnotation.StrokeStyle
- Extension method ChartAnnotation.ValueAxis
- Method ChartAnnotationFluent.StrokeStyle
- Method ChartAnnotationFluent.ValueAxis
Constructors
public ChartAnnotation(ChartAnnotationKind kind, double value, double? endValue, string label, ChartColor color, double opacity, bool showLabel = true) #Initializes a new instance of the ChartAnnotation class.
Parameters
- kind ChartForgeX.Core.ChartAnnotationKind
- The annotation kind.
- value double
- The first annotation value.
- endValue double?
- The second annotation value for bands.
- label string
- The annotation label.
- color ChartForgeX.Primitives.ChartColor
- The annotation color.
- opacity double
- The annotation opacity used for band fills.
- showLabel bool = true
- Whether to paint the label. False retains its accessible and semantic content.
public ChartAnnotation(ChartAnnotationId id, ChartAnnotationKind kind, double value, double? endValue, string label, ChartColor color, double opacity, bool showLabel = true) #Creates an annotation whose identity survives source replacement and collection reordering.
Parameters
- id ChartForgeX.Core.ChartAnnotationId
- The authored identity, unique among annotations within one chart.
- kind ChartForgeX.Core.ChartAnnotationKind
- The annotation kind.
- value double
- The first annotation value.
- endValue double?
- The second annotation value for bands.
- label string
- The annotation caption, independent of its identity.
- color ChartForgeX.Primitives.ChartColor
- The annotation color.
- opacity double
- The band fill opacity.
- showLabel bool = true
- Whether to paint the caption while retaining its semantic content.
Methods
public static ChartAnnotation LineSegment(ChartPoint start, ChartPoint end, string label, ChartColor color, ChartAnnotationId? id = null, ChartAxisSide yAxis = Primary, bool showLabel = true) #Creates a finite Cartesian source line, clipped to the plot without changing source endpoints or axis bounds.
Parameters
- start ChartForgeX.Primitives.ChartPoint
- end ChartForgeX.Primitives.ChartPoint
- label string
- color ChartForgeX.Primitives.ChartColor
- id ChartForgeX.Core.ChartAnnotationId? = null
- yAxis ChartForgeX.Core.ChartAxisSide = Primary
- showLabel bool = true
Returns
ChartAnnotationpublic static ChartAnnotation Note(ChartPoint anchor, string label, ChartColor color, ChartAnnotationId? id = null, ChartAxisSide yAxis = Primary, bool showLabel = true) #Creates a Cartesian note anchored to exact source coordinates without expanding the data domain.
Parameters
- anchor ChartForgeX.Primitives.ChartPoint
- label string
- color ChartForgeX.Primitives.ChartColor
- id ChartForgeX.Core.ChartAnnotationId? = null
- yAxis ChartForgeX.Core.ChartAxisSide = Primary
- showLabel bool = true
Returns
ChartAnnotationpublic static ChartAnnotation ParallelChannel(ChartPoint start, ChartPoint end, double yOffset, string label, ChartColor color, ChartAnnotationId? id = null, ChartAxisSide yAxis = Primary, double opacity = 0.14, bool showLabel = true) #Creates two source-coordinate boundaries separated by a signed Y offset, with translucent fill between them.
Parameters
- start ChartForgeX.Primitives.ChartPoint
- end ChartForgeX.Primitives.ChartPoint
- yOffset double
- label string
- color ChartForgeX.Primitives.ChartColor
- id ChartForgeX.Core.ChartAnnotationId? = null
- yAxis ChartForgeX.Core.ChartAxisSide = Primary
- opacity double = 0.14
- showLabel bool = true
Returns
ChartAnnotationInherited Methods
Properties
public ChartAnnotationId? Id { get; } #Gets the authored source identity, or null for an anonymous annotation local to the current chart source.
public double? EndValue { get; } #Gets the second annotation value for band annotations.
public bool ShowLabel { get; } #Gets whether the label is painted beside the annotation. A hidden label remains available in accessible descriptions and exported semantic metadata.
public double Opacity { get; } #Gets the annotation opacity used for band fills.
public ChartStrokeStyle? StrokeStyle { get; set; } #Gets or sets optional reference-line stroke overrides used by the next preparation. Band fills retain their own color and opacity.
public ChartAxisSide ValueAxis { get; set; } #Gets or sets the value axis that positions a horizontal reference line or band.
public ChartPoint? SourceStart { get; } #Gets the source anchor of a note, line segment or channel; axis-spanning guides return null.
public ChartPoint? SourceEnd { get; } #Gets the second source endpoint of a line segment or channel; notes and axis-spanning guides return null.
public double ChannelOffset { get; } #Gets the channel's signed offset in source Y units; other annotations return zero.
public ChartAxisSide SourceYAxis { get; } #Gets the value axis owning source-coordinate Y values. Axis-spanning guides retain their existing physical-axis semantics.
Extension Methods
public static ChartAnnotation StrokeStyle(ChartAnnotation chartAnnotation, ChartStrokeStyle? value) #Sets ChartAnnotation.StrokeStyle: Gets or sets optional reference-line stroke overrides used by the next preparation. Band fills retain their own color and opacity.
Parameters
- chartAnnotation ChartForgeX.Core.ChartAnnotation
- The instance.
- value ChartForgeX.Core.ChartStrokeStyle?
- The value.
Examples
// C# initializer or property // C# fluent
chartAnnotation.StrokeStyle = value; chartAnnotation.StrokeStyle(value);public static ChartAnnotation ValueAxis(ChartAnnotation chartAnnotation, ChartAxisSide value) #Sets ChartAnnotation.ValueAxis: Gets or sets the value axis that positions a horizontal reference line or band.
Parameters
- chartAnnotation ChartForgeX.Core.ChartAnnotation
- The instance.
- value ChartForgeX.Core.ChartAxisSide
- The value.
Examples
// C# initializer or property // C# fluent
chartAnnotation.ValueAxis = value; chartAnnotation.ValueAxis(value);