Table of Contents

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

owner ViewSmithBase
param 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

AxisTickStyleRound

ClipGridInsideGraph

Defines if the gridline is visible outside the chart circle.

public bool ClipGridInsideGraph { get; set; }

Property Value

bool

GridDivCount

Number of gridlines in the view. Used only if GridType is GridTypeSmith.DivCount

public int GridDivCount { get; set; }

Property Value

int

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

double

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

GridOptionsSmith

GridReal

Gridline options for the real-part grid.

public GridOptionsSmith GridReal { get; set; }

Property Value

GridOptionsSmith

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

GridTypeSmith

RealAxisLineVisible

Show Real axis.

public bool RealAxisLineVisible { get; set; }

Property Value

bool

ReferenceValue

Reference value (maximum) of the real Axis.

public double ReferenceValue { get; set; }

Property Value

double

ShowAbsoluteValues

Determines if the axis shows absolute or normalized values.

public bool ShowAbsoluteValues { get; set; }

Property Value

bool

Methods

AbsImg(double)

Convert the normalized imaginary value to absolute scale.

protected double AbsImg(double Img)

Parameters

Img double

Normed 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

Real double

Normed 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

value double

Smith 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

o object

Dummy

args SupplyCustomImgStringEventArgs

Arguments

AxisEventToString(object, SupplyCustomRealStringEventArgs)

Convert value to string.

protected void AxisEventToString(object o, SupplyCustomRealStringEventArgs args)

Parameters

o object

Dummy

args SupplyCustomRealStringEventArgs

Arguments

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

coord PointFloat
param coord M:LightningChartLib.WinForms.Charting.Axes.AxisSmithBase.CoordToValue(LightningChartLib.WinForms.Charting.PointFloat,System.Boolean)
useDIP bool
param 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

x float

X-coordinate in the chart area.

y float

Y-coordinate in the chart area. Values grow downwards.

real double

Value of the RealValue axis corresponding to the given coordinate pair.

imaginary double

Value of the Imaginary axis corresponding to the given coordinate pair. Values grow upwards.

useDIP bool

Use 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

disposing bool

true 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

Img double

Absolute 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

Real double

Absolute 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

value double

Smith 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

value IPointRound

Smith value to convert.

useDIP bool

Use 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

value PointSmith

Smith value to convert.

useDIP bool

Use 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

real double

Value of the RealValue axis.

imaginary double

Value of the Imaginary axis. Positive values upwards.

x float

X-coordinate in the chart area.

y float

Y-coordinate in the chart area. Values grow downwards.

useDIP bool

Use DIP instead of pixels as parameters.

ValueToUCValue(IPointSmith)

Value to Unit Circle (UC) value.

public PointFloat ValueToUCValue(IPointSmith point)

Parameters

point IPointSmith
param 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

AxisSmithBase.RangeChangedEventHandler

SupplyCustomImgString

Event to format imaginary value as a custom string.

public event AxisSmithBase.SupplyCustomImgStringEventHandler SupplyCustomImgString

Event Type

AxisSmithBase.SupplyCustomImgStringEventHandler

SupplyCustomRealString

Event to format real value as a custom string.

public event AxisSmithBase.SupplyCustomRealStringEventHandler SupplyCustomRealString

Event Type

AxisSmithBase.SupplyCustomRealStringEventHandler