Page 1 of 1

Bind to multiple series (dynamic number of series)

Posted: Fri Nov 24, 2017 9:58 am
by speciesxx
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

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

Posted: Fri Nov 24, 2017 12:55 pm
by ArctionKestutis
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.