This is a migrated thread and some comments may be shown as answers.

Charts Programmatically

1 Answer 58 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 20 May 2011, 02:48 PM
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

1 Answer, 1 is accepted

Sort by
0
Simon
Top achievements
Rank 1
answered on 20 May 2011, 04:21 PM
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
Tags
Chart (Obsolete)
Asked by
Simon
Top achievements
Rank 1
Answers by
Simon
Top achievements
Rank 1
Share this question
or