有过webchart的前辈,请给解释下面代码段的意思,最好是每句,为什么有的属性或方法根本没有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;

解决方案 »

  1.   

    //.下载ComponentOne.Sutdio.Enterprise.2006.v1.for.dotNet1.1.zip(此版本针对.Net 1.1),解压,安装里面的ASP.NET控件安装包,找到安装目录,把BIN目录下的C1.Web.C1WebChart.dll和C1.win.C1Chart.dll拷贝到你项目的BIN目录下,并引用进项目
    //加标签
    C1.Win.C1Chart.Label lbl = C1WebChart1.ChartLabels.LabelsCollection.AddNewLabel();//右侧相应项目标签的文本显示=取(dv表中i行名为Value的列的值)%100的百分数
    lbl.Text = string.Format(" {0}% ", float.Parse(dv[i][" value "].ToString()));  
    lbl.Compass = LabelCompassEnum.Radial;
    lbl.Offset = 20;
    lbl.Connected = true;
    lbl.Visible = true;//AttachMethodData类被图表的Label对象和Label对象的Label.MethodData属性结合使用用于确定Label代替或者隶属于图表,AttachMethodData对象的每个属性仅仅意味着和Label.AttachMethod值相关lbl.AttachMethod = AttachMethodEnum.DataIndex;
    AttachMethodData am = lbl.AttachMethodData;
    am.GroupIndex = 0;
    am.SeriesIndex = i;
    am.PointIndex = 0;