Charts Programmatically

Thread is closed for posting
2 posts, 0 answers
  1. Simon
    Simon avatar
    3 posts
    Member since:
    May 2011

    Posted 20 May 2011 Link to this post

    I have a used one of your chart demonstrations and require a little help.

    DataTable table = PageAccess.CountOfEnquiriesBetweenDates(startDate, endDate);
     
            var c = table.Rows.Count;
             
     
            RadChart radChart = new RadChart();
            radChart.ChartTitle.TextBlock.Text = "Enquiries";
            radChart.Skin = "DeepGray";
     
             
            var chartSeries = new ChartSeries {Name = "Enquiries", Type = ChartSeriesType.Bar};
            //It works when I just put in a value
            chartSeries.AddItem(c, "Enquiries");
    from the code above I have executes a stored procedure retruned as a DataTable and I am then counting the number of rows in the table.  I need this value to be in the graph data. I have tried Convert.ToDouble(c), I am using VS 2010.  Can someone shed any light on what I have done wrong?

    Many thanks

    Simon
  2. Simon
    Simon avatar
    3 posts
    Member since:
    May 2011

    Posted 20 May 2011 Link to this post

    I have fixed the issue.  It was my page load event that I had forgot to update.  I needed to dispose the control then add it again to the placeholder

    Thanks anyway.

    simon
Back to Top