ChartMark
public abstract class ChartMark : IChartMarkBase implementation for marks, providing shared data, style, annotation, accessibility, stacking, and morph metadata.
Fields
Section titled “Fields”
_dataPoint
Section titled “_dataPoint”protected DataPoint _dataPointReturns
ChartGuru.DataPoint
_foregroundColor
Section titled “_foregroundColor”protected Color _foregroundColorReturns
UnityEngine.Color
_visible
Section titled “_visible”protected bool _visibleReturns
System.Boolean
_seriesKey
Section titled “_seriesKey”protected object _seriesKeyReturns
System.Object
_annotation
Section titled “_annotation”protected AnnotationConfig _annotationReturns
ChartGuru.AnnotationConfig
_opacity
Section titled “_opacity”protected float _opacityReturns
System.Single
_foregroundStyleKey
Section titled “_foregroundStyleKey”protected object _foregroundStyleKeyReturns
System.Object
_foregroundGradient
Section titled “_foregroundGradient”protected LinearGradientStyle _foregroundGradientReturns
ChartGuru.LinearGradientStyle
_foregroundGradientStyle
Section titled “_foregroundGradientStyle”protected GradientStyle _foregroundGradientStyleReturns
ChartGuru.GradientStyle
_categoryLabel
Section titled “_categoryLabel”protected string _categoryLabelReturns
System.String
_offset
Section titled “_offset”protected Vector2 _offsetReturns
UnityEngine.Vector2
_showShadow
Section titled “_showShadow”protected bool _showShadowReturns
System.Boolean
_shadowColor
Section titled “_shadowColor”protected Color _shadowColorReturns
UnityEngine.Color
_shadowOffset
Section titled “_shadowOffset”protected Vector2 _shadowOffsetReturns
UnityEngine.Vector2
_shadowBlur
Section titled “_shadowBlur”protected float _shadowBlurReturns
System.Single
_blendMode
Section titled “_blendMode”protected MarkBlendMode _blendModeReturns
ChartGuru.MarkBlendMode
_clipShape
Section titled “_clipShape”protected ClipShape _clipShapeReturns
ChartGuru.ClipShape
_blurRadius
Section titled “_blurRadius”protected float _blurRadiusReturns
System.Single
_maskContent
Section titled “_maskContent”protected IChartContent _maskContentReturns
ChartGuru.IChartContent
_compositingLayer
Section titled “_compositingLayer”protected bool _compositingLayerReturns
System.Boolean
_rangedOffset
Section titled “_rangedOffset”protected RangedOffset? _rangedOffsetReturns
System.Nullable{ChartGuru.RangedOffset}
_positionAxis
Section titled “_positionAxis”protected MarkAxis _positionAxisReturns
ChartGuru.MarkAxis
_zIndex
Section titled “_zIndex”protected int _zIndexReturns
System.Int32
Constructors
Section titled “Constructors”
ChartMark()
Section titled “ChartMark()”protected ChartMark()
ChartMark(float, float)
Section titled “ChartMark(float, float)”protected ChartMark(float x, float y)Initializes the mark with a scalar XY point whose stable identity is derived from its coordinates.
Parameters
| Name | Type |
|---|---|
x |
System.Single |
y |
System.Single |
ChartMark(DataPoint)
Section titled “ChartMark(DataPoint)”protected ChartMark(DataPoint dataPoint)Initializes the mark from an existing point, preserving range, series, identity, and category metadata.
Parameters
| Name | Type |
|---|---|
dataPoint |
ChartGuru.DataPoint |
Methods
Section titled “Methods”
GetMorphTargets(ChartType, Rect)
Section titled “GetMorphTargets(ChartType, Rect)”public abstract (Vector2 source, Vector2 target) GetMorphTargets(ChartType targetType, Rect plotArea)Projects this mark into plot-space geometry that the morph renderer can interpolate toward the requested chart type.
Parameters
| Name | Type |
|---|---|
targetType |
ChartGuru.ChartType |
plotArea |
UnityEngine.Rect |
Returns
System.ValueTuple{UnityEngine.Vector2,UnityEngine.Vector2}
Clone()
Section titled “Clone()”public abstract IChartMark Clone()Creates an independent copy of this Chart Mark; later configuration changes do not affect the original instance.
Returns
ChartGuru.IChartMark
Properties
Section titled “Properties”
ZIndex
Section titled “ZIndex”public int ZIndex { get; set; }Render order hint: marks with higher ChartGuru.ChartMark.ZIndex draw on top of marks
with lower values. Renderers apply a stable sort by
(SeriesIndex, ZIndex, insertion) before emit.
Swift Charts equivalent: .ZIndex(Int).
Returns
System.Int32
RangedOffset
Section titled “RangedOffset”public RangedOffset? RangedOffset { get; set; }Optional range-based offset. When set, the mark’s resolved screen position is
adjusted so that its X stretches from xStart to xEnd and its Y
from yStart to yEnd (in plot/domain units), instead of using the
scalar ChartGuru.ChartMark.Offset.
Swift Charts equivalent (iOS 17): .Offset(xStart:xEnd:yStart:yEnd:).
Returns
System.Nullable{ChartGuru.RangedOffset}
PositionAxis
Section titled “PositionAxis”public MarkAxis PositionAxis { get; set; }The axis along which ChartGuru.ChartMark.SeriesKey-based positioning (dodging / grouping)
is applied. When ChartGuru.MarkAxis.Automatic, layout derives the axis from the
mark type (bars dodge along the categorical axis, etc.).
Swift Charts equivalent: .Position(by: .Value(…), axis: .horizontal).
Returns
ChartGuru.MarkAxis
PositionSpan
Section titled “PositionSpan”public MarkDimension? PositionSpan { get; set; }Per-dodge-slot dimension override. When set, layout uses this dimension
for the slot width assigned to this mark inside its ChartGuru.ChartMark.PositionAxis
dodge group instead of the mark’s own Width/Height.
Swift Charts equivalent: .Position(by:axis:span:).
Returns
System.Nullable{ChartGuru.MarkDimension}
MarkType
Section titled “MarkType”public abstract ChartType MarkType { get; }Returns
ChartGuru.ChartType
DataPoint
Section titled “DataPoint”public virtual DataPoint DataPoint { get; set; }Returns
ChartGuru.DataPoint
ForegroundColor
Section titled “ForegroundColor”public Color ForegroundColor { get; set; }Returns
UnityEngine.Color
Visible
Section titled “Visible”public bool Visible { get; set; }Returns
System.Boolean
SeriesKey
Section titled “SeriesKey”public object SeriesKey { get; set; }Returns
System.Object
Accessibility
Section titled “Accessibility”public AccessibilityInfo Accessibility { get; set; }Per-mark accessibility metadata. Swift Charts equivalent: .accessibilityLabel,
.accessibilityValue, .accessibilityHidden, .accessibilityIdentifier.
Returns
ChartGuru.AccessibilityInfo
CategoryLabel
Section titled “CategoryLabel”public string CategoryLabel { get; set; }Category label for X-axis display (e.g., “Jan”, “Feb”, “Mar”). Separate from SeriesKey/ForegroundStyleKey which determine colors and legend.
Returns
System.String
ForegroundStyleKey
Section titled “ForegroundStyleKey”public object ForegroundStyleKey { get; set; }Key for automatic color assignment and legend generation. Swift Charts equivalent: ForegroundStyle(by:) modifier.
Returns
System.Object
ForegroundGradient
Section titled “ForegroundGradient”public LinearGradientStyle ForegroundGradient { get; set; }Returns
ChartGuru.LinearGradientStyle
ForegroundGradientStyle
Section titled “ForegroundGradientStyle”public GradientStyle ForegroundGradientStyle { get; set; }General gradient style (radial, angular, elliptical, or linear via the base type).
When set, takes precedence over ChartGuru.ChartMark.ForegroundGradient.
Returns
ChartGuru.GradientStyle
ShowShadow
Section titled “ShowShadow”public bool ShowShadow { get; set; }Returns
System.Boolean
ShadowColor
Section titled “ShadowColor”public Color ShadowColor { get; set; }Returns
UnityEngine.Color
ShadowOffset
Section titled “ShadowOffset”public Vector2 ShadowOffset { get; set; }Returns
UnityEngine.Vector2
ShadowBlur
Section titled “ShadowBlur”public float ShadowBlur { get; set; }Returns
System.Single
BlendMode
Section titled “BlendMode”public MarkBlendMode BlendMode { get; set; }Returns
ChartGuru.MarkBlendMode
ClipShape
Section titled “ClipShape”public ClipShape ClipShape { get; set; }Returns
ChartGuru.ClipShape
BlurRadius
Section titled “BlurRadius”public float BlurRadius { get; set; }Returns
System.Single
MaskContent
Section titled “MaskContent”public IChartContent MaskContent { get; set; }Returns
ChartGuru.IChartContent
CompositingLayer
Section titled “CompositingLayer”public bool CompositingLayer { get; set; }Returns
System.Boolean
CustomSymbolRenderer
Section titled “CustomSymbolRenderer”public Func<Rect, Color, bool> CustomSymbolRenderer { get; set; }Custom symbol renderer callback. When set and the mark’s symbol shape is
ChartGuru.SymbolShape.Custom, the renderer invokes this delegate instead
of drawing a predefined shape.
The callback receives the symbol’s bounding UnityEngine.Rect (in pixels) and
the resolved UnityEngine.Color; it should emit geometry through the active
draw sink. Return true if the symbol was drawn, false to fall back to default.
Swift Charts equivalent: .Symbol() { custom View }.
Returns
System.Func{UnityEngine.Rect,UnityEngine.Color,System.Boolean}
Annotation
Section titled “Annotation”public AnnotationConfig Annotation { get; }Returns
ChartGuru.AnnotationConfig
Opacity
Section titled “Opacity”public float Opacity { get; set; }Returns
System.Single
Offset
Section titled “Offset”public Vector2 Offset { get; }Offset applied to the mark in plot coordinates. Swift Charts equivalent: .Offset(x:y:)
Returns
UnityEngine.Vector2