Source Document
Template document (JavaScript code is reduced here and the code is placed in the CDATA segment)
Source Document |
|
Template document (JavaScript code is reduced here and the code is placed in the CDATA segment) |
|
In this example, the syntax for converting to VML is used. If you replace it with another SVG syntax, you can convert it into an SVG image and add any number of units.
In fact, there are more completed examples, including generating a unit tree (Supporting Dynamic Data Acquisition and node list generation), generating an editing interface (updatable database), and so on.
The source code is in a large class library and needs to be extracted and modified before being sent for independent use.
For this conversion method, please share your comments with us.
Ps. The efficiency is also combined to generate (convert) and display (innerHTML) This pie chart, with an instantaneous CPU usage of 5%. My machine T2080 1.73 GHz, 2G 667 memory. The conversion code passed the test in FF1.07 and opera8.5 very early. Later, some changes (non-core) were made, and the compatibility should not be lost. In terms of color, there should be a better way to generate a color with a higher degree of discrimination. The color generated by the current method is somewhat too similar.