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.sparkline([5, 50, -10, 60, -20, 70]);
3
4
// Generally speaking such construction is useless, but it may be used to turn zero line in a chart in the most compact way.
5
// To enable/disable lineMarkers it is recommended to create them by index ( like chart.lineMarker(0); ) and then use enabled(true|false) method:
6
// marker = chart.lineMarker(0);
7
// marker.enabled(true);
8
chart.lineMarker(true);
9
10
chart.title({text: 'Enable chart line marker', orientation: 'top'});
11
chart.container('container');
12
chart.draw();
13
});