2011-03-01 62 views
4

當我生成telerik餅圖時。我想用串聯%的數據值拉布勒價值,但我沒有得到這兩個values.my代碼 -如何在telerik中設置標籤值和%value餅圖

ChartSeries objChartSeries = new ChartSeries("Pie"); 
      objChartSeries.Type = ChartSeriesType.Pie; 

      objChartSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels; 
      objChartSeries.Appearance.LabelAppearance.Visible = true; 
      objChartSeries.Appearance.ShowLabelConnectors = true; 
      objChartSeries.Appearance.ShowLabels = true; 
      objChartSeries.Appearance.DiameterScale = 0.6; 

      objChartSeries.DataLabelsColumn = Xtext + "#Y"; 
      //objChartSeries.DefaultLabelValue = "#Y"; 

      //RadChart1.Legend.TextBlock.Text = ddlX.SelectedItem.Text.Trim(); 
      //RadChart1.Legend.Visible = true; 

      RadChart1.Series.RemoveSeries(); 
      RadChart1.Series.Add(objChartSeriesBlank); 
      RadChart1.Series.Add(objChartSeries); 

      RadChart1.Series[1].DataYColumn = Yval; 

      RadChart1.DataSource = dsResult; 
      RadChart1.DataBind(); 

Pie chart screen shot 我希望我的圖表像E1007(40%)...

回答

1
objChartSeries.DataLabelsColumn = SomeDecimal.ToString("P");