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: "organisasi", value: 3.5},
6
{x: "kepanitiaan", value: 2},
7
{x: "magang", value: 2.1},
8
{x: "lomba", value: 1},
9
{x: "penelitian", value: 0},
10
{x: "konferensi", value: 0},
11
{x: "volunteering", value: 0}
12
];
13
14
// create a chart
15
var chart = anychart.radar();
16
17
// create a line series and set the data
18
var series = chart.line(data);
19
20
// configure the appearance of the y-axis
21
chart.yAxis().stroke({
22
color: "black",
23
thickness: 0.5,
24
opacity: 0.5,
25
dash: "10 5"
26
});
27
28
// configure the appearance of the x-axis
29
chart.xAxis().stroke({
30
color: "black",
31
thickness: 1,
32
opacity: 0.5
33
});
34
35
// configure the stroke of the y-grid
36
chart.xGrid().stroke({
37
color: "black",
38
thickness: 0.3,
39
opacity: 0.15,
40
dash: "10 5"
41
});
42
43
// configure the stroke of the x-grid
44
chart.yGrid().stroke({
45
color: "black",
46
thickness: 0.3,
47
opacity: 0.15
48
});
49
50
// set the chart title
51
chart.title("modus <3 - hitam");
52
53
// set the container id
54
chart.container("container");
55
56
// initiate drawing the chart
57
chart.draw();
58
});