Class Series

Class Series

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

チャート内の単一データ系列を表すオブジェクトをカプセル化します。

public class Series

継承

objectSeries

継承メンバー

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

//Workbookオブジェクトのインスタンス化
Workbook workbook = new Workbook();
//Excelオブジェクトに新しいワークシートを追加
int sheetIndex = workbook.Worksheets.Add();
//シートインデックスを渡して新しく追加したワークシートの参照を取得
Worksheet worksheet = workbook.Worksheets[sheetIndex];
//" A1" セルにサンプル値を追加
worksheet.Cells["A1"].PutValue(50);
//" A2" セルにサンプル値を追加
worksheet.Cells["A2"].PutValue(100);
//" A3" セルにサンプル値を追加
worksheet.Cells["A3"].PutValue(150);
//" A4" セルにサンプル値を追加
worksheet.Cells["A4"].PutValue(200);
//" B1" セルにサンプル値を追加
worksheet.Cells["B1"].PutValue(60);
//" B2" セルにサンプル値を追加
worksheet.Cells["B2"].PutValue(32);
//" B3" セルにサンプル値を追加
worksheet.Cells["B3"].PutValue(50);
//" B4" セルにサンプル値を追加
worksheet.Cells["B4"].PutValue(40);
//カテゴリデータとして" C1" セルにサンプル値を追加
worksheet.Cells["C1"].PutValue("Q1");
//カテゴリデータとして" C2" セルにサンプル値を追加
worksheet.Cells["C2"].PutValue("Q2");
//カテゴリデータとして" C3" セルにサンプル値を追加
worksheet.Cells["C3"].PutValue("Y1");
//カテゴリデータとして" C4" セルにサンプル値を追加
worksheet.Cells["C4"].PutValue("Y2");
//ワークシートにチャートを追加
int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5);
//新しく追加したチャートのインスタンスにアクセス
Chart chart = worksheet.Charts[chartIndex];
//" A1" セルから" B4" までの範囲でチャートにNSeries(チャートデータソース)を追加
int seriesIndex = chart.NSeries.Add("A1:B4", true);
//NSeriesのカテゴリデータのデータソースを設定
chart.NSeries.CategoryData = "C1:C4";
Series series = chart.NSeries[seriesIndex];
//系列の値を設定
series.Values = "=B1:B4";
//系列のチャートタイプを変更
series.Type = ChartType.Line;
//マーカーのプロパティを設定
series.Marker.MarkerStyle = ChartMarkerType.Circle;
series.Marker.ForegroundColorSetType = FormattingType.Automatic;
series.Marker.ForegroundColor = System.Drawing.Color.Black;
series.Marker.BackgroundColorSetType = FormattingType.Automatic;

//ビジネスロジックを実行

