HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function() {
2
3
// define chart type
4
var chart = anychart.column();
5
6
// chart title
7
chart.title("Maximum and Minimum Scale Value");
8
9
// adjusting y scale minimum and maximum values
10
var yScale = chart.yScale();
11
yScale.minimum(-50);
12
yScale.maximum(100);
13
var yTicks = chart.yScale().ticks();
14
yTicks.interval(20);
15
16
// setteing data
17
var data = anychart.data.set([
18
["C", 5, 10],
19
["D", 25, 20],
20
["E", 15, 15]
21
]);
22
23
// setting series data
24
chart.column(data.mapAs({x: [0], value: [1]}));
25
chart.column(data.mapAs({x: [0], value: [2]}));
26
27
// setting data for line chart
28
chart.line([
29
["C", 10],
30
["D", 30],
31
["E", 15]
32
]);
33
34
chart.container("container");
35
chart.draw();
36
});