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: 2, value: 5},
5
{x: 2, value: 25},
6
{x: 4, value: 40},
7
{x: 6, value: 25},
8
{x: 6, value: 5},
9
{x: 2, value: 5},
10
{x: 2, value: 25},
11
{x: 6, value: 25}
12
]);
13
14
// Set chart credits settings.
15
// You can't customize credits without a license key. See https://www.anychart.com/buy/ to learn more.
16
chart.credits({text: 'Changed credits', url: 'https://www.anychart.com/buy/'});
17
18
chart.title('Set chart credits parameter as an object');
19
chart.xGrid(true).yGrid(true);
20
chart.container('container');
21
chart.draw();
22
});