source: ether_statistics/web/resources/js/Wijmo.2.2.2/Wijmo-Complete/development-bundle/samples/piechart/datasource.html @ 604

Last change on this file since 604 was 604, checked in by vmipsl, 12 years ago

images

File size: 2.5 KB
RevLine 
[604]1<!doctype html>
2<html lang="en">
3<head>
4        <title>Data Source</title>
5        <meta charset="utf-8" />
6        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
7        <meta name="description" content="%description%" />
8        <meta name="keywords" content="" />
9        <meta name="author" content="ComponentOne" />
10       
11        <link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />
12       
13        <script src="../../external/jquery-1.8.0.min.js" type="text/javascript"></script>
14        <script src="../../external/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script>
15        <script src="../../external/raphael-min.js" type="text/javascript"></script>
16        <script src="../../external/globalize.min.js" type="text/javascript"></script>
17        <script src="../../wijmo/jquery.wijmo.raphael.js" type="text/javascript"></script>
18        <script src="../../wijmo/jquery.wijmo.wijchartcore.js" type="text/javascript"></script>
19        <script src="../../wijmo/jquery.wijmo.wijpiechart.js" type="text/javascript"></script>
20        <style type="text/css">
21                #wijpiechart
22                {
23                        width: 756px;
24                        height: 475px;
25                }
26        </style>
27        <script id="scriptInit" type="text/javascript">
28                $(document).ready(function () {
29                        var data = [{
30                                Device: 'MacBook Pro',
31                                Percent: 46.78,
32                                Offset: 15
33                        }, {
34                                Device: 'iMac',
35                                Percent: 23.18
36                        }, {
37                                Device: 'MacBook',
38                                Percent: 20.25
39                        }, {
40                                Device: 'Mac Pro',
41                                Percent: 5.41
42                        }, {
43                                Device: 'Mac mini',
44                                Percent: 3.44
45                        }];
46
47                        $("#wijpiechart").wijpiechart({
48                                dataSource: data,
49                                data: {
50                                        label: { bind: "Device" },
51                                        value: { bind: "Percent" },
52                                        offset: { bind: "Offset" }
53                                },
54                                radius: 140,
55                                legend: { visible: true },
56                                hint: {
57                                        content: function () {
58                                                return this.data.label + " : " + Globalize.format(this.value / this.total, "p2");
59                                        }
60                                },
61                                header: {
62                                        text: "Steam - Mac Hardware"
63                                }
64                        });
65                });
66        </script>
67</head>
68<body class="demo-single">
69        <div class="container">
70                <div class="header">
71                        <h2>
72                                DataSource</h2>
73                </div>
74                <div class="main demo">
75                        <!-- Begin demo markup -->
76                        <div id="wijpiechart" class="ui-widget ui-widget-content ui-corner-all">
77                        </div>
78                        <!-- End demo markup -->
79                        <div class="demo-options">
80                                <!-- Begin options markup -->
81                                <!-- End options markup -->
82                        </div>
83                </div>
84                <div class="footer demo-description">
85
86<p>This sample shows how to create a pie chart using an array as the data source for the chart.</p>
87
88                </div>
89        </div>
90</body>
91</html>
Note: See TracBrowser for help on using the repository browser.