//Excelファイルを保存
workbook.Save("book1.xls");
'Workbookオブジェクトのインスタンス化
Dim workbook As Workbook = New Workbook()
'Excelオブジェクトに新しいワークシートを追加
Dim sheetIndex As Int32 = workbook.Worksheets.Add()
'シートインデックスを渡して新しく追加したワークシートの参照を取得
Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex)
'" A1" セルにサンプル値を追加
worksheet.Cells("A1").PutValue(50)
'" A2" セルにサンプル値を追加
worksheet.Cells("A2").PutValue(100)
'" A3" セルにサンプル値を追加
worksheet.Cells("A3").PutValue(150)
'" A4" セルにサンプル値を追加
worksheet.Cells("A4").PutValue(200)
'" B1" セルにサンプル値を追加
worksheet.Cells("B1").PutValue(60)
'" B2" セルにサンプル値を追加
worksheet.Cells("B2").PutValue(32)
'" B3" セルにサンプル値を追加
worksheet.Cells("B3").PutValue(50)
'" B4" セルにサンプル値を追加
worksheet.Cells("B4").PutValue(40)
'カテゴリデータとして" C1" セルにサンプル値を追加
worksheet.Cells("C1").PutValue("Q1")
'カテゴリデータとして" C2" セルにサンプル値を追加
worksheet.Cells("C2").PutValue("Q2")
'カテゴリデータとして" C3" セルにサンプル値を追加
worksheet.Cells("C3").PutValue("Y1")
'カテゴリデータとして" C4" セルにサンプル値を追加
worksheet.Cells("C4").PutValue("Y2")
'ワークシートにチャートを追加
Dim chartIndex As Int32 = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5)
'新しく追加したチャートのインスタンスにアクセス
Dim chart As Chart = worksheet.Charts(chartIndex)
'" A1" セルから" B4" までの範囲でチャートにNSeries(チャートデータソース)を追加
Dim seriesIndex As Int32 = chart.NSeries.Add("A1:B4", True)
'NSeriesのカテゴリデータのデータソースを設定
chart.NSeries.CategoryData = "C1:C4"
Dim series As Series = chart.NSeries(seriesIndex)
'系列の値を設定
series.Values = "=B1:B4"
'系列のチャートタイプを変更
series.Type = ChartType.Line
'マーカーのプロパティを設定
series.Marker.MarkerStyle = ChartMarkerType.Circle
series.Marker.ForegroundColorSetType = FormattingType.Automatic
series.Marker.ForegroundColor = System.Drawing.Color.Black
series.Marker.BackgroundColorSetType = FormattingType.Automatic
'Excelファイルを保存
workbook.Save("book1.xls")

プロパティ

Area

Seriesオブジェクトの背景エリアを表します。

public Area Area { get; }

プロパティ値

Area

Bar3DShapeType

3-D棒グラフまたはカラムチャートで使用される3D形状タイプを取得または設定します。

public Bar3DShapeType Bar3DShapeType { get; set; }

プロパティ値

Bar3DShapeType

Border

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

public Line Border { get; }

プロパティ値

Line

BubbleScale

指定されたチャートグループ内のバブルのスケール係数を取得または設定します。 0(ゼロ)から300の整数値で、デフォルトサイズのパーセンテージに対応します。 バブルチャートのみに適用されます。

public int BubbleScale { get; set; }

プロパティ値

int

BubbleSizes

チャート系列のバブルサイズ値を取得または設定します。

public string BubbleSizes { get; set; }

プロパティ値

string

CountOfDataValues

データ値の数を取得します。

public int CountOfDataValues { get; }

プロパティ値

int

DataLabels

指定されたASeriesのDataLabelsオブジェクトを表します。

public DataLabels DataLabels { get; }

プロパティ値

DataLabels

DisplayName

チャートグラフに表示される系列の名前を取得します。

public string DisplayName { get; }

プロパティ値

string

DoughnutHoleSize

ドーナツチャートグループの穴のサイズを返すか設定します。 穴のサイズはチャートサイズのパーセンテージで、10から90パーセントの範囲で表されます。

public int DoughnutHoleSize { get; set; }

プロパティ値

int

DownBars

折れ線グラフの下向きバーを表すAspose.Cells.Charts.DropBarsオブジェクトを返します。 折れ線グラフのみに適用されます。

public DropBars DownBars { get; }

プロパティ値

DropBars

DropLines

折れ線グラフまたは面グラフの系列のドロップラインを表すAspose.Cells.Drawing.Lineオブジェクトを返します。 折れ線グラフまたは面グラフのみに適用されます。

public Line DropLines { get; }

プロパティ値

Line

Explosion

円グラフの中心から開いたスライスの距離は、円の直径のパーセンテージとして表されます。

public int Explosion { get; set; }

プロパティ値

int

FirstSliceAngle

円グラフまたはドーナツグラフの最初のスライスの角度を取得または設定します。単位は度(垂直から時計回り)。 円グラフ、3-D円グラフ、ドーナツグラフのみに適用され、0から360の範囲です。

public short FirstSliceAngle { get; set; }

プロパティ値

short

GapWidth

棒やカラムのクラスター間のスペースを、棒またはカラムの幅のパーセンテージとして取得または設定します。 このプロパティの値は0から500の範囲でなければなりません。

public short GapWidth { get; set; }

