Table of Contents

Class AxisY

Namespace
LightningChartLib.WinForms.Charting.Axes
Assembly
LightningChart.WinForms.Charting.NET4.dll

Y-axis class.

[TypeConverter(typeof(ExpandableObjectConverter))]
public class AxisY : AxisXYBase, IChartNode, IDisposable, IHighlightingItem
Inheritance
AxisY
Implements
Inherited Members

Constructors

AxisY()

Constructor for Form designer's list editor.

public AxisY()

AxisY(ViewXY)

Constructor.

public AxisY(ViewXY owner)

Parameters

owner ViewXY
param owner M:LightningChartLib.WinForms.Charting.Axes.AxisY.#ctor(LightningChartLib.WinForms.Charting.Views.ViewXY.ViewXY)

AxisY(ViewXY, bool)

Constructor.

public AxisY(ViewXY owner, bool attachToView)

Parameters

owner ViewXY
param owner M:LightningChartLib.WinForms.Charting.Axes.AxisY.#ctor(LightningChartLib.WinForms.Charting.Views.ViewXY.ViewXY,System.Boolean)
attachToView bool
param attachToView M:LightningChartLib.WinForms.Charting.Axes.AxisY.#ctor(LightningChartLib.WinForms.Charting.Views.ViewXY.ViewXY,System.Boolean)

Properties

Alignment

Axis alignment from its calculated position.

public AlignmentHorizontal Alignment { get; set; }

Property Value

AlignmentHorizontal

AllowAutoYFit

Allow automatic Y fitting.

public bool AllowAutoYFit { get; set; }

Property Value

bool

Remarks

This setting does not effect, if TargetAllYAxes is set in auto fit options.

ExplicitAutoPlacementSide

Axis automatic location, when YAxisAutoPlacement is Explicit.

public YAxisExplicitAutoPlacementSide ExplicitAutoPlacementSide { get; set; }

Property Value

YAxisExplicitAutoPlacementSide

MiniScale

Miniature scale symbol.

public MiniScale MiniScale { get; set; }

Property Value

MiniScale

PaletteSeries

Palette is retrieved from this series for Y value range.

public PointLineSeriesBase PaletteSeries { get; set; }

Property Value

PointLineSeriesBase

Remarks

This value is not serialized because it must be linked to chart contained series.

Position

Y-axis placement as percents of the graph width. 0 sets the axis in left edge, 50 in the middle and 100 in right edge.

public double Position { get; set; }

Property Value

double

PositionOffset

Position offset shifts the axis by pixel count set. It allows placing the axis for example outside the graph area, handy feature when you have many Y axis and you don't want them to overlap series data.

public int PositionOffset { get; set; }

Property Value

int

SegmentIndex

Axis segment index. Used only with YAxesLayout Segmented.

public int SegmentIndex { get; set; }

Property Value

int

Title

Axis title.

public AxisYTitle Title { get; set; }

Property Value

AxisYTitle

Units

Axis units.

public AxisYTitle Units { get; set; }

Property Value

AxisYTitle

UsePalette

Use palette from referenced series for Y-axis coloring.

public bool UsePalette { get; set; }

Property Value

bool

Methods

Construct()

Initialize members.

protected override void Construct()

CoordToValue(float, out double, bool)

Convert screen coordinate to value.

public bool CoordToValue(float coordY, out double value, bool useDIP = true)

Parameters

coordY float

Y screen coordinate.

value double

Output value.

useDIP bool

Use DIP instead of pixels as parameters.

Returns

bool

True if OK.

CoordsToValues(float[], out double[], bool)

Convert screen coordinates to values.

public bool CoordsToValues(float[] coordsY, out double[] values, bool useDIP = true)

Parameters

coordsY float[]

Screen coordinates

values double[]

Output values

useDIP bool
param useDIP M:LightningChartLib.WinForms.Charting.Axes.AxisY.CoordsToValues(System.Single[],System.Double[]@,System.Boolean)

Returns

bool

True if OK.

CreateScaleNib()

Create scale nib.

protected override void CreateScaleNib()

CreateTitle()

Create title.

protected virtual void CreateTitle()

CreateUnits()

Create units.

protected virtual void CreateUnits()

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true if managed resources should be disposed, otherwise false.

Fit(double, out bool, bool, bool)

Fit axis minimum and maximum to show all series values. Note that first argument's value type defines Margin's units (Pixels or Percent).

public void Fit(double marginPercents, out bool scaleChanged, bool thorough, bool ignoreLogZeros)

Parameters

marginPercents double

Margin to leave between axis minimum or maximum and series values, in percent of minimum...maximum range.

scaleChanged bool

Method sets this true if Y-axis minimum or maximum has changed.

thorough bool

