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
4
var series = chart.stepLine([
5
{x: "January", value: 125},
6
{x: "February", value: 132},
7
{x: "March", value: 141},
8
{x: "April", value: 158},
9
{x: "May", value: 133},
10
{x: "June", value: 143}
11
]);
12
13
// Set hover stroke.
14
series.hoverStroke(function () {
15
return "3 " + anychart.color.darken(this.sourceColor);
16
});
17
18
// Hovers series.
19
series.hover();
20
21
chart.title("Set hover stroke parameter as a function");
22
chart.container("container");
23
chart.draw();
24
});