Class ChartDataTable

Class ChartDataTable

Namespace: Aspose.Cells.Charts
Assembly: Aspose.Cells.dll (25.2.0)

チャートデータテーブルを表します。

public class ChartDataTable

継承

objectChartDataTable

継承されたメンバー

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()


//Workbookオブジェクトをインスタンス化
Workbook workbook = new Workbook();

//最初のワークシートの参照を取得
Worksheet worksheet = workbook.Worksheets[0];

//「A1」セルにサンプル値を追加
worksheet.Cells["A1"].PutValue(50);

//「A2」セルにサンプル値を追加
worksheet.Cells["A2"].PutValue(100);

//「A3」セルにサンプル値を追加
worksheet.Cells["A3"].PutValue(150);

//「B1」セルにサンプル値を追加
worksheet.Cells["B1"].PutValue(60);

//「B2」セルにサンプル値を追加
worksheet.Cells["B2"].PutValue(32);

//「B3」セルにサンプル値を追加
worksheet.Cells["B3"].PutValue(50);

//ワークシートにチャートを追加
int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 25, 10);

//新しく追加されたチャートのインスタンスにアクセス
Chart chart = worksheet.Charts[chartIndex];

//「A1」セルから「B3」までの範囲をチャートデータソースとしてNSeriesを追加
chart.NSeries.Add("A1:B3", true);

chart.ShowDataTable = true;

//チャートテーブルを取得
ChartDataTable chartTable = chart.ChartDataTable;

//チャートテーブルのフォント色を設定
chartTable.Font.Color = System.Drawing.Color.Red;

//凡例キーの表示オプションを設定
chartTable.ShowLegendKey = false;

//Excelファイルを保存
workbook.Save("book1.xls");

'Workbookオブジェクトをインスタンス化
Dim workbook As Workbook = New Workbook()

'最初のワークシートの参照を取得
Dim worksheet As Worksheet = workbook.Worksheets(0)

'「A1」セルにサンプル値を追加
worksheet.Cells("A1").PutValue(50)

'「A2」セルにサンプル値を追加
worksheet.Cells("A2").PutValue(100)

'「A3」セルにサンプル値を追加
worksheet.Cells("A3").PutValue(150)

'「B1」セルにサンプル値を追加
worksheet.Cells("B1").PutValue(60)

'「B2」セルにサンプル値を追加
worksheet.Cells("B2").PutValue(32)

'「B3」セルにサンプル値を追加
worksheet.Cells("B3").PutValue(50)

'ワークシートにチャートを追加
Dim chartIndex As Integer = worksheet.Charts.Add(ChartType.Column, 5, 0, 25, 10)

'新しく追加されたチャートのインスタンスにアクセス
Dim chart As Chart = worksheet.Charts(chartIndex)

'「A1」セルから「B3」までの範囲をチャートデータソースとしてNSeriesを追加
chart.NSeries.Add("A1:B3", True)

chart.ShowDataTable = True

'チャートテーブルを取得
Dim chartTable As ChartDataTable = chart.ChartDataTable

'チャートテーブルのフォント色を設定
chartTable.Font.Color = System.Drawing.Color.Red

'凡例キーの表示オプションを設定
chartTable.ShowLegendKey = False

'Excelファイルを保存
workbook.Save("book1.xls")

プロパティ

AutoScaleFont

オブジェクトのサイズが変更されると、テキストのフォントサイズが変更される場合はTrue。 デフォルト値はTrueです。

public bool AutoScaleFont { get; set; }

プロパティ値

bool

BackgroundMode

背景の表示モードを取得および設定します。

public BackgroundMode BackgroundMode { get; set; }

プロパティ値

BackgroundMode

Border

オブジェクトの境界を表すBorderオブジェクトを返します。

public Line Border { get; }

プロパティ値

Line

Font

指定されたチャートデータテーブルのフォント設定を表すAspose.Cells.Charts.ChartDataTable.Fontオブジェクトを取得します。

public Font Font { get; }

プロパティ値

Font

HasHorizontalBorder

チャートデータテーブルに水平セル境界がある場合はTrue。

public bool HasHorizontalBorder { get; set; }

プロパティ値

bool

HasOutlineBorder

チャートデータテーブルに外枠がある場合はTrue。

public bool HasOutlineBorder { get; set; }

プロパティ値

bool

HasVerticalBorder

チャートデータテーブルに垂直セル境界がある場合はTrue。

public bool HasVerticalBorder { get; set; }

プロパティ値

bool

ShowLegendKey

データラベルの凡例キーが表示されている場合はTrue。

public bool ShowLegendKey { get; set; }

プロパティ値

bool

 日本語