asp.net中调用Office来制作3D统计图(3) chartType == ChartChartTypeEnum.chChartTypeDoughnut) { oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasPercentage = true; oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasValue = false; } // ------------------------------------------------------------------------ // Not so for other chart types where values have more meaning than // percentages. // ------------------------------------------------------------------------ else { oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasPercentage = false; oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasValue = true; }
// ------------------------------------------------------------------------ // Plug your own visual bells and whistles here // ------------------------------------------------------------------------ oChartSpace.Charts[0].SeriesCollection[0].Caption = String.Empty; oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Name = "verdana"; oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Size = 10; oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Bold = true; oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Font.Color = "red"; oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].Position = ChartDataLabelPositionEnum.chLabelPositionCenter;