111,129
社区成员
发帖
与我相关
我的任务
分享 //for (int i = 0; i < rcs.Count; i++)
//{
// Series se = new Series();
// se.Name = rcs[i]["l_lostcause"];
// Element ee = new Element();
// ee.Name = rcs[i]["l_lostcause"];
// ee.YValue = Convert.ToDouble( rcs[i]["Num"]);
// se.Elements.Add(ee);
// pieC.SeriesCollection.Add(se);
// Count += Convert.ToInt32(rcs[i]["Num"]);
//}
//设置是否显示百分比
//pieC.DefaultSeries.DefaultElement.ShowValue = true;
//pieC.Title = "总数:" + Count.ToString();
for ( int i = 0 ; i < dv.Count; i ++ )
{
C1.Win.C1Chart.Label lbl = C1WebChart1.ChartLabels.LabelsCollection.AddNewLabel();
lbl.Text = string .Format( " {0}% " , float .Parse(dv[i][ " value " ].ToString()));
lbl.Compass = LabelCompassEnum.Radial;
lbl.Offset = 20 ;
lbl.Connected = true ;
lbl.Visible = true ;
lbl.AttachMethod = AttachMethodEnum.DataIndex;
AttachMethodData am = lbl.AttachMethodData;
am.GroupIndex = 0 ;
am.SeriesIndex = i;
am.PointIndex = 0 ;
}