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
// Adds candlestick series.
5
chart.candlestick([
6
{x: Date.UTC(2007, 7, 28), open: 511.53, high: 514.98, low: 505.79, close: 506.40},
7
{x: Date.UTC(2007, 7, 29), open: 506.40, high: 513.30, low: 505.23, close: 512.88},
8
{x: Date.UTC(2007, 7, 30), open: 512.88, high: 515.40, low: 510.58, close: 511.40},
9
{x: Date.UTC(2007, 7, 31), open: 511.40, high: 516.50, low: 509.47, close: 514.25}
10
]);
11
12
chart.title("Add Candlestick series to a chart.");
13
chart.container("container");
14
chart.draw();
15
});