ComponentOne之WebChart用法[4]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

sp;                dscoll.Clear();

                       //汇图,即将点数组交给控件,它会自己分配,并画出图形
                        ChartDataSeries series = C1WebChart1.ChartGroups[0].ChartData.SeriesList[0];
                       series.PointData.CopyDataIn(data);// 这里的data是PointF类型  
           
                        //给区块加标签
                        for(int i=0; i < data.Length; i++)
                       {
                               ChartDataSeries series = dscoll.AddNewSeries();
                               series.PointData.Length = 1;
                               series.Y[0] = data[i].Y;
                              series.Label="我是:"+(i+1).ToString();

                               //加标签
                               C1.Win.C1Chart.Label lbl = C1WebChart1.ChartLabels.LabelsCollection.AddNewLabel();
                               lbl.Text = string.Format("{0} ({1:c})","第:"+i.ToString()+"扇区", data[i].Y);
                               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;
                         }
              

本文关键:ComponentOne之WebChart用法
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top