RuleMark
public class RuleMark : ChartMark, IChartMarkRepresents a horizontal or vertical reference rule spanning a chart domain or explicit range.
Constructors
Section titled “Constructors”
RuleMark()
Section titled “RuleMark()”public RuleMark()Methods
Section titled “Methods”
Horizontal(float)
Section titled “Horizontal(float)”public static RuleMark Horizontal(float yValue)Creates a horizontal rule spanning the plot area at the specified Y-axis value.
Parameters
| Name | Type |
|---|---|
yValue |
System.Single |
Returns
ChartGuru.RuleMark
Vertical(float)
Section titled “Vertical(float)”public static RuleMark Vertical(float xValue)Creates a vertical rule spanning the plot area at the specified X-axis value.
Parameters
| Name | Type |
|---|---|
xValue |
System.Single |
Returns
ChartGuru.RuleMark
VerticalSegment(float, float, float)
Section titled “VerticalSegment(float, float, float)”public static RuleMark VerticalSegment(float xValue, float yMin, float yMax)Creates a vertical segment rule from yMin to yMax at the given X value. Useful for candlestick wicks.
Parameters
| Name | Type |
|---|---|
xValue |
System.Single |
yMin |
System.Single |
yMax |
System.Single |
Returns
ChartGuru.RuleMark
HorizontalSegment(float, float, float)
Section titled “HorizontalSegment(float, float, float)”public static RuleMark HorizontalSegment(float yValue, float xMin, float xMax)Creates a horizontal segment rule from xMin to xMax at the given Y value.
Parameters
| Name | Type |
|---|---|
yValue |
System.Single |
xMin |
System.Single |
xMax |
System.Single |
Returns
ChartGuru.RuleMark
LineStyle(float)
Section titled “LineStyle(float)”public RuleMark LineStyle(float width)Sets the line width for this rule. Swift Charts equivalent: .LineStyle(StrokeStyle(lineWidth:))
Parameters
| Name | Type |
|---|---|
width |
System.Single |
Returns
ChartGuru.RuleMark
LineStyle(float[])
Section titled “LineStyle(float[])”public RuleMark LineStyle(float[] dashPattern)Sets a dashed line style. Swift Charts equivalent: .LineStyle(StrokeStyle(dash:))
Parameters
| Name | Type |
|---|---|
dashPattern |
System.Single[] |
Returns
ChartGuru.RuleMark
LineStyle(StrokeStyle)
Section titled “LineStyle(StrokeStyle)”public RuleMark LineStyle(StrokeStyle style)Sets the full stroke style, including width and dash pattern. Swift Charts equivalent: .LineStyle(StrokeStyle(lineWidth:dash:)).
Parameters
| Name | Type |
|---|---|
style |
ChartGuru.StrokeStyle |
Returns
ChartGuru.RuleMark
GetMorphTargets(ChartType, Rect)
Section titled “GetMorphTargets(ChartType, Rect)”public override (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 override IChartMark Clone()Creates an independent copy of this Rule Mark; later configuration changes do not affect the original instance.
Returns
ChartGuru.IChartMark
Properties
Section titled “Properties”
MarkType
Section titled “MarkType”public override ChartType MarkType { get; }Returns
ChartGuru.ChartType
IsHorizontal
Section titled “IsHorizontal”public bool IsHorizontal { get; set; }Whether this is a horizontal (Y-value) or vertical (X-value) rule line.
Returns
System.Boolean
public float Value { get; set; }Returns
System.Single
LineWidth
Section titled “LineWidth”public float LineWidth { get; set; }Returns
System.Single
DashPattern
Section titled “DashPattern”public float[] DashPattern { get; set; }Returns
System.Single[]
public string Label { get; set; }Returns
System.String
ShowLabel
Section titled “ShowLabel”public bool ShowLabel { get; set; }Returns
System.Boolean
SecondaryMin
Section titled “SecondaryMin”public float? SecondaryMin { get; set; }For segment-based rules: the minimum value on the secondary axis. For a vertical rule, this is the Y minimum. For a horizontal rule, this is the X minimum. When set, the rule becomes a line segment instead of spanning the full axis.
Returns
System.Nullable{System.Single}
SecondaryMax
Section titled “SecondaryMax”public float? SecondaryMax { get; set; }For segment-based rules: the maximum value on the secondary axis.
Returns
System.Nullable{System.Single}
IsSegment
Section titled “IsSegment”public bool IsSegment { get; }Whether this rule is a segment (has both min and max defined).
Returns
System.Boolean
IsDashed
Section titled “IsDashed”public bool IsDashed { get; }Returns
System.Boolean