开发者

Zed Graph Web and datatable

How can i use zed graph web to graph a dataset or datatable, the only examples i have found use test data.

example开发者_如何学Python


Here is a fairly straight forward tutorial. As of yesterday, I had no experience with ZedGraph, and this tutorial helped me learn inside out, and only took about 15 minutes.

http://www.codeproject.com/KB/graphics/zedgraph.aspx

He adds points to 2 lists:

  list1.Add( x, y1 );
  list2.Add( x, y2 );

This is because he is using two lines, do not confuse the two for a set of points, each list is its own set of points (hence the two different lines in the graph). If you want to graph database output, simply load in the points as you read in your records. Ex/

 while (aReader.Read())
    {
         list1.Add(aReader.GetString(0), aReader.GetString(1);
    }

Good luck!

EDIT: I just noticed this was VB.NET. You will have to download the VB code example from that tutorial if you would like to see the demonstration. They only show the c# I believe.


Loop through the rows in your DataTables and use that data to plot your points.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