An example of an XML format data conversion to a chart _javascript tips

Source: Internet
Author: User
Tags cdata documentation
Source Document

Template documentation (here shrinks the JS code, and the code is in a CDATA section)
Source Document
Template documentation (here shrinks the JS code, and the code is in a CDATA section)
Results
This example uses the syntax converted to VML, and replaces it with other SVG-like syntax, which can be converted into SVG graphics and the number of units can be arbitrarily added.

There are actually more examples that have been completed, including building the Unit tree (which supports dynamic Data acquisition and generating a list of nodes), creating an editing interface (updatable database), and so on.

Source code in a large class library, you need to extract the changes and then hair, in order to use independently.

For this way of conversion, please give advice to friends, not hesitate to enlighten.

PS. Efficiency is also OK, generate (convert) and display (InnerHTML) out of this pie chart, there is instantaneous 5% CPU occupancy rate. My machine T2080 1.73ghz,2g 667 memory. The conversion code was tested early in FF1.07 and opera8.5, and later made some changes (Non-core) and should not lose compatibility. Color, there should be a better way to generate a more differentiated color, and now the method produces a bit too close to the color.

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.