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

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

images

File size: 4.0 KB
Line 
1<!doctype html>
2<html lang="en">
3<head>
4        <title>LineChart - DateTime</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/globalize.min.js" type="text/javascript"></script>
16        <script src="../../external/raphael-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.wijlinechart.js" type="text/javascript"></script>
20        <script id="scriptInit" type="text/javascript">
21                $(document).ready(function () {
22                        $("#wijdatelinechart").wijlinechart({
23                                showChartLabels: false,
24                                hint: {
25                                        content: function () {
26                                                return this.y;
27                                        }
28                                },
29                                header: {
30                                        text: "World of Warcraft Players by Region"
31                                },
32                                seriesList: [
33                                        {
34                                                label: "North America",
35                                                legendEntry: true,
36                                                data: {
37                                                        x: [new Date("7/1/2005"), new Date("8/1/2005"), new Date("10/1/2005"), new Date("12/1/2005"), new Date("3/1/2006"), new Date("12/1/2006"), new Date("1/1/2008")],
38                                                        y: [1000000, 1000000, 1100000, 1400000, 1700000, 2000000, 2500000]
39                                                },
40                                                markers: {
41                                                        visible: true,
42                                                        type: "circle"
43                                                }
44                                        },
45                                        {
46                                                label: "Europe",
47                                                legendEntry: true,
48                                                data: {
49                                                        x: [new Date("7/1/2005"), new Date("8/1/2005"), new Date("10/1/2005"), new Date("12/1/2005"), new Date("3/1/2006"), new Date("7/1/2006"), new Date("12/1/2006"), new Date("1/1/2008")],
50                                                        y: [1000000, 1000000, 900000, 1000000, 1000000, 1000000, 1500000, 2000000]
51                                                },
52                                                markers: {
53                                                        visible: true,
54                                                        type: "circle"
55                                                }
56                                        },
57                                        {
58                                                label: "Asia",
59                                                legendEntry: true,
60                                                data: {
61                                                        x: [new Date("7/1/2005"), new Date("8/1/2005"), new Date("10/1/2005"), new Date("3/1/2006"), new Date("9/1/2006"), new Date("12/1/2006"), new Date("1/1/2008")],
62                                                        y: [1500000, 2000000, 2400000, 3700000, 4000000, 4500000, 5500000]
63                                                },
64                                                markers: {
65                                                        visible: true,
66                                                        type: "circle"
67                                                }
68                                        }
69                                ],
70                                seriesStyles: [{
71                                        stroke: "#afe500", "stroke-width": 5, opacity: 0.8
72                                }, {
73                                        stroke: "#959595", "stroke-width": 5, opacity: 0.8
74                                }, {
75                                        stroke: "#2d2d2d", "stroke-width": 5, opacity: 0.8
76                                }],
77                                seriesHoverStyles: [{
78                                        "stroke-width": 8, opacity: 1
79                                }, {
80                                        "stroke-width": 8, opacity: 1
81                                }, {
82                                        "stroke-width": 8, opacity: 1
83                                }]
84                        });
85
86                        var resizeTimer = null;
87
88                        $(window).resize(function () { 
89                                window.clearTimeout(resizeTimer);
90                                resizeTimer = window.setTimeout(function () {
91                                        var jqLine = $("#wijdatelinechart"),
92                                                width = jqLine.width(),
93                                                height = jqLine.height();
94
95                                        if (!width || !height) {
96                                                window.clearTimeout(resizeTimer);
97                                                return;
98                                        }
99
100                                        jqLine.wijlinechart("redraw", width, height);
101                                }, 250);
102                        });
103                })
104        </script>
105</head>
106<body class="demo-single">
107        <div class="container">
108                <div class="header">
109                        <h2>
110                                DateTime</h2>
111                </div>
112                <div class="main demo">
113                        <!-- Begin demo markup -->
114                        <div id="wijdatelinechart" class="ui-widget ui-widget-content ui-corner-all" style="width: 756px; height: 475px">
115                        </div>
116                        <!-- End demo markup -->
117                        <div class="demo-options">
118                                <!-- Begin options markup -->
119                                <!-- End options markup -->
120                        </div>
121                </div>
122                <div class="footer demo-description">
123                        <p>
124This sample demonstrates how to add dates with corresponding data to a line chart.
125                        </p>
126                </div>
127        </div>
128</body>
129</html>
Note: See TracBrowser for help on using the repository browser.