If true, all series points are searched, resulting to better accuracy, but with a cost raised CPU load.

ignoreLogZeros bool

Ignore zeros values from logarithmic axis fitting.

Remarks

For logarithmic axis, call Fit method with pixel range, for appropriate behavior.

Fit(double, out bool, bool, bool, double, double)

Fit axis minimum and maximum to show all series values, while keeping the range within given limits. Note that first argument's value type defines Margin's units (Pixels or Percent).

public void Fit(double marginPercents, out bool scaleChanged, bool thorough, bool ignoreLogZeros, double limitMinimum, double limitMaximum)

Parameters

marginPercents double

Margin to leave between axis minimum or maximum and series values, in percent of minimum...maximum range.

scaleChanged bool

Method sets this true if Y-axis minimum or maximum has changed.

thorough bool

If true, all series points are searched, resulting to better accuracy, but with a cost raised CPU load.

ignoreLogZeros bool

Ignore zeros values from logarithmic axis fitting.

limitMinimum double

Minimum limit. If detected minimum is below limitMinimum, then limit is applied.

limitMaximum double

Maximum limit. If detected maximum is above limitMaximum, then limit is applied.

Remarks

For logarithmic axis, call Fit method with pixel range, for appropriate behavior.

Fit(int, out bool, bool, bool)

Fit axis minimum and maximum to show all series values. Note that first argument's value type defines Margin's units (Pixels or Percent).

public void Fit(int marginPixels, out bool scaleChanged, bool thorough, bool ignoreLogZeros)

Parameters

marginPixels int

Margin to leave between data and segment boundaries, in pixels of minimum...maximum range.

scaleChanged bool

Method sets this true if Y-axis minimum or maximum has changed.

thorough bool

If true, all series points are searched, resulting to better accuracy, but with a cost raised CPU load.

ignoreLogZeros bool

Ignore zeros values from logarithmic axis fitting.

Remarks

Works well for log axes too.

Fit(int, out bool, bool, bool, double, double)

Fit axis minimum and maximum to show all series values, while keeping the range within given limits. Note that first argument's value type defines Margin's units (Pixels or Percent).

public void Fit(int marginPixels, out bool scaleChanged, bool thorough, bool ignoreLogZeros, double limitMinimum, double limitMaximum)

Parameters

marginPixels int

Margin to leave between data and segment boundaries, in pixels of minimum...maximum range.

scaleChanged bool

Method sets this true if Y-axis minimum or maximum has changed.

thorough bool

If true, all series points are searched, resulting to better accuracy, but with a cost raised CPU load.

ignoreLogZeros bool

Ignore zeros values from logarithmic axis fitting.

limitMinimum double

Minimum limit. If detected minimum is below limitMinimum, then limit is applied.

limitMaximum double

Maximum limit. If detected maximum is above limitMaximum, then limit is applied.

Remarks

Works well for log axes too.

GetBarsMinMaxOfThisYAxis(out double, out double, bool)

Get bar series minimum and maximum value, bound to this Y axis. If stacked bar view is used, returns the highest stack sum.

public bool GetBarsMinMaxOfThisYAxis(out double totalMin, out double totalMax, bool ignoreZeros)

Parameters

totalMin double

Total minimum.

totalMax double

Total maximum.

ignoreZeros bool

Ignore zeros.

Returns

bool

True if successfully got.

GetGraphSegmentTopAndHeight(out float, out float)

Gets the axis graph segment top and height in pixels.

public bool GetGraphSegmentTopAndHeight(out float segmentTop, out float segmentHeight)

Parameters

segmentTop float

Segment top in pixels.

segmentHeight float

Segment height in pixels.

Returns

bool

True on successful result, else false.

GetSeriesMinMax(out double, out double)

Get minimum and maximum of all series that are using this axis.

public bool GetSeriesMinMax(out double minimum, out double maximum)

Parameters

minimum double

Minimum.

maximum double

Maximum.

Returns

bool

True if success. False if no data found.

OnDeserialized(StreamingContext)

OnDeserialized is called just after the object has been deserialized

[OnDeserialized]
protected void OnDeserialized(StreamingContext context)

Parameters

context StreamingContext

Context

ToString()

Converts object to string representation.

public override string ToString()

Returns

string

Object as string.

ValueToCoord(double, bool)

Convert value to Y-coordinate.

public float ValueToCoord(double value, bool useDIP = true)

Parameters

value double

Axis value.

useDIP bool

Use DIP instead of pixels as parameters.

Returns

float

Coordinate.

ValuesToCoords(double[], bool)

Convert values to Y-coordinates.

public float[] ValuesToCoords(double[] values, bool useDIP = true)

Parameters

values double[]

Axis values.

useDIP bool

Use DIP instead of pixels as parameters.

Returns

float[]

Coordinates.