source: ether_statistics/web/resources/js/Wijmo.2.2.2/Wijmo-Complete/development-bundle/samples/barchart/stackedbar.html @ 649

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

wijmo

File size: 3.7 KB
Line 
1<!doctype html>
2<html lang="en">
3<head>
4    <title>BarChart - Stacked Bar Chart</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.wijbarchart.js" type="text/javascript"></script>
20    <script id="scriptInit" type="text/javascript">
21        $(document).ready(function () {
22            $("#wijbarchart").wijbarchart({
23                stacked: true,
24                axis: {
25                    y: {
26                        text: "Total Hardware"
27                    },
28                    x: {
29                        text: ""
30                    }
31                },
32                hint: {
33                    content: function () {
34                        return this.data.label + '\n ' + this.y + '';
35                    }
36                },
37                header: {
38                    text: "Console Wars"
39                },
40                seriesList: [{
41                    label: "US",
42                    legendEntry: true,
43                    data: { x: ['PS3', 'XBOX360', 'Wii'], y: [12.35, 21.50, 30.56] }
44                }, {
45                    label: "Japan",
46                    legendEntry: true,
47                    data: { x: ['PS3', 'XBOX360', 'Wii'], y: [4.58, 1.23, 9.67] }
48                }, {
49                    label: "Other",
50                    legendEntry: true,
51                    data: { x: ['PS3', 'XBOX360', 'Wii'], y: [31.59, 37.14, 65.32] }
52                }],
53                seriesStyles: [{
54                    fill: "#8ede43", stroke: "#7fc73c", opacity: 0.8
55                }, {
56                    fill: "#6aaba7", stroke: "#5f9996", opacity: 0.8
57                }, {
58                    fill: "#466a85", stroke: "#3e5f77", opacity: 0.8
59                }],
60                seriesHoverStyles: [{
61                    "stroke-width": 1.5, opacity: 1
62                }, {
63                    "stroke-width": 1.5, opacity: 1
64                }, {
65                    "stroke-width": 1.5, opacity: 1
66                }]
67            });
68        });
69    </script>
70</head>
71<body class="demo-single">
72    <div class="container">
73        <div class="header">
74            <h2>
75                Stacked Bar Chart</h2>
76        </div>
77        <div class="main demo">
78            <!-- Begin demo markup -->
79            <div id="wijbarchart" class="ui-widget ui-widget-content ui-corner-all" style="width: 756px; height: 475px">
80            </div>
81            <!-- End demo markup -->
82            <div class="demo-options">
83                <!-- Begin options markup -->
84                <!-- End options markup -->
85            </div>
86        </div>
87        <div class="footer demo-description">
88            <p>
89                This sample illustrates how to create a stacked chart by setting the stacked option to true.</p>
90        </div>
91    </div>
92</body>
93</html>
Note: See TracBrowser for help on using the repository browser.