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
fill: "#ccfff2",
24
corners: 30,
25
cornerType: "cut"
26
},
27
rightBottom: {
28
fill: "#e6f9ff",
29
corners: 30,
30
cornerType: "cut"
31
},
32
leftTop: {
33
fill: "#fff9e6",
34
corners: 30,
35
cornerType: "cut"
36
},
37
leftBottom: {
38
fill: "#f9e6ff",
39
corners: 30,
40
cornerType: "cut"
41
},
42
}
43
);
44
45
// set the chart title
46
chart.title("Quadrant Chart: Quarters (Appearance)");
47
48
// set the container id
49
chart.container("container");
50
51
// initiate drawing the chart
52
chart.draw();
53
});