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([5, 9, 2, 6]);
3
4
var rangeMarker = chart.rangeMarker();
5
rangeMarker.from(4);
6
rangeMarker.to(6);
7
8
// Set fill.
9
rangeMarker.fill(["#EAECC6", "#2BC0E4"], 90, true, 0.8);
10
11
chart.title("Set range marker fill parameter as a linear gradient");
12
chart.container("container");
13
chart.draw();
14
});