Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
UltraChart DataSource Multiple Series
posted

There are different ways about how the data of a Infragistics Linechart can be initialized. However, I would like to use its Property 'DataSource' and format the data before, since I already use this for other charts too.

So I would prefer this way:

UltraChart1.DataSource = myDataSource

Against this (Whole example with NumericTimeSeries is here)

Dim series1 As New NumericTimeSeries series1.Label = "Series1" series1.Points.Add(New NumericTimeDataPoint(DateTime.Now.AddMonths(-4), 12346, "Januar", True)) series1.Points.Add(New NumericTimeDataPoint(DateTime.Now.AddMonths(-3), 10000, "Februar", True)) series1.Points.Add(New NumericTimeDataPoint(DateTime.Now.AddMonths(-2), 14000, "März", True)) series1.Points.Add(New NumericTimeDataPoint(DateTime.Now.AddMonths(-1), 18000, "April", True)) series1.Points.Add(New NumericTimeDataPoint(DateTime.Now.AddMonths(10), 800, "Mai", True)) Dim series2 As New NumericTimeSeries series2.Label = "Series2" series2.Points.Add(New NumericTimeDataPoint(DateTime.Now.AddMonths(-8), 500, "Januar", True)) series2.Points.Add(New NumericTimeDataPoint(DateTime.Now.AddMonths(-6), 350, "Februar", True)) series2.Points.Add(New NumericTimeDataPoint(DateTime.Now.AddMonths(-4), 600, "März", True)) series2.Points.Add(New NumericTimeDataPoint(DateTime.Now.AddMonths(-2), 800, "April", True)) series2.Points.Add(New NumericTimeDataPoint(DateTime.Now.AddMonths(10), 800, "Mai", True)) UltraChart1.Series.Add(series1) UltraChart1.Series.Add(series2)

However, my question is of how to format the DataSource, that it actually shows up more than one series.

No matter what I try, I'm only getting one Series in the Linechart.

The result should look something like this

We are using an abstract of a datatable, which works fine for the other ChartTypes (PieChart, BarChart, etc.). A good example of how to achieve this, would really be appreciated.

Parents Reply Children
No Data