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
anychart.format.inputDateTimeFormat('dd-MM-yyThh:mm');
3
anychart.format.outputDateFormat('dd-MM-yy');
4
5
var chart = anychart.candlestick([
6
['28-08-2018T08:00', 511.53, 514.98, 505.79, 506.40],
7
['29-08-2018T08:00', 507.84, 513.30, 507.23, 512.88],
8
['30-08-2018T08:00', 512.36, 515.40, 510.58, 511.40],
9
['31-08-2018T08:00', 513.10, 516.50, 511.47, 515.25],
10
['01-09-2018T08:00', 515.02, 528.00, 514.62, 525.15]
11
]);
12
13
var xScale = chart.xScale();
14
15
// Enable minimum alignment.
16
xScale.alignMinimum(true);
17
18
// Enable maximum alignment.
19
xScale.alignMaximum(true);
20
21
chart.title('Enable minimum and maximum alignment');
22
chart.container('container');
23
chart.draw();
24
});