OhlcSeries<TModel>

Defines an Open/High/Low/Close series in the user interface — the I-bar variant of CandlesticksSeries. Reuses CoreFinancialSeries measurement and animation; the only difference is the rendered geometry.

Class · Namespace LiveChartsCore.SkiaSharpView · Assembly LiveChartsCore.SkiaSharpView · View source

Type parameters

TModel The type of the points, you can use any type, the library already knows how to handle the most common numeric types, to use a custom type, you must register the type globally (LiveChartsSettings.HasMap) or at the series level (Series.Mapping).

Members

Properties

MaxBarWidth Double
Gets or sets the maximum width of the bar.
Guide: Date time X axis
UpStroke Paint
Gets or sets the up stroke, the stroke when the trend goes up.
Guide: Up and down paints
UpFill Paint
Gets or sets the up fill, the fill when the trend goes up.
Guide: Up and down paints
DownStroke Paint
Gets or sets the up stroke, the stroke when the trend goes down.
Guide: Up and down paints
DownFill Paint
Gets or sets the up fill, the fill when the trend goes down.
Guide: Up and down paints
ScalesXAt Int32
Gets or sets the axis index where the series is scaled in the X plane, the index must exist in the ICartesianChartView.XAxes collection.
ScalesYAt Int32
Gets or sets the axis index where the series is scaled in the Y plane, the index must exist in the ICartesianChartView.YAxes collection.
DataLabelsPosition DataLabelsPosition
Gets or sets the data labels position.
DataLabelsTranslate Nullable<LvcPoint>
Gets or sets the data labels translate transform, the property is of type LvcPoint, where the LvcPoint.X property is in normalized units (from 0 to 1), where 1 is the width of the label and the LvcPoint.Y property is also in normalized units (from 0 to 1), where 1 is the height of the label.
XToolTipLabelFormatter Func<ChartPoint<TModel, OhlcGeometry, LabelGeometry>, String>
Gets or sets the tooltip label formatter in the X axis, the function receives a ChartPoint instance and must return a string.
YToolTipLabelFormatter Func<ChartPoint<TModel, OhlcGeometry, LabelGeometry>, String>
Gets or sets the tooltip label formatter in the Y axis, the function receives a ChartPoint instance and must return a string.
Guide: Tooltips and data labels
ClippingMode ClipMode
Gets or sets the clipping mode, clipping restricts the series and labels for being drawn outside of the chart area (DrawMargin), default is ClipMode.XY, and means that anything outside the chart bounds will be ignored.
SeriesProperties SeriesProperties
Gets the properties of the series.
Name String
Gets or sets the name of the series, the name is normally used by IChartTooltip or IChartLegend, the default value is set automatically by the library.
Guide: Data, names and updates
Values IReadOnlyCollection<TModel>
Gets or sets the values.
Guide: Data, names and updates
Pivot Double
Gets or sets the value where the direction of the axis changes, by default is 0.
Mapping Func<TModel, Int32, Coordinate>
Gets or sets the mapping.
GeometrySvg String
Gets or sets the series geometry svg, this property requires the series visual to be an IVariableSvgPath instance.
ZIndex Int32
Gets or sets the z index position.
Guide: Data, names and updates
DataLabelsFormatter Func<ChartPoint<TModel, OhlcGeometry, LabelGeometry>, String>
Gets or sets the data labels formatter, the function receives a ChartPoint instance and must return a string.
Guide: Tooltips and data labels
IsHoverable Boolean
Gets or sets a value indicating whether this instance will show up in tool tips when the pointer is over a point. default value is true.
IsVisibleAtLegend Boolean
Gets or sets a value indicating whether this instance will show up in legends. default value is true.
DataPadding LvcPoint
Gets or sets the data padding, the distance from the edge of the chart to where the series is drawn, both coordinates (X and Y) from 0 to 1, where 0 is nothing and 1 is the axis tick (the separation between every label).
AnimationsSpeed Nullable<TimeSpan>
Gets or sets the animations speed; when null the series inherits the chart-level animation (see Chart.Animation). Set it to TimeSpan.Zero to disable animations for this series only.
EasingFunction Func<Single, Single>
Gets or sets the easing function used to animate the series; when null the series inherits the chart-level easing (see Chart.Animation).
DataFactory DataFactory<TModel>
Gets the data factory.
MiniatureShapeSize Double
Gets or sets the size of the legend shape.
MiniatureStrokeThickness Double
Gets or sets the miniature stroke thickness.
ShowDataLabels Boolean
Indicates whether the data labels are visible, to set the color use the ISeries.DataLabelsPaint property, the ISeries.DataLabelsPaint property could be defined by the theme when not explicitly set. Default is false.
DataLabelsPaint Paint
Gets or sets the data labels paint.
Guide: Tooltips and data labels
DataLabelsSize Double
Gets or sets the size of the data labels.
DataLabelsRotation Double
Gets or sets the data labels rotation in degrees.
DataLabelsPadding Padding
Gets or sets the data labels padding.
DataLabelsMaxWidth Double
Gets or sets the max width of the data labels.
VisualStates VisualStatesDictionary
Gets the visual states, states define the look of chart points when they are in a certain state, for example the hover, active, or selected states.
Tag Object
Gets or sets the object that contains data about the control.
IsVisible Boolean
Gets or sets a value indicating whether the element is visible.
Guide: Data, names and updates

