I just used chart.data.Add(Chartpoint("String", FloatValue));
and it worked fine. They give a great startup help for C# on the website of the WebChart download.
Thanks for your help!!
Here is the final working code:
Code:
float fIncompletePercentage = (float)dIncompletePercentage;
float fPassPercentage = (float)dPassPercentage;
float fPassEffectivePercentage = (float)dPassEffectivePercentage;
float fFailPercentage = (float)dFailPercentage;
PieChart chart = new PieChart();
chart.Data.Add( new ChartPoint("Incomplete", fIncompletePercentage) );
chart.Data.Add( new ChartPoint("Pass", fPassPercentage) );
chart.Data.Add( new ChartPoint("Pass (Effective)", fPassEffectivePercentage) );
chart.Data.Add( new ChartPoint("Fail", fFailPercentage) );
chart.DataXValueField = "Status";
chart.DataYValueField = "Percent";
chart.DataLabels.ShowValue = true;
wcWebChart.Charts.Add(chart);
wcWebChart.RedrawChart();
The only thing now, is to figure out how do configure the color for each status (not use the default colors)...