View Single Post
  #8 (permalink)  
Old May 3rd, 2005, 04:07 PM
DudeBori82 DudeBori82 is offline
Authorized User
 
Join Date: Apr 2005
Location: Spanish Fork, UT, USA.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to DudeBori82 Send a message via MSN to DudeBori82
Default

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)...
Reply With Quote