ComponentOne的C1Chart做饼状图怎么显示其百分比

问题:ComponentOne的C1Chart做饼状图怎么显示每部分的百分比

描述:

我用C1Chart做饼状图的时候,不知道怎么显示其百分比在对应的区域上,求解。

目前做的效果(附加代码所生成的饼状图),没有百分比,如图所示。

现在的需求是:需要显示每部分具体百分比在饼状图型上,效果如图所示。

                                 

我对C1Chart不是很熟悉,个人感觉C1Chart应该提供了此功能,但是尚未找到。

希望大家能帮忙解决下,十分感谢。

附加部分代码:

private void InitReducePie(Hashtable reasons)
        {
            try
            {
                if (reasons == null || reasons.Count == 0)
                    return;

                this.c1Chart1.Header.Text = LD.Translate("Reduce Time Pie Chart");

                if(this.c1Chart1.ChartGroups[0].ChartData.SeriesList.Count > 0)
                    this.c1Chart1.ChartGroups[0].ChartData.SeriesList.Clear(); 

                int index = -1;

                foreach (DictionaryEntry entry in reasons)
                {
                    string key = entry.Key as string;
                    double value = double.Parse(entry.Value.ToString());
                    this.chartCurve = this.c1Chart1.ChartGroups[0].ChartData.SeriesList.AddNewSeries();
                    this.chartCurve.Label = key;

                    this.chartSeries = this.c1Chart1.ChartGroups[0].ChartData.SeriesList[++index];
                    int[] x = new int[] { 1 };
                    double[] y = new double[] { value };
                    this.chartSeries.X.CopyDataIn(x);
                    this.chartSeries.Y.CopyDataIn(y);
                }
            }
            catch            
           {
            }
        }

 

 

posted @ 2013-10-10 16:37  小小洪  Views(1467)  Comments(2)    收藏  举报