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
320
pie chart sample binding
posted

hi team,

can u give me the sample code for binding pie chart in runtime

 

 

 

 

 

DataPoint dp = new DataPoint

();

dp.Label = dsSearchCriteria.Tables[2].Rows[i][0].ToString();

dp.Value =

 

 

Convert

.ToDouble(dsSearchCriteria.Tables[2].Rows[i][dsSearchCriteria.Tables[2].Columns.Count - 1]);

series.DataPoints.Add(dp);

series.Fill = RGB;

xamChart.Series.Add(series);

 

currently i am doing like above but its come for only one series

 

regards

Raj

Parents
  • 34510
    Offline posted

    Hi Raj,

    The code you are using is correct for adding data points to a pie chart series at run time.  I've included a sample using this method to create a pie chart series at runtime through the push of a button.  Is this what you are looking for?

    xamChart-piechartbinding.zip
Reply Children
No Data