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
3
// create data for the first series
4
var data_1 = [
5
{x: "A", value: 1222},
6
{x: "B", value: 2431},
7
{x: "C", value: 3624},
8
{x: "D", value: 5243},
9
{x: "E", value: 6813},
10
{x: "F", value: 5321},
11
{x: "G", value: 1567},
12
{x: "H", value: 3876}
13
];
14
15
// create data for the second series
16
var data_2 = [
17
{x: "A", value: 722},
18
{x: "B", value: 1431},
19
{x: "C", value: 1624},
20
{x: "D", value: 1243},
21
{x: "E", value: 1813},
22
{x: "F", value: 1321},
23
{x: "G", value: 567},
24
{x: "H", value: 1876}
25
];
26
27
// create a chart
28
var chart = anychart.radar();
29
30
// create the first series (line) and set the data
31
var series1 = chart.line(data_1);
32
33
// create the second series (area) and set the data
34
var series2 = chart.area(data_2);
35
36
// set the chart title
37
chart.title("Radar Plot: Basic Sample");
38
39
// set the container id
40
chart.container("container");
41
42
// initiate drawing the chart
43
chart.draw();
44
});