HTMLcopy
1
<div id="container"></div>
CSScopy
8
1
html,
2
body,
3
#container {
4
width: 120%;
5
height: 100%;
6
margin: 0;
7
padding: 0;
8
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
// our data from bulbapedia
3
var data1 = [
4
{x: 'PPD-specific IgG', value: 2.726913064},
5
{x: 'PPD-specific IgM', value: 0.840975676},
6
{x: 'PPD-specific IgA', value: 1.841750787},
7
];
8
9
var data2 = [
10
{x: 'PPD-specific IgG', value: 0.934088131},
11
{x: 'PPD-specific IgM', value: 0.354770258},
12
{x: 'PPD-specific IgA', value: 0.267598541},
13
];
14
15
var data3 = [
16
17
];
18
19
// create radar chart
20
var chart = anychart.radar();
21
22
// set chart yScale settings
23
chart.yScale()
24
.minimum(0.01)
25
.maximum(5)
26
.ticks({'interval':1});
27
28
// configure the appearance of the y-axis
29
chart.yAxis().stroke({
30
color: "gray",
31
thickness: 1,
32
dash: "10 5"
33
});
34
35
// configure the appearance of the X-axis
36
chart.xAxis().stroke({
37
color: "#00cc99",
38
thickness: 2,
39
});
40
41
// color alternating cells
42
chart.yGrid().palette(['gray 0.01',0.01]);
43
44
// create first series (line) and set the data
45
chart.area(data1).name('ID MTBVAC').markers(true).fill('#E55934', 0.3).stroke('#E55934');
46
// create second series
47
chart.area(data2).name('ID BCG').markers(true).fill('#9BC53D', 0.3).stroke('#9BC53D');
48
49
// set chart title
50
chart.title('Fold Change WK20 post-vaccination')
51
// set legend
52
.legend(true);
53
// set container id for the chart
54
chart.container('container');
55
// initiate chart drawing
56
chart.draw();
57
});