Zedgraph control series (1)

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.