彩票走势图

Aspose.Words使用教程之如何使用ChartDataLabel

原创|使用教程|编辑:龚雪|2015-08-31 09:00:48.000|阅读 958 次

概述:Aspose.Words使用教程之如何使用ChartDataLabel

# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>

相关链接:

使用ChartDataLabel你可以规定单个图表系列的数据标签的格式,像显现/隐藏图例、种类名字、SeriesName、值等等。

C#

ChartDataLabelCollection dataLabelCollection = series0.DataLabels;

// Add data label to the first and second point of the first series.
ChartDataLabel chartDataLabel00 = dataLabelCollection.Add(0);
ChartDataLabel chartDataLabel01 = dataLabelCollection.Add(1);

// Set properties.
chartDataLabel00.ShowLegendKey = true;

// By default, when you add data labels to the data points in a pie chart, leader lines are displayed for data labels that are
// positioned far outside the end of data points. Leader lines create a visual connection between a data label and its
// corresponding data point.
chartDataLabel00.ShowLeaderLines = true;

chartDataLabel00.ShowCategoryName = false;
chartDataLabel00.ShowPercentage = false;
chartDataLabel00.ShowSeriesName = true;
chartDataLabel00.ShowValue = true;
chartDataLabel00.Separator = "/";

chartDataLabel01.ShowValue = true;

Visual Basic

Dim dataLabelCollection As ChartDataLabelCollection = series0.DataLabels

' Add data label to the first and second point of the first series.
Dim chartDataLabel00 As ChartDataLabel = dataLabelCollection.Add(0)
Dim chartDataLabel01 As ChartDataLabel = dataLabelCollection.Add(1)

' Set properties.
chartDataLabel00.ShowLegendKey = True

' By default, when you add data labels to the data points in a pie chart, leader lines are displayed for data labels that are
' positioned far outside the end of data points. Leader lines create a visual connection between a data label and its
' corresponding data point.
chartDataLabel00.ShowLeaderLines = True

chartDataLabel00.ShowCategoryName = False
chartDataLabel00.ShowPercentage = False
chartDataLabel00.ShowSeriesName = True
chartDataLabel00.ShowValue = True
chartDataLabel00.Separator = "/"

chartDataLabel01.ShowValue = True

结果如下:

Aspose.Words

立即下载Aspose.Words最新版


标签:Aspose.words

本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@pclwef.cn

文章转载自:慧都控件网

为你推荐

  • 推荐视频
  • 推荐活动
  • 推荐产品
  • 推荐文章
  • 慧都慧问
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP