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.line([
3
{x: 'January', value: 29},
4
{x: 'February', value: 72},
5
{x: 'March', value: 250},
6
{x: 'April', value: 330},
7
{x: 'May', value: 85},
8
{x: 'June', value: 390},
9
{x: 'July', value: 95},
10
{x: 'August', value: 15}
11
]);
12
chart.xScroller(true);
13
14
// Sets zoom using object.
15
chart.xZoom({pointsCount: 10});
16
17
chart.title('Set chart zoom parameter as an object');
18
chart.container('container');
19
chart.draw();
20
});