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
chart.line([
4
{x: 0, value: 1},
5
{x: 1, value: -4},
6
{x: 2, value: 5},
7
{x: 3, value: 7},
8
{x: 4, value: 3},
9
{x: 5, value: 8},
10
{x: 6, value: 5}
11
]);
12
13
// Sets line marker by index.
14
chart.lineMarker(0, {value: 4, stroke: '#F44336', axis: chart.xAxis()});
15
16
chart.title('Set chart line marker parameters as object by index');
17
chart.container('container');
18
chart.draw();
19
});