Chart (Pie, Column, Linear Figure) We are often used in applications. It can help us very intuitive, very clear
Cheap to view the proportion or development trend of each part of the data. If the category of the data is fine, it may contain several sides of each large class
Small class (as shown).
If you want to use the pie chart to comprehensively, clearly display the structure and composition of the data, you can't display only the small class part, it is best
You can first display all the big cities in the data in a WebForm, and then display each other by clicking the corresponding pie block.
The composition of small class in a large class. Of course, there are many ways to solve the problem, here is the most common solution to real
Now this feature.
We usually make a pie chart and there are quite a few ways, such as OWC (Office Web Compens), ie
Microsoft's Office web components or use SVG implementation, and more. We use the most ordinary ways here, it is to use
The rich GDI class and objects provided by Microsoft .NET Framework can be easily implemented. ASP.NET
The reason why various data images can be formed in the client browser because the drawing function is provided in the ASP.NET, the specific work
The method is to create a Bitmap instance on the server side, then use the drawing function provided in ASP.NET, follow the images you want to generate
Sampling, drawing, finalizing the plotted examples on the data stream to the client's browser, and form a picture display
It is shown. Specific views of Mengxian's "dynamic cakes in ASP.NET", this is temporarily borrowed here
This example is :).
Using this method can draw a very beautiful graph, but there is a shortcomings, that is, these graphics have no super connectivity.
Connect, so you can't connect directly to any WebForm page. To achieve this feature, add super pictures to these static images
The function of the connection. Add a super connection to the image to increase the "hot zone" on the image! This is the image map, image
Map (Image Map) is an image that is divided into a number of zones or "hotspots, click" hot zone "
Page web pages are displayed.
The composition of hotspots is very simple, they are rule quadrangular, circular, irregular polygons. In html
In:
u quadrilateral:
u Circular:
u irregular polygon:
We are to build a hot zone on a dynamically generated image.
In this example of Meng Da Ge, the following graphic is formed:
We are going to add a hot zone on this graph. We can build a class first:
Class Map
Public function getimagemap () AS STRING
DIM Arrvalues (5) AS INTEGERDIM M_LINKS (Arrvalues.Length - 1) AS String
Dim CenterPoint as Point () = new point (arrvalues.lend - 1) {}
DIM POINT0 as Point () = new point (arrvalues.length - 1) {}
DIM POINT1 AS POINT () = New Point (Arrvalues.Length - 1) {}
DIM SGLTOTALUES AS SINGLE = 0
DIM I as integer = 0
DIM Objbitmap As New Bitmap (400, 200)
DIM Symbolleg as pointf = new pointf (335, 20)
DIM Descleg as pointf = new pointf (360, 16)
For i = 0 to arrivalueenames.length - 1
Point0 (i) .x = Symbolleg.x
Point0 (i) .y = symbolleg.y
Point1 (i) .x = Symbolleg.x 20
Point1 (i) .y = symbolleg.y 10
M_LINKS (I) = "#"
Symbolleg.y = 15
Descleg.y = 15
Next I
DIM M1 as integer () = new integer (5) {267, 277, 277, 272, 262, 255}
DIM M2 as integer () = new integer (5) {155, 149, 142, 136, 148, 102}
DIM M3 as integer () = new integer (5) {248, 299, 313, 288, 226, 227}
DIM M4 as integer () = new integer (5) {182, 175, 139, 102, 143, 133}
DIM M5 as integer () = new integer (5) {288, 314, 297, 263, 238, 266}
DIM M6 as integer () = new integer (5) {184, 150, 105, 100, 178, 140}
DIM M_IMAGEMAP AS STRING
m_imagemap = "
For i = 0 to arrregues.length - 1
M_ImageMap = m_imagemap "
NEXT
m_imagemap = m_imagemap " map>"
RETURN M_IMAGEMAP
END FUNCTION
END CLASS
In the page_load method in the AspxChart.aspx page, define an object of a Map class:
DIM MAPHOT AS NEW MAP
Response.write (Maphot.GetImageMap ())
This increases the heat zone, and can add any connection path to each hot zone by m_links (i) variable (in this example)
A empty connection). In this example, the polygonal heat zone is not dynamically added, but is written in the program using "hard coding".
of. This is obviously not what we want, but the dynamic produces these hot regions, it is very complicated, the younger brother has calculated it for a long time, it is not very fine.
Indeed! ! I hope that all friends can help me solve this problem!
Run the AspxChart.aspx page to generate the following new HTML code:
The above code is the generated heat zone!
The following statement is associated with the hot zone in the image:
This will achieve the original question!
Can write letter with me: guoyan@yujiacomm.com