Nplot
BSDライセンスのオープンソースグラフ描画ライブラリ
準備
参照設定とツールボックスのアイテムの選択にNPlot.dllを追加
フォームに、ツールボックスから追加されたPlotSurface2Dを追加
あとは、各グラフ種類毎にグラフを生成し、上記のPlotSurface2Dコントロールへ描画する。
PlotSurface2Dをクリアしなければ、重ね描画も可能。
棒グラフ
データ作成
int[] intData = { 10, 20, 30, 40, 50, 60, 70, 50, 30, 10 };
NPlot - 棒グラフクラスのインスタンス生成
HistogramPlot HistogramPlot1 = new HistogramPlot();
BasePlotプロパティ
???
HistogramPlot1.Label
???
HistogramPlot1.ShowInLegend
???
HistogramPlot1.DataMember
データソース
HistogramPlot1.DataSource
HistogramPlotプロパティ
オフセット
HistogramPlot1.BaseOffset
バーの太さ(0.0-1.0)
HistogramPlot1.BaseWidth
横軸のメモリに対してのセンタリングするかどうか
HistogramPlot1.Center
バーの外枠の色
HistogramPlot1.Color
バーの外枠?
HistogramPlot1.Pen
塗りつぶし(黒一色なのか?→RectangleBrushで決定)
HistogramPlot1.Filled
バーの塗りつぶし
HistogramPlot1.RectangleBrush;
?? 読み取り専用
HistogramPlot1.IsStacked
描画エリアに追加する
plot.Add(HistogramPlot1);
描画エリアをリフレッシュ
plot.Refresh();
最終更新:2009年10月14日 15:17