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: 4, value: 42},
6
{x: 13, value: 59},
7
{x: 25, value: 68},
8
{x: 25, value: 63},
9
{x: 44, value: 54},
10
{x: 55, value: 58},
11
{x: 56, value: 46},
12
{x: 60, value: 54},
13
{x: 72, value: 73}
14
];
15
16
// create a chart
17
var chart = anychart.quadrant(data);
18
19
// configure quarters
20
chart.quarters(
21
{
22
rightTop: {
23
title: {
24
text: "Right Top",
25
fontColor: "#fa8072",
26
fontSize: "24",
27
fontWeight: "bold"
28
}
29
},
30
rightBottom: {
31
title: {
32
text: "Right Bottom",
33
fontColor: "#72fa80",
34
fontSize: "24",
35
fontWeight: "bold"
36
}
37
},
38
leftTop: {
39
title: {
40
text: "Left Top",
41
fontColor: "#72fa80",
42
fontSize: "24",
43
fontWeight: "bold"
44
}
45
},
46
leftBottom: {
47
title: {
48
fontColor: "#fa8072",
49
text: "Left Bottom",
50
fontSize: "24",
51
fontWeight: "bold"
52
}
53
},
54
}
55
);
56
57
// set the chart title
58
chart.title("Quadrant Chart: Quarters (Titles)");
59
60
// set the container id
61
chart.container("container");
62
63
// initiate drawing the chart
64
chart.draw();
65
});