SetSeries data problem

Sep 6, 2012 at 10:16 AM
Hi im having a problem setting the series data im collecting the data via a
data service (servicedata.svc sample) from a sql DB which provides a list of dates
and values but i cant seem to get this data into the SetSeries (Page_load sample)
I must be doing something fundamentally wrong with the .SetSeries 
any help will be appreciated.
data.svc sample
[OperationContract]
        public List<HighChartData> GetAllDataForLogObjectInRange(Guid logObjectId, string startDate, string endDate)
        {
            var startDateTime = DateTime.Parse(startDate);
            var endDateTime = DateTime.Parse(endDate).AddDays(+1).AddMilliseconds(-1);
 
            List<HighChartData> result;
 
            using (var db = new SMART4Entities())
            {
                var logdata =
                    db.LogObjectDatas.Where(
                        l => l.Id == logObjectId && l.LocalDateTime >= startDateTime && l.LocalDateTime <= endDateTime).ToList();
 
                result = logdata.Select(ld => new HighChartData
                    {
                        date = ld.LocalDateTime.ToString("yyyy-MM-dd-HH-mm"),
                        value = ld.Value
                    }).ToList();
            }
 
            return result;
        }
page_Load sample
protected void Page_Load(object sender, EventArgs e)
        {
            var chartData =
                new DataService.SmartData().GetAllDataForLogObjectInRange(
                    Guid.Parse("76BF715A-3FB1-43C2-8CC4-0812A4BB80BD"), "2012-07-01""2012-07-01");
 
            if (chartData != null)
            {
                var chart = new Highcharts("chart")
                    .InitChart(new Chart { DefaultSeriesType = ChartTypes.Line })
                    .SetOptions(new GlobalOptions { Global = new DotNet.Highcharts.Options.Global { UseUTC = true } })
                    .SetTitle(new Title { Text = "The Title" })
                    .SetSubtitle(new Subtitle { Text = "A SubTitle" })
                    .SetXAxis(new XAxis
                                     {
                                          Type = AxisTypes.Datetime,
                                          DateTimeLabelFormats = new DateTimeLabel { Month = "%e. %b", Year = "%Y" }
                                     })
                    .SetYAxis(new YAxis
                                     {
                                          Title = new YAxisTitle { Text = "Y Values" },
                                          Min = 0
                                     })
                    .SetTooltip(new Tooltip
                                     {
                                          Formatter =
                                          "function() { return '<b>'+ this.series.name +'</b><br/>'+ Highcharts.dateFormat('%e. %b', this.x) +': '+ this.y +' '; }"
                                     })
                    .SetSeries(new Series { Data = new Data(new object[] {chartData}) });
                
                ltrChart.Text = chart.ToHtmlString();
            }
 
        }