Class AxisSmithBase
- Namespace
- LightningChartLib.WinForms.Charting.Axes
- Assembly
- LightningChart.WinForms.Charting.NET4.dll
Base class for smith axes.
[TypeConverter(typeof(ExpandableObjectConverter))]
public abstract class AxisSmithBase : AxisRoundBase, IChartNode, IDisposable, IHighlightingItem
- Inheritance
-
AxisSmithBase
- Implements
- Derived
- Inherited Members
Constructors
AxisSmithBase()
Constructor.
protected AxisSmithBase()
AxisSmithBase(ViewSmithBase)
Constructor
protected AxisSmithBase(ViewSmithBase owner)
Parameters
ownerViewSmithBaseparam owner M:LightningChartLib.WinForms.Charting.Axes.AxisSmithBase.#ctor(LightningChartLib.WinForms.Charting.Views.ViewSmith.ViewSmithBase)
Properties
AngularTickStyle
Angular ticks style.
public AxisTickStyleRound AngularTickStyle { get; set; }
Property Value
ClipGridInsideGraph
Defines if the gridline is visible outside the chart circle.
public bool ClipGridInsideGraph { get; set; }
Property Value
GridDivCount
Number of gridlines in the view. Used only if GridType is GridTypeSmith.DivCount
public int GridDivCount { get; set; }
Property Value
Remarks
The value defines number of gridlines to draw in real axis. Imaginary axis will have matching gridlines both on positive and negative side.
One line is always drawn on the center (absolute value of 1) of the grid. With values larger than 1, the lines are divided so that half of them are on left side of the first gridline, and half are on the right side, divided so that the lines are somewhat evenly divided, and placed on positions where their values can be expressed with nice looking values.
It should be noted that because half of the lines are on left side and half on the right and one always on the middle, only changes of 2 are meaningful. For instance, values 4 and 5 produce the same output, 1 in the middle, 2 on left side and 2 on right side.
By setting AutoFormatLabels property to false, SupplyCustomImgString and SupplyCustomRealString events can be used to redefine the label string for the gridlines.
GridReal and GridImg properties GridOptionsSmith.CustomGridLines property can be used To place custom gridlines on the view.
GridDivSpacing
Approximate distance between gridlines in pixels. Used only if GridType is GridTypeSmith.Distance.
public double GridDivSpacing { get; set; }
Property Value
Remarks
The final distance between gridline positions is not precisely the requested distance, but the requested distance is only taken as starting point, and a value is then search from around that point that can be presented as a “nice” looking string.
Current reference value has a small effect on the gridline positions, as it’ll affect on what are the nice values we end up putting the gridlines to.
It should also be noted that each Real gridline has matching Imaginary gridline. At certain parts of the chart the imaginary gridlines are naturally more close to each other than the real gridlines, and thus have more effect on the positioning of the gridlines than the real gridlines.
By setting AutoFormatLabels property to false, SupplyCustomImgString and SupplyCustomRealString events can be used to redefine the label string for the gridlines.
GridReal and GridImg properties GridOptionsSmith.CustomGridLines property can be used To place custom gridlines on the view.
GridImg
Gridline options for the real-part grid.
public GridOptionsSmith GridImg { get; set; }
Property Value
GridReal
Gridline options for the real-part grid.
public GridOptionsSmith GridReal { get; set; }
Property Value
GridType
Defines how the grid is defined. If the value is Distance, GridDivSpacing property will affect the positioning and amount of gridlines. Otherwise GridDivCount will be used in calculations.
public GridTypeSmith GridType { get; set; }
Property Value
RealAxisLineVisible
Show Real axis.
public bool RealAxisLineVisible { get; set; }
Property Value
ReferenceValue
Reference value (maximum) of the real Axis.
public double ReferenceValue { get; set; }
Property Value
ShowAbsoluteValues
Determines if the axis shows absolute or normalized values.
public bool ShowAbsoluteValues { get; set; }
Property Value
Methods
AbsImg(double)
Convert the normalized imaginary value to absolute scale.
protected double AbsImg(double Img)
Parameters
ImgdoubleNormed imaginary axis value to convert back to absolute values.
Returns
- double
Absolute Imaginary axis value.
AbsReal(double)
Convert the normalized real value to absolute scale.
protected double AbsReal(double Real)
Parameters
RealdoubleNormed RealValue axis value to convert back to absolute value.
Returns
- double
Absolute RealValue-axis value.
AbsToNorm(double)
Converts absolute smith view value to normed value. Normed value 1 is at the center of the chart. Normed value 1 matches the given absolute reference value.
public double AbsToNorm(double value)
Parameters
valuedoubleSmith values imaginary or real part to convert.
Returns
- double
Normed smith value.
AxisEventToString(object, SupplyCustomImgStringEventArgs)
Convert angle to string.
protected void AxisEventToString(object o, SupplyCustomImgStringEventArgs args)
Parameters
oobjectDummy
argsSupplyCustomImgStringEventArgsArguments
AxisEventToString(object, SupplyCustomRealStringEventArgs)
Convert value to string.
protected void AxisEventToString(object o, SupplyCustomRealStringEventArgs args)
Parameters
oobjectDummy
argsSupplyCustomRealStringEventArgsArguments
Construct()
Create members.
protected override void Construct()
CoordToValue(PointFloat, bool)
Converts Screen Coordinates to absolute Real/Imaginary value pair.
public PointSmith CoordToValue(PointFloat coord, bool useDIP = true)
Parameters
coordPointFloatparam coord M:LightningChartLib.WinForms.Charting.Axes.AxisSmithBase.CoordToValue(LightningChartLib.WinForms.Charting.PointFloat,System.Boolean) useDIPboolparam useDIP M:LightningChartLib.WinForms.Charting.Axes.AxisSmithBase.CoordToValue(LightningChartLib.WinForms.Charting.PointFloat,System.Boolean)
Returns
- PointSmith
returns M:LightningChartLib.WinForms.Charting.Axes.AxisSmithBase.CoordToValue(LightningChartLib.WinForms.Charting.PointFloat,System.Boolean)
CoordToValue(float, float, out double, out double, bool)
Screen Coordinate to absolute RealValue,Imaginary value pair.
public void CoordToValue(float x, float y, out double real, out double imaginary, bool useDIP = true)
Parameters
xfloatX-coordinate in the chart area.
yfloatY-coordinate in the chart area. Values grow downwards.
realdoubleValue of the RealValue axis corresponding to the given coordinate pair.
imaginarydoubleValue of the Imaginary axis corresponding to the given coordinate pair. Values grow upwards.
useDIPboolUse DIP instead of pixels as parameters.
CreateGridOptionsAngular()
Create angular grid options
protected override void CreateGridOptionsAngular()
CreateGridOptionsImg()
Create imaginary grid options
protected virtual void CreateGridOptionsImg()
CreateGridOptionsReal()
Create real grid options
protected virtual void CreateGridOptionsReal()
CreateLabelsFont()
Create labels' font
protected override void CreateLabelsFont()
Dispose(bool)
Clean up any resources being used.
protected override void Dispose(bool disposing)
Parameters
disposingbooltrue if managed resources should be disposed, otherwise false.
NormImg(double)
Normalize the absolute imaginary axis value. Means z(d) => r+jx, where ImgR(z(d)) = j(X/Z0).
protected double NormImg(double Img)
Parameters
ImgdoubleAbsolute imaginary axis value to normalize to -1..1 range.
Returns
- double
Normalized imaginary axis value, in range -1..1. Values can be larger, of course, but then they reside outside the unit circle.
Remarks
NormReal(double)
Normalize the absolute real axis value. Means z(d) => r+jx, where RealR(z(d)) = R/Z0.
protected double NormReal(double Real)
Parameters
RealdoubleAbsolute real axis value to normalize.
Returns
- double
Normalized real axis value. Normalized to range 0..1. Values outside this range do not fit in the Unit circle.
Remarks
No reason to keep NormReal and NormImg separate, except that not sure if there will be changes later.
See http://care.iitd.ac.in/People/Faculty/bspanwar/crl713/smith_chart_basics.pdf page 145.
NormToAbs(double)
Converts normed smith view value to absolute value. Normed value 1 matches the given absolute reference value.
public double NormToAbs(double value)
Parameters
valuedoubleSmith values imaginary or real part to convert.
Returns
- double
Absolute smith value.
ToString()
Item to string.
public override string ToString()
Returns
- string
String.
ValueToCoord(IPointRound, bool)
Converts given smith value to screen coordinates.
public override PointFloat ValueToCoord(IPointRound value, bool useDIP = true)
Parameters
valueIPointRoundSmith value to convert.
useDIPboolUse DIP instead of pixels as parameters.
Returns
- PointFloat
Screen coordinates matching the given parameter.
ValueToCoord(PointSmith, bool)
Converts smith value to screen coordinates.
public PointFloat ValueToCoord(PointSmith value, bool useDIP = true)
Parameters
valuePointSmithSmith value to convert.
useDIPboolUse DIP instead of pixels as parameters.
Returns
- PointFloat
Unrounded screen coordinates.
ValueToCoord(double, double, out float, out float, bool)
Converts smith value to screen coordinates.
public void ValueToCoord(double real, double imaginary, out float x, out float y, bool useDIP = true)
Parameters
realdoubleValue of the RealValue axis.
imaginarydoubleValue of the Imaginary axis. Positive values upwards.
xfloatX-coordinate in the chart area.
yfloatY-coordinate in the chart area. Values grow downwards.
useDIPboolUse DIP instead of pixels as parameters.
ValueToUCValue(IPointSmith)
Value to Unit Circle (UC) value.
public PointFloat ValueToUCValue(IPointSmith point)
Parameters
pointIPointSmithparam point M:LightningChartLib.WinForms.Charting.Axes.AxisSmithBase.ValueToUCValue(LightningChartLib.WinForms.Charting.IPointSmith)
Returns
- PointFloat
returns M:LightningChartLib.WinForms.Charting.Axes.AxisSmithBase.ValueToUCValue(LightningChartLib.WinForms.Charting.IPointSmith)
Events
RangeChanged
Range has changed (Minimum or Maximum value).
public event AxisSmithBase.RangeChangedEventHandler RangeChanged
Event Type
SupplyCustomImgString
Event to format imaginary value as a custom string.
public event AxisSmithBase.SupplyCustomImgStringEventHandler SupplyCustomImgString
Event Type
SupplyCustomRealString
Event to format real value as a custom string.
public event AxisSmithBase.SupplyCustomRealStringEventHandler SupplyCustomRealString