• <menu id="w2i4a"></menu>
  • logo Aspose.Words使用教程

    文檔首頁(yè)>>Aspose.Words使用教程>>Aspose.Words使用教程之如何使用ChartDataLabel

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


    使用ChartDataLabel你可以規(guī)定單個(gè)圖表系列的數(shù)據(jù)標(biāo)簽的格式,像顯現(xiàn)/隱藏圖例、種類名字、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

    結(jié)果如下:

    Aspose.Words

    立即下載Aspose.Words最新版

    掃碼咨詢


    添加微信 立即咨詢

    電話咨詢

    客服熱線
    023-68661681

    TOP
    三级成人熟女影院,欧美午夜成人精品视频,亚洲国产成人乱色在线观看,色中色成人论坛 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();