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.scatter();
3
chart.line([
4
{x: 0, value: 20},
5
{x: 1, value: 50},
6
{x: 2, value: 30},
7
{x: 3, value: 90},
8
{x: 4, value: 40}
9
]);
10
11
var crosshair = chart.crosshair();
12
crosshair.enabled(true);
13
14
// Set X-stroke settings.
15
crosshair.xStroke('#607D8B', 2, '8', 'round', 'round');
16
17
chart.title('Set X-stroke parameters');
18
chart.container('container');
19
chart.draw();
20
});