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
4
var data = [
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 a chart
16
var chart = anychart.radar();
17
18
// create a line series and set the data
19
var series = chart.line(data);
20
21
// configure the appearance of the y-axis
22
chart.yAxis().stroke({
23
color: "gray",
24
thickness: 2,
25
dash: "10 5"
26
});
27
28
// configure the appearance of the x-axis
29
chart.xAxis().stroke({
30
color: "#00cc99",
31
thickness: 4,
32
});
33
34
// invert the y-scale
35
chart.yScale().inverted(true);
36
37
// set the chart title
38
chart.title("Radar Plot: Axes and Scales");
39
40
// set the container id
41
chart.container("container");
42
43
// initiate drawing the chart
44
chart.draw();
45
});