---
title: "C++でのチャートデータラベルの操作"
---


Aspose.Wordsを使用すると、ユーザーはChartDataLabelをさまざまな方法で操作できます。

## チャートデータラベルの数を書式設定する方法

[NumberFormat](https://reference.aspose.com/words/cpp/aspose.words.drawing.charts/chartdatalabel/get_numberformat/)を使用すると、グラフの単一のデータラベルの数値書式を指定できます。

次のコード例は、データラベルの番号を書式設定する方法を示しています:

{{< gist "aspose-words-gists" "d55d8631947d283b1f0da99afa06c492" "cpp-Programming-Documents-Charts-ChartNumberFormat-FormatNumberofDataLabel.cpp" >}}


## チャートデータラベルの操作方法

[ChartDataLabel](https://reference.aspose.com/words/cpp/aspose.words.drawing.charts/chartdatalabel/)を使用すると、表示/非表示のように、グラフシリーズの単一のデータラベルの書式を指定できますLegendKey, CategoryName, SeriesName, 値など:

{{< gist "aspose-words-gists" "d55d8631947d283b1f0da99afa06c492" "cpp-Programming-Documents-Charts-WorkWithChartDataLabels-WorkWithChartDataLabel.cpp" >}}

以下の結果をご覧ください:

![work-with-chart-data-lable-aspose-words-cpp-1](working-with-chart-data-label-1.png)
