Making statistics with super connections

zhaozj2021-02-16  51

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 = " vbcrlf

For i = 0 to arrregues.length - 1

M_ImageMap = m_imagemap ""   arrvaluenames (i)   ">> "  VBCRLF</p>
<p>Nextfor i = 0 TO Arrvalues.Length - 1</p>
<p>m_imagemap = m_imagemap   "<area href =