WPF Charting Documentation - SciChart WPF Charts SDK v5.x
SeriesInfo – the ViewModels for Tooltips and Legends

The RolloverModifier and LegendModifier are simply data-sources, which give you an ObservableCollection<SeriesInfo> to bind to in XAML.

http://support.scichart.com/__swift/apps/base/javascript/__global/thirdparty/TinyMCE/plugins/moxiemanager/data/files/RolloverSeriesInfo.png

The following classes in SciChart provide a collection of SeriesInfo that you can bind to:

Types of SeriesInfo

Each DataSeries has its own SeriesInfo type. All of them inherit from SeriesInfo, which is the base type. So given you are binding to a collection of SeriesInfo when you use the RolloverModifier or LegendModifier, it becomes possible to expose almost any info about the underlying RenderableSeries or DataSeries

RenderableSeries Type

DataSeries Type

SeriesInfo Type

FastLineRenderableSeries,

FastMountainRenderableSeries,

FastColumnRenderableSeries,

XyScatterRenderableSeries,

FastImpulseRenderableSeries

XyDataSeries

XySeriesInfo

FastOhlcRenderableSeries

FastCandlestickRenderableSeries

OhlcDataSeries

OhlcSeriesInfo

FastErrorBarsRenderableSeries

HlcDataseries

HlcSeriesInfo

FastBandRenderableSeries

XyyDataSeries

XyySeriesInfo

FastBubbleRenderableSeries

XyzDataSeries

XyzSeriesInfo

FastHeatmapRenderableSeries

Heatmap2DArrayDataSeries

HeatmapSeriesInfo

StackedColumnRenderableSeries,

StackedMountainRenderableSeries

XyDataSeries

XyStackedSeriesInfo

StackedColumnRenderableSeries,

StackedMountainRenderableSeries
(when IsOneHundredPercent = true)

XyDataSeries

OneHundredPercent
StackedSeriesInfo

Example of Binding to Collection of SeriesInfo

As a starting point please see our example 2D Charts > Tootips and Hit Test > Using RolloverModifier Tooltips demo, in particular the source code where we create an ItemsControl to consume SeriesInfo objects from the RolloverModifier. We also have an example of this in Section 4.11.1.8.

NOTE: when you bind to XValue / YValue which are of type IComparable, you will need a converter or a StringFormat to convert from IComparable to the display value. Yes believe it or not, in XAML if you bind an IComparable which is actually a double to a TextBlock it won't display! Please use an IComparable converter if you get blank values when binding to these properties.

What Else can you do?

In Templating the AxisMarkerAnnotation , we bind an ItemsControl to a collection of SeriesInfo, displaying SeriesName (with Stroke foreground), XValue and YValue. These are the XValue and YValue under the mouse reported by the SeriesInfo.

Well, if you see the XySeriesInfo Members, you can bind to:

Other series create other SeriesInfo types, for instance, an XyzDataSeries creates an XyzSeriesInfo, and OhlcDataSeries creates OhlcSeriesInfo. Here you can access and bind to the properties such as Open, High, Low, Close or ZValue (if applicable).

Accessing the RenderableSeries via SeriesInfo

Many people ask us how to bind to a specific property on the RenderableSeries or DataSeries. Well, the SeriesInfo.RenderableSeries exposes the RenderableSeries too so it is possible to expose any property from the RenderableSeries. Don't forget RenderableSeries.DataSeries also allows access from SeriesInfo right back to the original DataSeries! 

 

 

 

 


SCICHART ® is a Registered Trademark in the UK, US and EEC. Copyright SciChart Ltd 2011-2018.

Email us to give feedback!