Microsoft chart control mschart (for download)

Source: Internet
Author: User

recently, Microsoft's chart control mschart is displayed on the Internet. You can use it to draw all the charts you can think, provide graph statistics and reports provide a good solution for graph display. Both web and winform modes are supported, but their disadvantages are also obvious, it can only be used in the latest development environment. net 3.5 SP1 and vs 2008 development environment.
The following is:
Control: Microsoft. NET framework 3.5 Microsoft chart control (Microsoft chart controls for Microsoft. NET Framework 3.5

Including English and Chinese versions. The link provided above is in the Chinese version and can be changed to the English version.
LanguagePackage: Microsoft chart controls for Microsoft. NET Framework 3.5 Language Pack
Microsoft. NET Framework 3.5 Language Pack for Microsoft chart controls, which contains 23 languages.
Microsoft chart controls add-on for Microsoft Visual Studio 2008
Documentation (Microsoft chart controls for. NET Framework Documentation)
Demo download: http://code.msdn.microsoft.com/mschart
ExampleProgramAfter running, it is very powerful and can support a variety of graphical display, common: point chart, pie chart, column chart, graph, Area Chart, column chart, and so on, at the same time, it also supports 3D Chart display. However, I think the most useful function is to support attribute operations on various points in the graph, it can define the prompt information (tooltip), hyperlink, and JavaScript actions of various points, labels, and images on the image, rather than other images.Class LibraryOnly one image is generated. With these images and Microsoft's own Ajax framework, you can create an interactive graph statistics report.

I.Install
The installation of the control is relatively simple. After downloading the control, run" Mschart . EXE "program, which will automatically detect your environment and install it in the system directory. If you want to directly use it in the vs 2008 environment, you need to install Plug-ins Mschart_visualstudioaddon.exe, and a Chinese language package mschartlp_chs.exe. After the installation, open vs2008. Tools The bar shows a chart control.
II. Use
After installation, create a. net3.5 web project and drag and drop it to the Web interface to be used just like a common control. After a preliminary study, the entire graphic control consists of the following parts:
1. Annotations -- a set of graphical annotations
2. chartareas-chart area set
3. Legends-legend set
4. Series -- a sequence set of charts (that is, a set of chart data objects)
5. Titles -- the title set of the icon
Annotations annotation set
Annotations is a set of graphic annotation objects. The so-called annotation objects are similar to the detailed or annotated description of a certain vertex. For example, key information of each node is implemented on the image.
A single image can have multiple annotation objects, and can add annotation objects of more than a dozen graphic styles, including common arrows, clouds, moments, images, and other annotation symbols, through the attributes of each annotation object, you can easily set the location, color, size, text content style, and other common attributes of the annotation object.
Chartareas chart area set
Chartareas can be understood as a drawing area of a chart. For example, if you want to display two different attributes in a chart, one is user traffic, and the other is system resource usage, it is obviously unreasonable for you to plot the two situations in one graph. In this case, you can create two chartarea and one for displaying user traffic, the other is used to display the usage of system resources.
Of course, the chart control does not limit how many drawing areas you can add as needed. For each drawing area, you can set its own attributes, such as X, Y axis, and background.
Legends legend set
Legends is a collection of legends, indicating the meaning of each line or color in the image. Likewise, an image can contain multiple legends, for example, you can create multiple legends to describe the information of each graphic area. Configuration The description is not described in detail here. You can refer to the examples on the official website for a wide range of details.
Series chart Sequence
The chart sequence should be the most important content in the whole drawing. In layman's terms, it is the actual drawing data area. The actual graphic shape is formed by each chart in the set, you can add multiple charts to the set. Each chart can have its own shape, style, and independent data.
Note that for each chart, you can specify the chart area (see the chartareas description) so that the chart is displayed in a certain drawing area, you can also overlay several charts in the same drawing area.
Titles title collection
It can be understood by literal meaning. It is the title configuration of the chart. You can also add multiple titles and set attributes such as the style, text, and position of the title. By looking at its attributes, you can understand their meanings.
3. Other attributes
Relatively speaking, I think there are three useful attributes: Label, tooltip, and URL link.
Label is the meaning of a label. It can be used to describe key numbers or texts in the key positions of an image.
Tooltip is the meaning of the prompt. It is used to prompt the user with relevant details or instructions when moving the mouse over key points, such as labels, graphic key points, and titles. For example, you can add the tooltip attribute to each vertex in the curve and write the content to be described in detail, for example, the detailed sales details. When you move the cursor to this vertex, A prompt is displayed.
Tooltip supports Simple and custom methods. A simple method is an attribute effect, such as the title set on an HTML page, you can display complex prompts such as graphics and text. For more information, see the following official examples: interactivity and Ajax/tooltips and interactivity and Ajax/client side scripts.
URL link. In the chart control, most of the controls have the URL and tooltip attributes. You can set this attribute to go to other corresponding pages when you click the mouse.
I suggest you take a look at the interactivity and Ajax section in the official example. , Wonderful :)
Example: create a real-time statistical table for CPU information and memory usage
Below is a small example to create a system's real-time memory Statistical Chart, using the Ajax method, andWindows API to obtain the system memory.
First, create An ASPX page, drag a chart control to the page, and set the chart control attributes as follows:
Among them, memory_info and computerinfo are a defined struct and call Win32 API Interface . The program retrieves the current memory and CPU information for each chart object each time it loads, and then adds a vertex to the chart. Note that, you must set the enableviewstate attribute of the chart control to true. Otherwise, the status cannot be recorded.

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.