掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
zedgraphでグラフを作るには? (ID:70466)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
zedgraphをいうDLLを使いフォームに棒グラフや線グラフを表示したいのですがうまくいきません。VC++のサンプルソースがなかったので、C#のサンプルを元に作ったのですがうまく表示ができませんでした。 どなたかzedgraphの使い方知っているかた、教えてください。 ↓が私の書いたソースです。 private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { GraphPane myPane = this->zedGraphControl3->GraphPane; // Set the Titles myPane.Title->Text = "My Test Graph\n(For CodeProject Sample)"; myPane.XAxis->Title->Text = "My X Axis"; myPane.YAxis->Title->Text = "My Y Axis"; // Make up some data arrays based on the Sine function PointPairList list1 = gcnew PointPairList(); IPointList^ list; for ( int i = 0; i < 36; i++ ) { double x = i * 10.0 + 50.0; double y = Math::Sin( i * Math::PI / 15.0 ) * 16.0; list1.Add( x, y ); } list=list1.Clone(); LineItem curve = myPane.AddCurve("label",list,Color::Red,SymbolType::Circle); curve.Line->Width = 1.5F; curve.Symbol->Fill = gcnew Fill( Color::Red ); curve.Symbol->Size = 5; // Make the XAxis start with the first label at 50 myPane.XAxis->Scale->BaseTic = 50; // Fill the axis background with a gradient myPane.Chart->Fill = gcnew Fill( Color::White, Color::SteelBlue, 45.0F ); // Calculate the Axis Scale Ranges myPane.AxisChange(); Refresh(); }
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.