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
Properties
Behind
StockSeries is drawn behind line series.
public bool Behind { get; set; }
Property Value
ColorStickDown
Stick color when series Close value less than Open.
public Color ColorStickDown { get; set; }
Property Value
ColorStickUp
Stick color when series Close value greater than Open.
public Color ColorStickUp { get; set; }
Property Value
CursorTrackEnabled
Cursor tracking enabled.
public bool CursorTrackEnabled { get; set; }
Property Value
DataCount
Series data count.
public int DataCount { get; }
Property Value
DataPoints
Series data points
public StockSeriesData[] DataPoints { get; set; }
Property Value
FillBorder
Fill border.
public Border FillBorder { get; set; }
Property Value
FillDown
Fill when series Close value less than Open.
public Fill FillDown { get; set; }
Property Value
FillUp
Fill when series Close value greater than Open.
public Fill FillUp { get; set; }
Property Value
ItemWidth
Item width.
public int ItemWidth { get; set; }
Property Value
Name
Name of series.
public string Name { get; set; }
Property Value
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
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
SeriesEventMarkers
Series event markers
public SeriesEventMarkerList SeriesEventMarkers { get; set; }
Property Value
Statistics
Statistics of the series.
public LineSeriesStat Statistics { get; }
Property Value
StickWidth
Stick width.
public int StickWidth { get; set; }
Property Value
Style
Stock style.
public StockStyle Style { get; set; }
Property Value
Title
Series title
public SeriesTitle Title { get; set; }
Property Value
Methods
AddPoints(StockSeriesData[], bool)
Add points to end of series
public int AddPoints(StockSeriesData[] points, bool invalidateChart)
Parameters
pointsStockSeriesData[]Series points
invalidateChartboolUpdate 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()
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
Dispose(bool)
Clean up any resources being used.
protected override void Dispose(bool disposing)
Parameters
disposingbooltrue 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
itemStockSeriesDataItem 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
yMindoubleMinimum Y value
yMaxdoubleMaximum Y value
xRangeMindoubleX range start
xRangeMaxdoubleX range end
ignoreZerosboolIgnore zeros
Returns
- bool
True if values were successfully detected
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
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
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
filestringCSV file. If file does not exist, LoadFromCSV returns false.
separatorSeparatorCSVValue 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
contextStreamingContextContext
SaveToCSV(string, SeparatorCSV)
Saves series data into CSV file
public override bool SaveToCSV(string file, SeparatorCSV separator)
Parameters
filestringTarget file. If file already exists, it will be overwritten.
separatorSeparatorCSVValue 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
OldDataDropped
Occurs when old data points have been dropped.
public event StockSeries.OldDataDroppedEventHandler OldDataDropped