Table of Contents

Class StockSeries

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

CandleStick series

[TypeConverter(typeof(ExpandableObjectConverter))]
public class StockSeries : SeriesBaseXY, IChartNode, IDisposable, IHighlightingItem, IRealtimeShiftable
Inheritance
StockSeries
Implements
Inherited Members

Constructors

StockSeries()

Constructor

public StockSeries()

StockSeries(ViewXY, AxisX, AxisY)

Constructor

public StockSeries(ViewXY owner, AxisX axisX, AxisY axisY)

Parameters

owner ViewXY

Parent.

axisX AxisX

X axis you want to bind

axisY AxisY

Y axis you want to bind

Properties

Behind

StockSeries is drawn behind line series.

public bool Behind { get; set; }

Property Value

bool

ColorStickDown

Stick color when series Close value less than Open.

public Color ColorStickDown { get; set; }

Property Value

Color

ColorStickUp

Stick color when series Close value greater than Open.

public Color ColorStickUp { get; set; }

Property Value

Color

CursorTrackEnabled

Cursor tracking enabled.

public bool CursorTrackEnabled { get; set; }

Property Value

bool

DataCount

Series data count.

public int DataCount { get; }

Property Value

int

DataPoints

Series data points

public StockSeriesData[] DataPoints { get; set; }

Property Value

StockSeriesData[]

FillBorder

Fill border.

public Border FillBorder { get; set; }

Property Value

Border

FillDown

Fill when series Close value less than Open.

public Fill FillDown { get; set; }

Property Value

Fill

FillUp

Fill when series Close value greater than Open.

public Fill FillUp { get; set; }

Property Value

Fill

ItemWidth

Item width.

public int ItemWidth { get; set; }

Property Value

int

Name

Name of series.

public string Name { get; set; }

Property Value

string

Packing

Packing state. If packing is On, several data values will be packed to a single rendered item.

public StockSeriesPacking Packing { get; set; }

Property Value

StockSeriesPacking

ScrollModePointsKeepLevel

Tells how often the draw data is cleared when using X-axis scroll mode. Valid range is 1...100 1 frees the draw data and the reconstructs the draw data after every 1/10 scroll page. Use this when there's not much memory available. 100 frees the draw data and the reconstructs the draw data after every 100/10 = 10 pages. Use this when smooth scroll with high FPS is important. Reserves some extra memory.

public int ScrollModePointsKeepLevel { get; set; }

Property Value

int

SeriesEventMarkers

Series event markers

public SeriesEventMarkerList SeriesEventMarkers { get; set; }

Property Value

SeriesEventMarkerList

Statistics

Statistics of the series.

public LineSeriesStat Statistics { get; }

Property Value

LineSeriesStat

StickWidth

Stick width.

public int StickWidth { get; set; }

Property Value

int

Style

Stock style.

public StockStyle Style { get; set; }

Property Value

StockStyle

Title

Series title

public SeriesTitle Title { get; set; }

Property Value

SeriesTitle

Methods

AddPoints(StockSeriesData[], bool)

Add points to end of series

public int AddPoints(StockSeriesData[] points, bool invalidateChart)

Parameters

points StockSeriesData[]

Series points

invalidateChart bool

Update chart after adding. Updating will raise CPU load, so you maybe don't want to use this with every call if points are added many times per second.

Returns

int

Point count after adding

Remarks

If X and Y array lengths do not match, shorter array count of points are added

Clear()

Clear all points

public override void Clear()

Construct()

Create members.

protected override void Construct()

CreateTitle()

summary M:LightningChartLib.WinForms.Charting.SeriesXY.StockSeries.CreateTitle
protected override void CreateTitle()

DeletePointsBeforeX(double, AxisX, bool)

Delete Points having smaller X value than given value.

public void DeletePointsBeforeX(double xValue, AxisX axis, bool compactMemory = true)

Parameters

xValue double

X value.

axis AxisX

x axis what to check

compactMemory bool

Compact memory.

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.

GetItemOnUserInteractiveDeviceLocation(out StockSeriesData)

Get item which the user interactive device is over.

public bool GetItemOnUserInteractiveDeviceLocation(out StockSeriesData item)

Parameters

item StockSeriesData

Item on user interactive device location

Returns

bool

True if info found, false otherwise.

GetMinMaxFromXRange(out double, out double, double, double, bool)

Get min and max Y value withing given X range

public bool GetMinMaxFromXRange(out double yMin, out double yMax, double xRangeMin, double xRangeMax, bool ignoreZeros)

Parameters

yMin double

Minimum Y value

yMax double

Maximum Y value

xRangeMin double

X range start

xRangeMax double

X range end

ignoreZeros bool

Ignore zeros

Returns

bool

True if values were successfully detected

GetTitleText()

summary M:LightningChartLib.WinForms.Charting.SeriesXY.StockSeries.GetTitleText
public override string GetTitleText()

Returns

string
returns M:LightningChartLib.WinForms.Charting.SeriesXY.StockSeries.GetTitleText

GetXMinMax(out double, out double)

Get minimum X and maximum X of series X values

public bool GetXMinMax(out double dXMin, out double dXMax)

Parameters

dXMin double

X min

dXMax double

X max

Returns

bool

True if minimum X and maximum X was obtained successfully

IsPositionOver(int, int, bool)

Is position over series.

public override bool IsPositionOver(int x, int y, bool useDIP = false)

Parameters

x int

X coordinate

y int

Y coordinate

useDIP bool

Use DIP instead of pixels as parameters

Returns

bool

true if is over series. Else false.

LoadFromCSV(string, SeparatorCSV)

Loads series data from a CSV file.

public override bool LoadFromCSV(string file, SeparatorCSV separator)

Parameters

file string

CSV file. If file does not exist, LoadFromCSV returns false.

separator SeparatorCSV

Value and floating point number separator.

Returns

bool

True if import succeeds. Otherwise false.

OnDeserialized(StreamingContext)

OnDeserialized is called just after the object has been deserialized

[OnDeserialized]
protected void OnDeserialized(StreamingContext context)

Parameters

context StreamingContext

Context

SaveToCSV(string, SeparatorCSV)

Saves series data into CSV file

public override bool SaveToCSV(string file, SeparatorCSV separator)

Parameters

file string

Target file. If file already exists, it will be overwritten.

separator SeparatorCSV

Value and floating point number separator definition

Returns

bool

True if save is successful

Events

CustomStockDataAppearance

Stock data appearance coloring delegate.

public event StockSeries.CustomStockDataAppearanceEventHandler CustomStockDataAppearance

Event Type

StockSeries.CustomStockDataAppearanceEventHandler

OldDataDropped

Occurs when old data points have been dropped.

public event StockSeries.OldDataDroppedEventHandler OldDataDropped

Event Type

StockSeries.OldDataDroppedEventHandler