Data Sheet _VML Related

Source: Internet
Author: User
Tags polyline
Now let's look at some of the applications of VML. The data graph can be said to be a good dish for VML. The most important step in drawing a chart is to convert the data into coordinates. Because VML is vector, there is a great degree of freedom in the value range of the data because you can use coordinate values with decimals or very large data as coordinate values.
Before making a chart, it is important to be clear about the chart as a whole, which means using Group to contain the VML; the x, Y axis is within the fourth image limit, and the size of the VML is determined by width,height, not by Coordsize. Next, let's look at a few classic charts.
Graph (Trend chart): It looks like a curve, in fact, the subdivision is a segment of a small polyline. So we can choose Polyline to do it. First, we'll draw the axes:









Perhaps you want to display the scale on the axis, which is also very easy to achieve, we can use an absolutely positioned p to do the coordinates, in the group, the use of absolute is actually relative group of relative positioning. Coordinate values you need to adjust yourself. Because we draw the horizontal axis using Px=200+73*i, (where 200 is the distance from the left) the ordinate is py=2800-73*i; (Because the total height is 2800, so subtract) now it's easy to convert the data into coordinates. Of course, here I is 0,1,2..7, can also be your specific data, conversion, only need to be proportional to the coordinate values, such as your ordinate value is from 100,200,300,. 700 the corresponding reaction to the coordinates is px=200+73*i*1/100 (wherein, I is the data value, 1/100 is the coordinate value and the data ratio)


The preparation of the chart has already been done, and the data is now poor. With the data, the data is instilled into the PolyLine, and the curve is displayed. Now let's use some fake data to see how it works! point here to show the curve
For more examples in this section, please visit the next page.
  • Related Article

    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.