Class AxisX
- Namespace
- LightningChartLib.WinForms.Charting.Axes
- Assembly
- LightningChart.WinForms.Charting.NET4.dll
X axis class
[TypeConverter(typeof(ExpandableObjectConverter))]
public class AxisX : AxisXYBase, IChartNode, IDisposable, IHighlightingItem
- Inheritance
-
AxisX
- Implements
- Inherited Members
Constructors
AxisX()
Constructor for Form designer's list editor
public AxisX()
AxisX(ViewXY)
Constructor
public AxisX(ViewXY owner)
Parameters
ownerViewXYparam owner M:LightningChartLib.WinForms.Charting.Axes.AxisX.#ctor(LightningChartLib.WinForms.Charting.Views.ViewXY.ViewXY)
Properties
AllowScaling
Axis min and max values adjust by user.
public bool AllowScaling { get; set; }
Property Value
ExplicitAutoPlacementSide
Axis automatic location, when XAxisAutoPlacement is Explicit.
public XAxisExplicitAutoPlacementSide ExplicitAutoPlacementSide { get; set; }
Property Value
GridSegmentIndex
GridSegmentIndex. Clip grid inside segment of the index. If this set to -1, no grid cliping occurs of the X-axis. If index is greater than zero, clip the grid of the certain segment.
public int GridSegmentIndex { get; set; }
Property Value
LabelsPosition
Labels position.
public Alignment LabelsPosition { get; set; }
Property Value
Position
X-axis placement as percents of the graph height. 0 sets the axis in top edge, 50 in the middle and 100 in bottom edge.
public double Position { get; set; }
Property Value
ScaleBreaks
ScaleBreaks list. Used to not display defined axis value ranges.
public ScaleBreakList ScaleBreaks { get; set; }
Property Value
ScrollMode
Scroll mode. In real-time monitoring, set 'Scrolling', 'Sweeping' or 'Stepping', and give current monitoring position via ScrollPosition property. If not real-time monitoring, but displaying data normally, you should set this to 'None' (default).
public XAxisScrollMode ScrollMode { get; set; }
Property Value
Remarks
Zooming is disabled when ScrollMode is 'Sweeping'. Log axis are disabled in other modes than 'None'.
ScrollPosition
Current real-time scrolling position, in X axis values. This is intended to be updated by the real-time monitoring process.
public double ScrollPosition { get; set; }
Property Value
ScrollingGap
Scrolling gap, percents of graph width. Used when ScrollType is set to Scrolling. If this set to 0, scrolling occurs when scroll position reaches end of the X-axis. Valid range is 0...90 %
public double ScrollingGap { get; set; }
Property Value
SteppingInterval
Stepping interval. Used when ScrollType is set to Stepping. Current scrolling position, in number values (ValueType = Number) or seconds (ValueType = Time).
public double SteppingInterval { get; set; }
Property Value
SweepingGap
Sweeping gap, percents of graph width. Used when ScrollType is set to Sweeping. Valid range is 0...20 %
public double SweepingGap { get; set; }
Property Value
Title
Axis title.
public AxisXTitle Title { get; set; }
Property Value
Triggering
Triggering options. Used when ScrollMode is 'Triggered'.
public Triggering Triggering { get; set; }
Property Value
Units
Axis units.
public AxisXTitle Units { get; set; }
Property Value
VerticalAlign
Axis alignment from its calculated position.
public AlignmentVertical VerticalAlign { get; set; }
Property Value
Methods
Construct()
Initialize members.
protected override void Construct()
CoordToValue(int, out double, bool, bool)
Convert X screen coordinate (in DIPs or PX) to value on X axis.
public bool CoordToValue(int xCoord, out double xValue, bool rangeValidation, bool UseDIP = true)
Parameters
xCoordintX screen coordinate
xValuedoubleX value
rangeValidationboolLimits coordinate in visible graph range. Does not validate sweeping gap either.
UseDIPboolDefines if the xCoord parameter is interpreted as DIP's or PX.
Returns
- bool
True if the coordinate was successfully converted. Returns false if the coordinate range validation failed. graph area or it's over a sweeping gap.
Exceptions
- Exception
Throws exception if x coordinate is not over graph area.
CoordsToValues(int[], out double[], bool)
Convert X screen coordinates to values on X axis.
public bool CoordsToValues(int[] xCoords, out double[] xValues, bool UseDIP = true)
Parameters
xCoordsint[]X screen coordinates
xValuesdouble[]X values
UseDIPboolIf true, xCoords is interpreted as coordinates in DIPs, otherwise in PX.
Returns
- bool
True if the coordinate was successfully converted.
Remarks
Only works when ScrollMode is not 'Sweeping'
Exceptions
- Exception
Throws exception if x coordinate is not over graph area.
CreateMajorTickStyle()
Create major grid style.
protected override void CreateMajorTickStyle()
CreateMinorTickStyle()
Create minor tick style.
protected override void CreateMinorTickStyle()
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(out bool, bool)
Modifies the axis ranges so that all the data fits into the view.
public void Fit(out bool scaleChanged, bool thorough)
Parameters
scaleChangedboolDefines if the scale was actually changed due to this operation.
thoroughboolForces recalculation of the Min / Max values, instead of using cached values.
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)
Converts X value to screen coordinate
public float ValueToCoord(double xValue, bool UseDIP = true)
Parameters
Returns
- float
X screen coordinate
Remarks
If X axis scroll mode is set to 'Sweeping', returns correct value only when value is inside first sweep page. You should consider decrementing graph width from returned value if the value is on second sweep page.
ValueToCoordD(double, bool)
Converts X value to screen coordinate. Version that returns double instead of float.
public double ValueToCoordD(double xValue, bool UseDIP = true)
Parameters
Returns
- double
X screen coordinate
Remarks
If X axis scroll mode is set to 'Sweeping', returns correct value only when value is inside first sweep page. You should consider decrementing graph width from returned value if the value is on second sweep page.
ValuesToCoords(double[], bool)
Converts X value to screen coordinates
public float[] ValuesToCoords(double[] xValues, bool UseDIP = true)
Parameters
Returns
- float[]
X screen coordinates
Remarks
If X axis scroll mode is set to 'Sweeping', returns correct value only when value is inside first sweep page. You should consider decrementing graph width from returned value if the value is on second sweep page.