Methods

Invalidate 1 parameter

Invalidates the IChartElement in the user interface.

Chart chart The chart.

GetBounds 3 parameters

Gets the series bounds.

Chart chart The chart.

ICartesianAxis secondaryAxis The axis the series scales on in the X plane.

ICartesianAxis primaryAxis The axis the series scales on in the Y plane.

GetMiniatureGeometry 1 parameter

Returns a geometry that represents the series in a tooltip or legend.

ChartPoint point The target point.

GetPrimaryToolTipText 1 parameter

Gets the tool tip text for a give chart point.

ChartPoint point The chart point.

GetSecondaryToolTipText 1 parameter

Gets the tool tip text for a give chart point.

ChartPoint point The chart point.

SoftDeleteOrDispose 1 parameter

Deletes the series from the user interface.

IChartView chart The chart that draws the series.

GetStackGroup No parameters

Gets the stack group, normally used internally to handled the stacked series.

RestartAnimations No parameters

Clears the visuals in the cache and re-starts animations.

GetDataLabelText 1 parameter

Gets the data label content for a given chart point.

ChartPoint point The chart point.

RemoveFromUI 1 parameter

Removes the element from the UI.

Chart chart The chart.

ConvertToTypedChartPoint 1 parameter

Converts a chart to a strong-typed version of it.

ChartPoint point

RemoveOldPaints 1 parameter

Deletes the Paint instances that changed from the user interface.

IChartView chart The chart.

Events

PointMeasured Action<ChartPoint<TModel, OhlcGeometry, LabelGeometry>>
Occurs when a point in this series is measured. This is the non-generic counterpart of Series.PointMeasured, exposed so code that only has an ISeries reference (e.g. a theme rule) can react per point.
PointCreated Action<ChartPoint<TModel, OhlcGeometry, LabelGeometry>>
Occurs when a point in this series is created. This is the non-generic counterpart of Series.PointCreated, exposed so code that only has an ISeries reference (e.g. a theme rule) can react per point.
DataPointerDown ChartPointsHandler<TModel, OhlcGeometry, LabelGeometry>
Occurs when the pointer goes down over a chart point(s). This is the non-generic counterpart of Series.DataPointerDown.
ChartPointPointerHover ChartPointHandler<TModel, OhlcGeometry, LabelGeometry>
Occurs when the pointer is over a chart point. This is the non-generic counterpart of Series.ChartPointPointerHover.
ChartPointPointerHoverLost ChartPointHandler<TModel, OhlcGeometry, LabelGeometry>
Occurs when the pointer left a chart point. This is the non-generic counterpart of Series.ChartPointPointerHoverLost.
ChartPointPointerDown ChartPointHandler<TModel, OhlcGeometry, LabelGeometry>
Occurs when the pointer goes down over a chart point, if there are multiple points the closest one is selected. This is the non-generic counterpart of Series.ChartPointPointerDown.
PropertyChanged PropertyChangedEventHandler
Occurs when a property value changes.

Constructors

OhlcSeries<TModel> No parameters

Initializes a new instance of the OhlcSeries class.

OhlcSeries<TModel> 1 parameter

Initializes a new instance of the OhlcSeries class, with a given collection of values.

IReadOnlyCollection<TModel> values The values to plot.