Last week, because of the need to maintain a company's project and the need to use easy-to-use drawing controls, Google had a few unsatisfactory, but it was lucky to find zedgraph on SF, which is very powerful, and open source.
By the way, PM asked me to implement multiple Y coordinates. I felt that it took me four or five hours to re-encapsulate the function of GDI +, it looks pretty good at the end, but it's far from achieving Flexible Drag, flexible scaling, and so on, and my encapsulated graphics library-_-looks too simple ;)
The first time I got the zedgraph code, I had a rough look at its demo and it felt good. However, due to the large number of demos, I didn't take a closer look. I didn't see any demos with multiple y axes, later I saw a multiy demo.
In the past two days, I have used the zedgraph library to briefly describe the usage of zedgraph.
To use zedgraph, the first step is to reference it, and then use zedgraphcontrol mygc = new zedgraphcontrol ();
To obtain the image board object (for example, I think this is similar to the class structure of GDI + itself. Before drawing, you must first obtain a graphics carrier: Graphics in GDI +, zedgraphcontrol is used in zedgraph. graphpane.
After obtaining a zedgraphcontrol object, you can draw a picture on mygc. graphpane.
Then, to implement the curve drawing function, you must add a curve on the drawing board, that is, lineitem lines = mygc. graphpane. addcurve (...);
The biggest benefit of the zedgraph library is to bind data and curves. This is achieved through the pointpairlist set and all vertices need to be drawn, you only need to add the points to be drawn to pointpairlist, and then pass the pointpairlist in the addcurve method as the parameter.
In addition, the implementation of multiple y axes can easily achieve the goal through y2axis.
B. t. the W zedgraph library can be easily expanded, by the way, from zedgraphcontrol. the CS class starts tracing and can easily find shortcuts, but it can be written by foreigners, just zedgraphcontrol. the CS file is close to 4000 rows -_-
PS. The series of zedgraph graphics library will be released one after another