テキストボックスを使用すれば、グラフ上の任意の位置に文字列を表示できます。

public TextObj(
string text, // 表示文字列
double x, // 表示位置 (X座標)
double y // 表示位置 (Y座標)
)
public TextObj(
string text,
double x,
double y,
CoordType coordType // 表示位置の座標系
)
座標系の指定はCoordType列挙型で行います。
public TextObj(
string text,
double x,
double y,
CoordType coordType,
AlignH alignH, // 水平方向の配置
AlignV alignV // 垂直方向の配置
)
| プロパティ | 内容 |
|---|---|
| FontSpec | フォントの設定 |
| Location | 表示位置 |
| Text | 表示文字列 |
TextObj textObj1 = new TextObj( "テキスト1", 0.0, 0.0 ); TextObj textObj2 = new TextObj( "テキスト2", 0.0, 0.0, CoordType.ChartFraction ); this.zedGraphControl.GraphPane.GraphObjList.Add( textObj1 ); this.zedGraphControl.GraphPane.GraphObjList.Add( textObj2 );

実行結果