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
cannot get a datatable data to display in ultradatachart

I am trying to create an ultradatachart that should show 8 or 9 lines from a datatable. 

The x axis should show the date column "dtg" and the Y values should come from the "tagvalues" column.

here is my code so far:

using (MySqlDataAdapter da = new MySqlDataAdapter(sql, con))

                        var data = dt.AsEnumerable() // convert the data to Enumerable so you can use linq over it
                        .Select(r => new { dtg = r["DTG"], tagname = r["TagName"], tagvalue = r["TagValue"] }) // convert data to list of anonimous objects
                        .GroupBy(d => d.tagname, (key, value) => new { key = key, value = value.ToList() }) // group the data by line names

                        ultraDataChart1.IsHorizontalZoomEnabled = true;
                        ultraDataChart1.IsVerticalZoomEnabled = true;

                        var xAxis = new CategoryDateTimeXAxis
                            Label = "Label",
                            DataSource = dt,
                        var yAxis = new NumericYAxis();

                        foreach (var x in data)
                            AreaSeries useries = new AreaSeries();
                            useries.XAxis = xAxis;
                            useries.YAxis = yAxis;
                            useries.ValueMemberPath = "tagvalue";
                            useries.DataSource = x.value;//.Select(a => a.tagvalue).ToArray();

I cant get it to show the data.

Any help would be greatly appreciated.