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
ownerViewXYparam 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
ownerViewXYparam owner M:LightningChartLib.WinForms.Charting.Axes.AxisY.#ctor(LightningChartLib.WinForms.Charting.Views.ViewXY.ViewXY,System.Boolean) attachToViewboolparam 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
AllowAutoYFit
Allow automatic Y fitting.
public bool AllowAutoYFit { get; set; }
Property Value
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
MiniScale
Miniature scale symbol.
public MiniScale MiniScale { get; set; }
Property Value
PaletteSeries
Palette is retrieved from this series for Y value range.
public PointLineSeriesBase PaletteSeries { get; set; }
Property Value
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
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
SegmentIndex
Axis segment index. Used only with YAxesLayout Segmented.
public int SegmentIndex { get; set; }
Property Value
Title
Axis title.
public AxisYTitle Title { get; set; }
Property Value
Units
Axis units.
public AxisYTitle Units { get; set; }
Property Value
UsePalette
Use palette from referenced series for Y-axis coloring.
public bool UsePalette { get; set; }
Property Value
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
coordYfloatY screen coordinate.
valuedoubleOutput value.
useDIPboolUse 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
coordsYfloat[]Screen coordinates
valuesdouble[]Output values
useDIPboolparam 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
disposingbooltrue 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
marginPercentsdoubleMargin to leave between axis minimum or maximum and series values, in percent of minimum...maximum range.
scaleChangedboolMethod sets this true if Y-axis minimum or maximum has changed.
thoroughboolIf true, all series points are searched, resulting to better accuracy, but with a cost raised CPU load.
ignoreLogZerosboolIgnore 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
marginPercentsdoubleMargin to leave between axis minimum or maximum and series values, in percent of minimum...maximum range.
scaleChangedboolMethod sets this true if Y-axis minimum or maximum has changed.
thoroughboolIf true, all series points are searched, resulting to better accuracy, but with a cost raised CPU load.
ignoreLogZerosboolIgnore zeros values from logarithmic axis fitting.
limitMinimumdoubleMinimum limit. If detected minimum is below limitMinimum, then limit is applied.
limitMaximumdoubleMaximum 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
marginPixelsintMargin to leave between data and segment boundaries, in pixels of minimum...maximum range.
scaleChangedboolMethod sets this true if Y-axis minimum or maximum has changed.
thoroughboolIf true, all series points are searched, resulting to better accuracy, but with a cost raised CPU load.
ignoreLogZerosboolIgnore 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
marginPixelsintMargin to leave between data and segment boundaries, in pixels of minimum...maximum range.
scaleChangedboolMethod sets this true if Y-axis minimum or maximum has changed.
thoroughboolIf true, all series points are searched, resulting to better accuracy, but with a cost raised CPU load.
ignoreLogZerosboolIgnore zeros values from logarithmic axis fitting.
limitMinimumdoubleMinimum limit. If detected minimum is below limitMinimum, then limit is applied.
limitMaximumdoubleMaximum 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
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
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
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
contextStreamingContextContext
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
Returns
- float
Coordinate.
ValuesToCoords(double[], bool)
Convert values to Y-coordinates.
public float[] ValuesToCoords(double[] values, bool useDIP = true)
Parameters
Returns
- float[]
Coordinates.