プロパティ値

short

Has3DEffect

系列に三次元の外観がある場合はtrueを返します。 バブルチャートのみに適用されます。

public bool Has3DEffect { get; set; }

プロパティ値

bool

HasDropLines

チャートにドロップラインがある場合はtrueを返します。 折れ線グラフまたは面グラフのみに適用されます。

public bool HasDropLines { get; set; }

プロパティ値

bool

HasHiLoLines

折れ線グラフに高低ラインがある場合はtrueを返します。 折れ線グラフのみに適用されます。

public bool HasHiLoLines { get; set; }

プロパティ値

bool

HasLeaderLines

系列にリーダーラインがある場合はtrueを返します。

public bool HasLeaderLines { get; set; }

プロパティ値

bool

HasRadarAxisLabels

レーダーチャートにカテゴリ軸ラベルがある場合はtrueを返します。レーダーチャートのみに適用されます。

public bool HasRadarAxisLabels { get; set; }

プロパティ値

bool

HasSeriesLines

積み上げ棒グラフまたは棒グラフに系列ラインがある場合、または円グラフの円グラフまたは棒グラフの棒グラフに2つのセクション間のコネクタラインがある場合はtrueを返します。 積み上げ棒グラフ、棒グラフ、円グラフ、または棒グラフのみに適用されます。

public bool HasSeriesLines { get; set; }

プロパティ値

bool

HasUpDownBars

折れ線グラフに上昇および下降バーがある場合はtrueを返します。 折れ線グラフのみに適用されます。

public bool HasUpDownBars { get; set; }

プロパティ値

bool

HiLoLines

折れ線グラフの系列に対する高低ラインを表すHiLoLinesオブジェクトを返します。 折れ線グラフのみに適用されます。

public Line HiLoLines { get; }

プロパティ値

Line

IsAutoSplit

閾値が自動かどうかを示します。

public bool IsAutoSplit { get; }

プロパティ値

bool

IsColorVaried

ポイントの色が変化するかどうかを表します。 チャートには1つの系列のみを含める必要があります。

public bool IsColorVaried { get; set; }

プロパティ値

bool

IsFiltered

系列が選択またはフィルタリングされているかどうかを示します。trueはこの系列がフィルタリングされていることを示し、チャートに表示されません。

public bool IsFiltered { get; set; }

プロパティ値

bool

IsVerticalValues

データソースが垂直かどうかを示します。

public bool IsVerticalValues { get; }

プロパティ値

bool

LayoutProperties

レイアウトのプロパティを表します。

public SeriesLayoutProperties LayoutProperties { get; }

プロパティ値

SeriesLayoutProperties

LeaderLines

チャート上のリーダーラインを表します。リーダーラインはデータラベルをデータポイントに接続します。 このオブジェクトはコレクションではなく、単一のリーダーラインを表すオブジェクトはありません。

public Line LeaderLines { get; }

プロパティ値

Line

LegendEntry

この系列に基づいてレジェンドエントリを取得します。

public LegendEntry LegendEntry { get; }

プロパティ値

LegendEntry

Marker

Aspose.Cells.Charts.Series.Marker?text=マーカーを取得します。

public Marker Marker { get; }

プロパティ値

Marker

Name

データ系列の名前を取得または設定します。

public string Name { get; set; }

プロパティ値

string

//セルへの参照名
chart.NSeries[0].Name = "=A1";

//名前に文字列を設定
chart.NSeries[0].Name = "First Series";
'セルへの参照名
chart.NSeries[0].Name = "=A1"

'名前に文字列を設定
chart.NSeries[0].Name = "First Series"

Overlap

棒やカラムがどのように配置されるかを指定します。 -100から100の値を取ることができます。 2-D棒および2-Dカラムチャートのみに適用されます。

public short Overlap { get; set; }

プロパティ値

short

PlotOnSecondAxis

この系列が第2の値軸にプロットされているかどうかを示します。

public bool PlotOnSecondAxis { get; set; }

プロパティ値

bool

Points

チャート内の系列のポイントのコレクションを取得します。

