-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathAGST_Scales_11.html
More file actions
executable file
·101 lines (83 loc) · 2.69 KB
/
Copy pathAGST_Scales_11.html
File metadata and controls
executable file
·101 lines (83 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<meta name="ac:name" content="AGST Scales 11"/>
<meta name="ac:short-desc" content=""/>
<meta name="ac:desc" content=""/>
<script src="https://cdn.anychart.com/releases/{{branch-name}}/js/anychart-base.min.js?hcode=a0c21fc77e1449cc86299c5faa067dc4"></script>
<script src="https://cdn.anychart.com/releases/{{branch-name}}/js/anychart-exports.min.js?hcode=a0c21fc77e1449cc86299c5faa067dc4"></script>
<script src="https://cdn.anychart.com/releases/{{branch-name}}/js/anychart-ui.min.js?hcode=a0c21fc77e1449cc86299c5faa067dc4"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.anychart.com/releases/{{branch-name}}/css/anychart-ui.min.css?hcode=a0c21fc77e1449cc86299c5faa067dc4" />
<style>
html, body, #container {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="container"></div>
<script>
anychart.onDocumentReady(function () {
// set stage
var stage = anychart.graphics.create("container");
// custom scale
var customScale = anychart.scales.linear();
customScale.minimum(8000);
customScale.maximum(20000);
var customTicks = customScale.ticks();
customTicks.interval(1000);
// set position and data for the first chart
var series_2003 = anychart.column([
["John" , 10000],
["Jake" , 12000],
["Peter" , 18000],
["James" , 11000],
["Mary" , 9000]
]);
series_2003.bounds(0, 0, "50%", "100%");
series_2003.title(false);
// set custom scale as y scale for the chart
series_2003.yScale(customScale);
// adjust axes settings
var yAxis2003 = series_2003.yAxis();
yAxis2003.orientation("right");
var xAxis2003 = series_2003.xAxis();
xAxis2003.title("Year 2003");
// set scale minimum
var yScale2003 = series_2003.yScale();
yScale2003.minimum(0);
// set stage
series_2003.container(stage);
// draw chart
series_2003.draw();
// set position and data for the second chart
var series_2004 = anychart.column([
["John" , 12000],
["Jake" , 15000],
["Peter" , 16000],
["James" , 13000],
["Mary" , 19000]
]);
series_2004.title(false);
series_2004.bounds("50%", 0, "50%", "100%");
// set custom scale as y scale for the chart
series_2004.yScale(customScale);
// adjust axes settings
var yAxis2004 = series_2004.yAxis();
yAxis2004.title("Sales");
var xAxis2004 = series_2004.xAxis();
xAxis2004.title("Year 2004");
// set scale minimum
var yScale2004 = series_2004.yScale();
yScale2004.minimum(0);
// set container
series_2004.container(stage);
// draw chart
series_2004.draw();
});
</script>
</body>
</html>