| 5 |
lars |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
|
2 |
<html>
|
|
|
3 |
|
|
|
4 |
<head>
|
|
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
6 |
<title>amCharts Responsive Example</title>
|
|
|
7 |
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/start/jquery-ui.css" rel="stylesheet" />
|
|
|
8 |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
|
|
|
9 |
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
|
|
10 |
<style>
|
|
|
11 |
.ui-resizable-helper {
|
|
|
12 |
border: 1px dotted gray;
|
|
|
13 |
}
|
|
|
14 |
|
|
|
15 |
.resizable {
|
|
|
16 |
display: block;
|
|
|
17 |
width: 800px;
|
|
|
18 |
height: 500px;
|
|
|
19 |
padding: 0;
|
|
|
20 |
border: 2px solid #ddd;
|
|
|
21 |
overflow: hidden;
|
|
|
22 |
position: relative;
|
|
|
23 |
}
|
|
|
24 |
|
|
|
25 |
iframe {
|
|
|
26 |
width: 100%;
|
|
|
27 |
height: 100%;
|
|
|
28 |
}
|
|
|
29 |
|
|
|
30 |
#controls {
|
|
|
31 |
background: #ccc;
|
|
|
32 |
opacity: 0.5;
|
|
|
33 |
padding: 5px 8px;
|
|
|
34 |
font-size: 14px;
|
|
|
35 |
font-weight: bold;
|
|
|
36 |
font-family: Verdana;
|
|
|
37 |
margin-bottom: 10px;
|
|
|
38 |
}
|
|
|
39 |
|
|
|
40 |
#dims {
|
|
|
41 |
background: #ddd;
|
|
|
42 |
color: #555;
|
|
|
43 |
padding: 5px 8px;
|
|
|
44 |
font-size: 14px;
|
|
|
45 |
font-family: Verdana;
|
|
|
46 |
width: 100px;
|
|
|
47 |
text-align: center;
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
.ui-resizable-se {
|
|
|
51 |
display: none!important;
|
|
|
52 |
}
|
|
|
53 |
</style>
|
|
|
54 |
<script>
|
|
|
55 |
$(function()
|
|
|
56 |
{
|
|
|
57 |
$(".resizable").resizable(
|
|
|
58 |
{
|
|
|
59 |
animate: true,
|
|
|
60 |
animateEasing: 'swing',
|
|
|
61 |
animateDuration: 250,
|
|
|
62 |
resize: function(event, ui)
|
|
|
63 |
{
|
|
|
64 |
$('#dims').html(ui.size.width + 'x' + ui.size.height + 'px');
|
|
|
65 |
}
|
|
|
66 |
});
|
|
|
67 |
});
|
|
|
68 |
|
|
|
69 |
function setType(type)
|
|
|
70 |
{
|
|
|
71 |
$('#iframe').attr('src', type);
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
function reload()
|
|
|
75 |
{
|
|
|
76 |
setType($('#type').val());
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
function resize(dim, dir)
|
|
|
80 |
{
|
|
|
81 |
var container = $('.resizable');
|
|
|
82 |
if ('w' == dim) container.css(
|
|
|
83 |
{
|
|
|
84 |
'width': container.width() + dir
|
|
|
85 |
});
|
|
|
86 |
else container.css(
|
|
|
87 |
{
|
|
|
88 |
'height': container.height() + dir
|
|
|
89 |
});
|
|
|
90 |
$('#dims').html(container.width() + 'x' + container.height() + 'px');
|
|
|
91 |
}
|
|
|
92 |
</script>
|
|
|
93 |
</head>
|
|
|
94 |
|
|
|
95 |
<body>
|
|
|
96 |
<div id="controls">
|
|
|
97 |
<input type="button" value="w-" onclick="resize('w', -50);" />
|
|
|
98 |
<input type="button" value="w+" onclick="resize('w', 50);" />
|
|
|
99 |
<input type="button" value="h-" onclick="resize('h', -50);" />
|
|
|
100 |
<input type="button" value="h+" onclick="resize('h', 50);" />
|
|
|
101 |
<select id="type" onchange="setType(this.options[this.selectedIndex].value);">
|
|
|
102 |
<option value="pie1.html" selected="selected">Pie #1 (Simple w/ legend)</option>
|
|
|
103 |
<option value="pie2.html" />Pie #2 (3D w/ legend)</option>
|
|
|
104 |
<option value="pie3.html" />Pie #3 (several instances)</option>
|
|
|
105 |
<option value="serial1.html">Serial #1 (Area)</option>
|
|
|
106 |
<option value="serial2.html">Serial #2 (Bar & Line)</option>
|
|
|
107 |
<option value="serial3.html">Serial #3 (Line w/ zoom)</option>
|
|
|
108 |
<option value="xy.html">XY</option>
|
|
|
109 |
<option value="radar.html">Radar</option>
|
|
|
110 |
<option value="gauge.html">Gauge</option>
|
|
|
111 |
<option value="funnel.html">Funnel</option>
|
|
|
112 |
<option value="gantt.html">GANTT</option>
|
|
|
113 |
<option value="stock.html">Stock</option>
|
|
|
114 |
<option value="map.html">Map</option>
|
|
|
115 |
</select>
|
|
|
116 |
<input type="button" value="reload" onclick="reload();" /> </div>
|
|
|
117 |
<div id="dims">800x500px</div>
|
|
|
118 |
<div class="resizable">
|
|
|
119 |
<iframe id="iframe" src="pie1.html" sytle="border: none; width: 100%; height: 100%;" frameborder="0"></iframe>
|
|
|
120 |
</div>
|
|
|
121 |
</body>
|
|
|
122 |
|
|
|
123 |
</html>
|