
チャートは、プレゼンテーション中に情報を提示するための重要なコンポーネントの一つです。事実と数値が適切かつ対応するグラフ、チャート、または表でバックアップされると、PPTに提示された情報はより強力で影響力のあるものになります。これらのグラフ、チャート、または表は優れた視覚的魅力を持つだけでなく、ターゲットオーディエンスに関連するビジネス情報を整理された形で伝えます。この記事では、REST APIを使用してPowerPointでチャートを作成または変更する手順について説明します。
情報: AsposeはプレゼンテーションをPDFに変換できる無料の PowerPoint to PDF converter を提供しています。
PPTにおけるチャートの利点
PPTでデータを異なるグラフ、チャート、または表で提供することの多くの利点を導き出すことができます:
- グラフ、チャート、図解、または表は、情報を簡潔、一貫、かつコンパクトなスタイルで提示します。ターゲットオーディエンスは、データの意味を迅速に理解します。
- 彼らは単純なテキストコンテンツよりも視覚的に魅力的です。そして、あなたのPPTは、それらの適切な統合によって自動的により魅力的になります。
- 聴衆は常にスライドから何らかの結論を引き出したいと思っており、それらはプレゼンテーションの核心的な結論を理解するのに役立ちます。
- 事実の評価を行うことは、視覚的なモードが異なるデータや数字の比較を可能にするため、容易になります。
- もっと言うことができ、より多くの事実を収容し、簡潔に整理することができる。それがPPTにおけるグラフとチャートの美しさである。
- 彼らは、あなたの見込み客が、あなたのビジネスの異なる理解可能なパラメーターに基づいて、さまざまな細かい側面について重要な推論を行うのを助けます。
PowerPoint 処理 API
Aspose.Slides Cloud は、PowerPointおよびOpenOfficeプレゼンテーションファイルを作成および操作する機能を提供するRESTベースのAPIです。最近のリリースバージョンでは、新しいリソースがシェイプのサブリソースとして追加されました。これはチャートシェイプ専用で、チャートシリーズを追加、変更、削除することができます。
チャートに系列を追加
POST https://api.aspose.cloud/v3.0/slides/myPresentaion.pptx/slides/1/shapes/1/series?folder=myFolder
リクエストボディ
{ "dataPointType": "OneValue", "dataPoints": [{ "value": 5.5</code> <code>}, { "value": 76</code> <code>}, { "value": 27</code> <code>}] }
string MyAppKey = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
OneValueSeries dto = new OneValueSeries();
dto.DataPoints = new List<OneValueChartDataPoint>();
dto.DataPoints.Add(new OneValueChartDataPoint { Value = 5.5 });
dto.DataPoints.Add(new OneValueChartDataPoint { Value = 76 });
dto.DataPoints.Add(new OneValueChartDataPoint { Value = 27 });
PostChartSeriesRequest request = new PostChartSeriesRequest
{
Name = "myPresentaion.pptx",
Folder = "myFolder",
SlideIndex = 1,
ShapeIndex = 1,
Series = dto
};
Chart chart = api.PostChartSeries(request);
Console.WriteLine(chart.Series.Count);
チャート系列を更新する
PUT https://api.aspose.cloud/v3.0/slides/myPresentaion.pptx/slides/1/shapes/1/series/2?folder=myFolder
リクエストボディ
{ "dataPointType": "OneValue", "dataPoints": [{ "value": 5.5</code> <code>}, { "value": 76</code> <code>}, { "value": 27</code> <code>}] }
string MyAppKey = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
OneValueSeries dto = new OneValueSeries();
dto.DataPoints = new List<OneValueChartDataPoint>();
dto.DataPoints.Add(new OneValueChartDataPoint { Value = 5.5 });
dto.DataPoints.Add(new OneValueChartDataPoint { Value = 76 });
dto.DataPoints.Add(new OneValueChartDataPoint { Value = 27 });
PutChartSeriesRequest request = new PutChartSeriesRequest
{
Name = "myPresentaion.pptx",
Folder = "myFolder",
SlideIndex = 1,
ShapeIndex = 1,
SeriesIndex = 2,
Series = dto
};
Chart chart = api.PutChartSeries(request);
Console.WriteLine(((OneValueSeries)chart.Series[1]).DataPoints.Count);
チャート系列を削除する
DELETE https://api.aspose.cloud/v3.0/slides/myPresentaion.pptx/slides/1/shapes/1/series/2?folder=myFolder
string MyAppKey = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
string MyAppSid = "xxxxxxxx"; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
SlidesApi api = new SlidesApi("MyAppSid", "MyAppKey");
DeleteChartSeriesRequest request = new DeleteChartSeriesRequest
{
Name = "myPresentaion.pptx",
Folder = "myFolder",
SlideIndex = 1,
ShapeIndex = 1,
SeriesIndex = 2
};
Chart chart = api.DeleteChartSeries(request);
Console.WriteLine(chart.Series.Count);
関連する記事
以下のリンクを訪れて、次のことについてもっと学ぶことをお勧めします: