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
var stage = anychart.graphics.create("container");
3
4
var firstChart = anychart.line([1, 4, 2, 9]);
5
firstChart.yAxis({minorTicks: {stroke: "#424242"}});
6
firstChart.bounds(0, 0, "50%", "100%");
7
8
var myYScale = firstChart.yScale();
9
myYScale.minorTicks([1.25, 3.75, 6.25, 8.75]);
10
11
firstChart.container(stage);
12
firstChart.draw();
13
14
var secondChart = anychart.column([1, 4, 2, 9]);
15
secondChart.yAxis({minorTicks: {stroke: "#424242"}});
16
secondChart.bounds("50%", 0, "50%", "100%");
17
18
// Gets minor ticks.
19
var minorTicks = myYScale.minorTicks();
20
21
var yScale = secondChart.yScale();
22
yScale.minorTicks(minorTicks.get());
23
24
secondChart.container(stage);
25
secondChart.draw();
26
});