Skip to content

SwiftChartsDefaults

ClassChartGuruChartGuru
public static class SwiftChartsDefaults

The Swift Charts defaults the code generator, Swift importer, Swift exporter, mark constructors and ChartBuilder share, so a value omitted in one is the value the others assume. Each member states its evidence: Swift API semantics (the case or behavior Apple documents when no modifier is applied), measured from native captures, or not yet verified against native Swift Charts, in which case the value is Chart Guru's best match until the native calibration tasks (Tools/ChartGuru3DSwiftPreviews/IMPLEMENTATION_TASKS.md, P1 for 2D) measure it. Chart Guru's own defaults that Swift Charts does not have live in ChartGuruDefaults.

public const float CornerRadius = 2

Bar corner radius in points. Not yet verified against native Swift Charts (calibration task P1).

Returns

System.Single

public const float BarBandRatio = 0.7

Share of a category band a bar fills. Not yet verified against native Swift Charts (calibration task P1).

Returns

System.Single

public const float BarSpacing = 0.42857146

Gap between bars relative to a bar, derived from SwiftChartsDefaults.BarBandRatio.

Returns

System.Single

public const float UnitlessBarSize = 8

Width in points of a bar on a continuous axis. Not yet verified against native Swift Charts (calibration task P1).

Returns

System.Single

public const float LineWidth = 2

Line mark width in points. Not yet verified against native Swift Charts.

Returns

System.Single

public const float SymbolSize = 8

Point symbol diameter in points; Swift Charts sizes symbols by area. Not yet verified against native Swift Charts.

Returns

System.Single

public const SymbolShape Symbol = Automatic

Swift API semantics: marks pick their symbol from the symbol scale.

Returns

ChartGuru.SymbolShape

public const InterpolationMethod Interpolation = Linear

Swift API semantics: lines and areas connect points with straight segments.

Returns

ChartGuru.InterpolationMethod

public const MarkStackingMethod StackingMethod = Unstacked

The stacking a parsed mark starts with before the importer applies Swift’s stacking of bars and areas.

Returns

ChartGuru.MarkStackingMethod

public const float InnerRadius = 0.5

Chart Guru’s donut inner radius ratio, not a Swift Charts default: a Swift SectorMark without innerRadius: draws a pie. Same value as ChartGuruDefaults.DonutInnerRadius, which new code should use.

Returns

System.Single

public const bool ShowAreaLine = false

Swift API semantics: an AreaMark draws no line along its top.

Returns

System.Boolean

public const LegendPosition LegendPosition = Automatic

Swift API semantics: .chartLegend(position: .automatic).

Returns

ChartGuru.LegendPosition

public const LegendAlignment LegendAlignment = Automatic

Swift API semantics: the legend alignment its position implies.

Returns

ChartGuru.LegendAlignment

public const AxisPosition AxisPosition = Auto

Swift API semantics: AxisMarks(position: .automatic).

Returns

ChartGuru.AxisPosition

public const int AxisTickCount = 5

Desired number of axis ticks. Not yet verified against native Swift Charts.

Returns

System.Int32

public const int AutomaticAxisTickCount = 4

Desired number of automatic value-axis ticks. Not yet verified against native Swift Charts.

Returns

System.Int32

public const string AxisTickFormat = "F0"

Chart Guru’s numeric tick label format, not a Swift Charts value: Swift Charts formats tick labels for the locale automatically.

Returns

System.String

public static readonly float[] GridLineDash

Dash pattern in points of band-axis grid lines. Not yet verified against native Swift Charts.

Returns

System.Single[]

public const float GridLineWidth = 0.5

Grid line width in points. Not yet verified against native Swift Charts.

Returns

System.Single

public static Color GetSeriesColor(int index)

Returns the default palette color for a wrapping series index. Negative indices resolve to the first color.

Parameters

NameType
indexSystem.Int32

Returns

UnityEngine.Color

public static Color[] CreateDefaultSeriesColors()

Returns an independent copy of the default series palette that callers may modify safely.

Returns

UnityEngine.Color[]