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
// chart type
4
var chart = anychart.radar();
5
6
// chart title
7
chart.title("Radar Series Types");
8
9
// background fill
10
var background = chart.background();
11
background.enabled(true);
12
background.fill("#EEEEEE");
13
14
// set data and adjust visual settings
15
var area = chart.area([
16
{x: "Product A", value: 722},
17
{x: "Product B", value: 1431},
18
{x: "Product C", value: 1624},
19
{x: "Product D", value: 1243},
20
{x: "Product E", value: 1813},
21
{x: "Product F", value: 1321},
22
{x: "Product G", value: 567},
23
{x: "Product H", value: 1876},
24
{x: "Product I", value: 1187}
25
]);
26
area.name("Sales 2005");
27
28
var line = chart.line([
29
{x: "Product A", value: 1222},
30
{x: "Product B", value: 2431},
31
{x: "Product C", value: 3624},
32
{x: "Product D", value: 5243},
33
{x: "Product E", value: 6813},
34
{x: "Product F", value: 5321},
35
{x: "Product G", value: 1567},
36
{x: "Product H", value: 3876},
37
{x: "Product I", value: 2187}
38
]);
39
line.name("Sales 2006");
40
41
var marker = chart.marker([
42
{x: "Product A", value: 1422},
43
{x: "Product B", value: 2231},
44
{x: "Product C", value: 3124},
45
{x: "Product D", value: 5543},
46
{x: "Product E", value: 6113},
47
{x: "Product F", value: 5521},
48
{x: "Product G", value: 567},
49
{x: "Product H", value: 3176},
50
{x: "Product I", value: 3187}
51
]);
52
marker.name("Sales 2007");
53
54
// grid settings
55
var grid = chart.grid(0);
56
grid.evenFill("white");
57
grid.oddFill("white");
58
59
// draw chart
60
chart.container("container");
61
chart.draw();
62
});