public ChartPointCollection Points { get; }

プロパティ値

ChartPointCollection

備考

チャートが円グラフまたは棒グラフである場合、最後のポイントは最初の円プロットの他のポイントです。

SecondPlotSize

円グラフまたは棒グラフの第2セクションのサイズを取得または設定します。 プライマリ円のサイズのパーセンテージとして表されます。 5から200の値を取ることができます。

public short SecondPlotSize { get; set; }

プロパティ値

short

SeriesLines

積み上げ棒グラフまたは積み上げカラムチャートの系列ラインを表すSeriesLinesオブジェクトを返します。 積み上げ棒グラフおよび積み上げカラムチャートのみに適用されます。

public Line SeriesLines { get; }

プロパティ値

Line

Shadow

系列に影がある場合はtrueを返します。

public bool Shadow { get; set; }

プロパティ値

bool

ShapeProperties

Seriesの視覚的形状プロパティを保持するAspose.Cells.Drawing.ShapePropertyCollectionオブジェクトを取得します。

public ShapePropertyCollection ShapeProperties { get; }

プロパティ値

ShapePropertyCollection

ShowNegativeBubbles

負のバブルがチャートグループに表示される場合はtrueを返します。バブルチャートのみに有効です。

public bool ShowNegativeBubbles { get; set; }

プロパティ値

bool

SizeRepresents

バブルチャートでバブルサイズが何を表すかを取得または設定します。

public BubbleSizeRepresents SizeRepresents { get; set; }

プロパティ値

BubbleSizeRepresents

備考

BubbleSizeRepresents.SizeIsAreaは、値Aspose.Cells.Charts.Series.BubbleSizesがバブルの面積であることを意味します。 BubbleSizeRepresents.SizeIsWidthは、値Aspose.Cells.Charts.Series.BubbleSizesがバブルの幅であることを意味します。

Smooth

曲線のスムージングを表します。 折れ線グラフまたは散布図に対して曲線スムージングがオンになっている場合はtrueを返します。 折れ線および線で接続された散布図のみに適用されます。

public bool Smooth { get; set; }

プロパティ値

bool

SplitType

円グラフまたは棒グラフの第2の円または棒にどのデータポイントが含まれるかを決定する方法を取得または設定します。

public ChartSplitType SplitType { get; set; }

プロパティ値

ChartSplitType

SplitValue

円グラフまたは棒グラフの第2の円または棒にどのデータポイントが含まれるかを決定するために使用される値を取得または設定します。

public double SplitValue { get; set; }

プロパティ値

double

TrendLines

この系列のすべてのトレンドラインを返します。

public TrendlineCollection TrendLines { get; }

プロパティ値

TrendlineCollection

Type

データ系列のタイプを取得または設定します。

public ChartType Type { get; set; }

プロパティ値

ChartType

UpBars

折れ線グラフの上向きバーを表すDropBarsオブジェクトを返します。 折れ線グラフのみに適用されます。

public DropBars UpBars { get; }

プロパティ値

DropBars

Values

このチャート系列のY値を表します。

public string Values { get; set; }

プロパティ値

string

ValuesFormatCode

ValuesのNumberListのフォーマットコードを表します。

public string ValuesFormatCode { get; set; }

プロパティ値

string

XErrorBar

系列のX方向エラーバーを表します。

public ErrorBar XErrorBar { get; }

プロパティ値

ErrorBar

XValues

チャート系列のx値を表します。

public string XValues { get; set; }

プロパティ値

string

XValuesFormatCode

X ValuesのNumberListのフォーマットコードを表します。

public string XValuesFormatCode { get; set; }

プロパティ値

string

YErrorBar

系列のY方向エラーバーを表します。

public ErrorBar YErrorBar { get; }

プロパティ値

ErrorBar

メソッド

Move(int)

系列を上または下に移動します。

public void Move(int count)

パラメーター

count int

上または下に移動する数。 この値がゼロ未満の場合は系列を上に移動し、 この値がゼロより大きい場合は系列を下に移動します。

 日本語