How to use a good chart component webchart (free of charge)

Source: Internet
Author: User

I introduced some free components at the source of the last inspiration. This time, I am very grateful for your use. Usage Webchart The components are really simple and have good results. Now let me briefly introduce how to use it and some notes:
1 First, create a project. Mywebchart

2. Add component in toolbox

After entering the project, right-click the toolbox and click Add / Remove item, go to custom toolbox, Click Browse, and find Webchart. dll File, in Chartcontrol Check the component name and click OK ".

In the toolbox, Web In the form. Chartcontrol Components

3. Use Components

Set Chartcontrol Drag components into the design form

This is simpleChartcontrolThe component diagram shows

4. WriteCode

First, add

UsingWebchart;

ThenPrivate VoidPage_load (ObjectSender, system. eventargs e) Add code

Private VoidPage_load (ObjectSender, system. eventargs E)

{

Chart C =NewAreachart ();

C. Data. Add (NewChartpoint ("Ene", 123 ));

C. Data. Add (NewChartpoint ("Ene", 33 ));

C. Data. Add (NewChartpoint ("Ene", 23 ));

C. Line. Color = color. blue;

Chartcontrol1.charts. Add (C );

Chartcontrol1.redrawchart ();

}

5. Compile and run

everything is ready, start running

How can I see the error? At the beginning, it really gave me a headache. I went to some related websites, especially the official websites, and found no results for a long time, but I finally found it at the end of the Help file, you need to createWebchartsDirectory, And then I created it according to the requirements of the Help file, and then compiled and run it again.

Ah, why is it wrong? I started to feel depressed and thought this component was useless?

Then I started to read the Help file and wrote" If you find an exception of generic error GDI + .... then it means the folder is there, but the user (ASPnet or whatever user you are using) do not have write permissions on the folder ." This makes it clear that if your system disk is NTFS The format must be in Webcharts Add ASPnet . I did what it meant. Wow, it's great.

The effect is good, and there are many properties for you to use with this control, making the interface more intuitive and better-looking.

: Http://www.carlosag.net/Tools/WebChart/Default.aspx

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.