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 chart = anychart.financial();
3
4
chart.ohlc([
5
[new Date("28-Aug-07"), 511.53, 514.98, 505.79, 506.40],
6
[new Date("29-Aug-07"), 507.84, 513.30, 507.23, 512.88],
7
[new Date("30-Aug-07"), 512.36, 515.40, 510.58, 511.40],
8
[new Date("31-Aug-07"), 513.10, 516.50, 511.47, 515.25],
9
[new Date("01-Sep-07"), 515.02, 528.00, 514.62, 525.15]
10
]);
11
12
var axis = chart.xAxis();
13
axis.ticks(true);
14
axis.minorTicks({stroke: "#424242"});
15
axis.minorLabels(true);
16
17
var myXScale = chart.xScale();
18
// Sets minor ticks.
19
myXScale.minorTicks([new Date("27-Aug-07"), new Date("29-Aug-07"), new Date("31-Aug-07"), new Date("02-Sep-07")]);
20
21
chart.container("container");
22
chart.draw();
23
});