ZedGrap controls chart Curves

Source: Internet
Author: User

Problem description:

Use the ZedGrap control in C # To draw a chart

ZedGrap introduction:

Install the ZedGrap Control

ZedGraph control dll file:

Add the ZedGraph control. First, add the ZedGrap. dll file to the newly created C # image project.

Note:

In the project reference, right-click and select Add reference. In the "add reference" dialog box that appears, select Browse to add ZedGraph. dll file

Note:

The successfully added ZedGraph. dll file will appear in the reference

Note:

As shown in, right-click the blank area in the toolbox and select "select item" from the displayed menu. The window for selecting toolbox items appears.

Note:

As shown in, in the select Toolbox window that appears, Click Browse to find the added ZedGraph. dll file.

Note:

As shown in, add ZedGraph. dll

Note:

After successfully adding the ZedGraph. dll file, you will see the ZedGraphControl control in the toolbox. Now you can use the ZedGrapControl control normally, which is similar to the common space.

(1) Use the ZedGraphControl Control

Drag the ZedGrapControl control in the toolbox

(2) set the basic information of the ZedGrapControl Control

Note:

These are common classes and variables in ZedGrap, such as GraphPane and PointPairList.

Note:

GraphPane in the ZedGrapControl space returns a GraphPane object, and PointPairList is the container of the vertex in the chart.

Note:

The code above indicates the ZedGraph settings, including the chart title, X-axis name, Y-axis name, Y-axis step size, X-axis step size, Y-axis maximum coordinate value, and minimum coordinate value, fill color of the coordinate axis, set the color and name of the curve in the coordinate

(3) add coordinate points in ZedGraph

Note:

The above Code adds coordinate points to ZedGraph. Note that after adding coordinates, you need to re-draw the coordinate axes.

(4) References:

Related Article

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.