Skip to content
ChartForgeX
Class

ChartAxisGridStyle

ChartForgeX.Core

Namespace
ChartForgeX.Core
Assembly
ChartForgeX
Modifiers
sealed

Styles the grid lines and alternating bands drawn at one Cartesian axis's ticks.

Inheritance

  • object
  • ChartAxisGridStyle

Remarks

Unset values inherit the chart's ChartGridLineStyle and the theme grid colour. The chart's ShowGrid switch still hides every grid. Minor lines follow ChartAxis.MinorTickCount.

Usage

Explore 12 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.

Accepted by parameters 2

Constructors

public ChartAxisGridStyle() #

Methods

public ChartAxisGridStyle Clone() #

Creates an independent copy.

WithBands 2 overloads
public ChartAxisGridStyle WithBands(bool visible = true) #

Fills every other interval between adjacent major ticks with a neutral tint of the theme grid colour, or removes the bands.

Parameters

visible bool = true optional
public ChartAxisGridStyle WithBands(ChartColor color, double? opacity = null) #

Fills every other interval between adjacent major ticks with an authored colour; null opacity uses 0.08.

Parameters

color ChartForgeX.Primitives.ChartColor required
opacity double? = null optional
public ChartAxisGridStyle WithColor(ChartColor? color) #

Sets the line colour; null restores the theme grid colour.

Parameters

color ChartForgeX.Primitives.ChartColor? required
public ChartAxisGridStyle WithDash(double dash, double gap) #

Sets dash and gap lengths. A zero dash draws solid lines even when the chart grid is dashed.

Parameters

dash double required
gap double required
public ChartAxisGridStyle WithInheritedDash() #

Restores the chart's dash policy.

public ChartAxisGridStyle WithLines(bool? visible = true) #

Shows or hides this axis's grid lines regardless of the chart's line policy; null restores that policy.

Parameters

visible bool? = true optional
public ChartAxisGridStyle WithMinorOpacity(double? opacity) #

Sets minor line opacity; null uses half the major line opacity.

Parameters

opacity double? required
public ChartAxisGridStyle WithOpacity(double? opacity) #

Sets major line opacity; null restores the chart policy.

Parameters

opacity double? required
public ChartAxisGridStyle WithStrokeWidth(double? width) #

Sets the line width; null restores the chart policy.

Parameters

width double? required

Properties

public bool? ShowLines { get; set; } #

Gets or sets whether this axis draws grid lines, or null to follow the chart's horizontal and vertical line policy.

public ChartColor? Color { get; set; } #

Gets or sets the line colour, or null for the theme grid colour.

public double? Opacity { get; set; } #

Gets or sets major line opacity from zero to one, or null for the chart policy.

public double? StrokeWidth { get; set; } #

Gets or sets the line width in drawing units, or null for the chart policy.

public double? Dash { get; } #

Gets the dash length, or null for the chart policy. Zero draws solid lines.

public double? Gap { get; } #

Gets the gap between dashes, or null for the chart policy.

public double? MinorOpacity { get; set; } #

Gets or sets minor line opacity, or null for half the major line opacity.

public bool ShowBands { get; set; } #

Gets or sets whether every other interval between adjacent major ticks is filled.

public ChartColor? BandColor { get; set; } #

Gets or sets the band fill, or null for a neutral tint of the theme grid colour.

public double? BandOpacity { get; set; } #

Gets or sets band opacity from zero to one, or null for 0.5 of the theme grid colour or 0.08 of an authored colour.