Bind to multiple series (dynamic number of series)

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Arction_LasseP

speciesxx
Posts: 3
Joined: Thu Nov 02, 2017 2:08 pm

Bind to multiple series (dynamic number of series)

Post by speciesxx » Fri Nov 24, 2017 9:58 am

hi all,

we are trying out the bindable chart. We bind data to a series via viewmodel. We wonder if its possible to bind dataseries from viewmodel as well. We don't know how many dataseries we have, this is a dynamic number specified in or viewmodel. Is there something like a itemtemplate we can define for a collection of dataseries? Similair to a WPF listbox itemtemplate?

Or do we need to create the series in code behind in the view? (and bind series properties there per viewmodel)

Thanks in advance

ArctionKestutis
Posts: 383
Joined: Mon Mar 14, 2016 9:22 am

Re: Bind to multiple series (dynamic number of series)

Post by ArctionKestutis » Fri Nov 24, 2017 12:55 pm

Hi,

There is nothing like a itemtemplate in LightningChart. However, if you don't know the number of required series, you can bind to SeriesCollection. You need to implement ValueConverter between data set (of dynamic size) and SeriesCollection.

Hope this helps.