Class ChartPoint
Namespace: Aspose.Cells.Charts
Assembly: Aspose.Cells.dll (25.2.0)
チャート内のシリーズの単一ポイントを表します。
public class ChartPoint
継承
継承されたメンバー
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.PieExploded, 5, 0, 25, 10);
//新しく追加されたチャートのインスタンスにアクセス
Chart chart = worksheet.Charts[chartIndex];
//「A1」セルから「B3」までの範囲のNSeries(チャートデータソース)をチャートに追加
chart.NSeries.Add("A1:B3", true);
//データラベルを表示
chart.NSeries[0].DataLabels.ShowValue = true;
for (int i = 0; i < chart.NSeries[0].Points.Count; i++)
{
//データポイントを取得
ChartPoint point = chart.NSeries[0].Points[i];
//ピエの爆発を設定
point.Explosion = 15;
//境界線の色を設定
point.Border.Color = System.Drawing.Color.Red;
}
//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.PieExploded, 5, 0, 25, 10)
'新しく追加されたチャートのインスタンスにアクセス
Dim chart As Chart = worksheet.Charts(chartIndex)
'「A1」セルから「B3」までの範囲のNSeries(チャートデータソース)をチャートに追加
chart.NSeries.Add("A1:B3", True)
'データラベルを表示
chart.NSeries(0).DataLabels.IsValueShown = True
For i As Integer = 0 To chart.NSeries(0).Points.Count - 1
'データポイントを取得
Dim point As ChartPoint = chart.NSeries(0).Points(i)
'ピエの爆発を設定
point.Explosion = 15
'境界線の色を設定
point.Border.Color = System.Drawing.Color.Red
Next i
'Excelファイルを保存
workbook.Save("book1.xls")
プロパティ
ArcEndPointXPx
Chart.Calculate()メソッドを呼び出した後の円セクションの終点のx座標を取得します。 円グラフおよびドーナツチャートに適用されます。
public float ArcEndPointXPx { get; }
プロパティ値
ArcEndPointYPx
Chart.Calculate()メソッドを呼び出した後の円セクションの終点のy座標を取得します。 円グラフおよびドーナツチャートに適用されます。
public float ArcEndPointYPx { get; }
プロパティ値
ArcStartPointXPx
Chart.Calculate()メソッドを呼び出した後の円セクションの始点のx座標を取得します。 円グラフおよびドーナツチャートに適用されます。
public float ArcStartPointXPx { get; }
プロパティ値
ArcStartPointYPx
Chart.Calculate()メソッドを呼び出した後の円セクションの始点のy座標を取得します。 円グラフおよびドーナツチャートに適用されます。
public float ArcStartPointYPx { get; }
プロパティ値
Area
Aspose.Cells.Charts.ChartPoint.Area?text=+エリアを取得します。
public Area Area { get; }
プロパティ値
Border
Aspose.Cells.Drawing.Line?text=+境界線を取得します。
public Line Border { get; }
プロパティ値
BorderWidthPx
Chart.Calculate()メソッドを呼び出した後の境界線の幅をピクセル単位で取得します。
public int BorderWidthPx { get; }
プロパティ値
DataLabels
このチャートポイントに関連付けられたデータラベルを表すAspose.Cells.Charts.ChartPoint.DataLabelsオブジェクトを返します。
public DataLabels DataLabels { get; }
プロパティ値
DoughnutInnerRadius
Chart.Calculate()メソッドを呼び出した後のドーナツスライスの内半径をピクセル単位で取得します。 ドーナツチャートに適用されます。
public int DoughnutInnerRadius { get; }
プロパティ値
EndAngle
Chart.Calculate()メソッドを呼び出した後の円セクションの終点角度を取得します。x軸から時計回りに度数法で測定されます。 円グラフに適用されます。
public float EndAngle { get; }
プロパティ値
Explosion
円グラフの中心から開いた円スライスまでの距離を円の直径のパーセンテージで表します。
public int Explosion { get; set; }
プロパティ値
InnerArcEndPointXPx
Chart.Calculate()メソッドを呼び出した後の円セクションの終点のx座標を取得します。 ドーナツチャートに適用されます。
public float InnerArcEndPointXPx { get; }
プロパティ値
InnerArcEndPointYPx
Chart.Calculate()メソッドを呼び出した後の円セクションの終点のy座標を取得します。 ドーナツチャートに適用されます。
public float InnerArcEndPointYPx { get; }
プロパティ値
InnerArcStartPointXPx
Chart.Calculate()メソッドを呼び出した後の円セクションの始点のx座標を取得します。 ドーナツチャートに適用されます。
public float InnerArcStartPointXPx { get; }
プロパティ値
InnerArcStartPointYPx
Chart.Calculate()メソッドを呼び出した後の円セクションの始点のy座標を取得します。 ドーナツチャートに適用されます。
public float InnerArcStartPointYPx { get; }
プロパティ値
IsInSecondaryPlot
このデータポイントがパイオブパイまたはバーボブパイチャートの2番目の円またはバーにあるかどうかを示す値を取得または設定します。
public bool IsInSecondaryPlot { get; set; }
プロパティ値
Marker
Aspose.Cells.Charts.ChartPoint.Marker?text=+マーカーを取得します。
public Marker Marker { get; }
プロパティ値
RadiusPx
Chart.Calculate()メソッドを呼び出した後のバブル、円、またはドーナツの半径をピクセル単位で取得します。
public int RadiusPx { get; }
プロパティ値
Shadow
チャートポイントに影がある場合はTrueを返します。
public bool Shadow { get; set; }
プロパティ値
ShapeHeight
Chart.Calculate()メソッドを呼び出した後のチャートの高さを1/4000単位で取得します。
public int ShapeHeight { get; }
プロパティ値
ShapeHeightPx
Chart.Calculate()メソッドを呼び出した後の高さをピクセル単位で取得します。
public int ShapeHeightPx { get; }
プロパティ値
ShapeProperties
ChartPointの視覚的な形状プロパティを保持するAspose.Cells.Drawing.ShapePropertyCollectionオブジェクトを取得します。
public ShapePropertyCollection ShapeProperties { get; }
プロパティ値
ShapeWidth
Chart.Calculate()メソッドを呼び出した後のチャートの幅を1/4000単位で取得します。
public int ShapeWidth { get; }
プロパティ値
ShapeWidthPx
Chart.Calculate()メソッドを呼び出した後の幅をピクセル単位で取得します。
public int ShapeWidthPx { get; }
プロパティ値
ShapeX
Chart.Calculate()メソッドを呼び出した後の左上隅のx座標を1/4000単位で取得します。
public int ShapeX { get; }
プロパティ値
ShapeXPx
Chart.Calculate()メソッドを呼び出した後の左上隅のx座標をピクセル単位で取得します。
public int ShapeXPx { get; }
プロパティ値
ShapeY
Chart.Calculate()メソッドを呼び出した後の左上隅のy座標を1/4000単位で取得します。
public int ShapeY { get; }
プロパティ値
ShapeYPx
Chart.Calculate()メソッドを呼び出した後の左上隅のy座標をピクセル単位で取得します。
public int ShapeYPx { get; }
プロパティ値
StartAngle
Chart.Calculate()メソッドを呼び出した後の円セクションの始点角度を取得します。x軸から時計回りに度数法で測定されます。 円グラフに適用されます。
public float StartAngle { get; }
プロパティ値
XValue
チャートポイントのX値を取得または設定します。
public object XValue { get; set; }
プロパティ値
XValueType
チャートポイントのX値の型を取得します。
public CellValueType XValueType { get; }
プロパティ値
YValue
チャートポイントのY値を取得または設定します。
public object YValue { get; set; }
プロパティ値
YValueType
チャートポイントのY値の型を取得します。
public CellValueType YValueType { get; }
プロパティ値
メソッド
GetBottomPointCount()
Chart.Calculate()メソッドを呼び出した後の底点の数を取得します。
public int GetBottomPointCount()
戻り値
GetBottomPointXPx(int)
Chart.Calculate()メソッドを呼び出した後の形状の底点のx座標を取得します。 3Dチャートに適用されます: Column3D, Bar3D, Cone, Cylinder, Pyramid
public float GetBottomPointXPx(int index)
パラメータ
index
int
戻り値
GetBottomPointYPx(int)
Chart.Calculate()メソッドを呼び出した後の形状の底点のy座標を取得します。 3Dチャートに適用されます: Column3D, Bar3D, Cone, Cylinder, Pyramid
public float GetBottomPointYPx(int index)
パラメータ
index
int
戻り値
GetOnCategoryAxisPointCount()
Chart.Calculate()メソッドを呼び出した後のカテゴリ軸上のポイントの数を取得します。エリアチャートにのみ適用されます。
public int GetOnCategoryAxisPointCount()
戻り値
備考
エリア2Dチャートは1を返します。
エリア3Dチャートは2を返します。
GetOnCategoryAxisPointXPx(int)
Chart.Calculate()メソッドを呼び出した後のカテゴリ軸上のポイントのx座標を取得します。エリアチャートにのみ適用されます。
public float GetOnCategoryAxisPointXPx(int index)
パラメータ
index
int
戻り値
備考
エリア2Dチャート: indexは0です。
エリア3Dチャート: indexは0または1です。
GetOnCategoryAxisPointYPx(int)
Chart.Calculate()メソッドを呼び出した後のカテゴリ軸上のポイントのy座標を取得します。エリアチャートにのみ適用されます。
public float GetOnCategoryAxisPointYPx(int index)
パラメータ
index
int
戻り値
備考
エリア2Dチャート: indexは0です。
エリア3Dチャート: indexは0または1です。
GetTopPointCount()
Chart.Calculate()メソッドを呼び出した後のトップポイントの数を取得します。
public int GetTopPointCount()
戻り値
GetTopPointXPx(int)
Chart.Calculate()メソッドを呼び出した後の形状のトップポイントのx座標を取得します。 3Dチャートに適用されます: Column3D, Bar3D, Cone, Cylinder, PyramidおよびArea3D
public float GetTopPointXPx(int index)
パラメータ
index
int
戻り値
GetTopPointYPx(int)
Chart.Calculate()メソッドを呼び出した後の形状のトップポイントのy座標を取得します。 3Dチャートに適用されます: Column3D, Bar3D, Cone, Cylinder, PyramidおよびArea3D
public float GetTopPointYPx(int index)
パラメータ
index
int