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("Tuning Axes Visualization");
8
9
// disable minor ticks
10
var yAxis = chart.yAxis();
11
yAxis.enabled(true);
12
yAxis.minorTicks(false);
13
14
var xAxis = chart.xAxis();
15
xAxis.stroke({
16
// set colors position
17
keys: [".2 red", ".4 darkred", "0.6 blue", "0.8 green"],
18
// set angle of colors drawing
19
angle: -25,
20
// set thickness
21
thickness: 4
22
});
23
24
yAxis.stroke({
25
// makes stroke dashed
26
dash: "7 3",
27
// set stroke thickness
28
thickness: 2,
29
// set stroke color
30
color: "#9900FF"
31
});
32
33
// set data and type of series
34
var series = chart.line([
35
{x: "Administration", value:22},
36
{x: "Sales", value:34},
37
{x: "Marketing", value:16},
38
{x: "Research", value:12},
39
{x: "Support", value:38},
40
{x: "Development", value:47}
41
]);
42
43
series.name("Distribution");
44
45
// draw chart
46
chart.container("container");
47
chart.draw();
48
});