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 scales
20
chart.yScale().minimum(-100);
21
chart.yScale().maximum(100);
22
chart.xScale().minimum(-100);
23
chart.xScale().maximum(100);
24
25
// configure axes
26
chart.xAxis(0, {ticks: true, labels: true});
27
chart.xAxis(1, {ticks: true, labels: true});
28
chart.yAxis(0, {ticks: true, labels: true});
29
chart.yAxis(1, {ticks: true, labels: true});
30
31
// set the chart title
32
chart.title("Quadrant Chart: Axes");
33
34
// set the container id
35
chart.container("container");
36
37
// initiate drawing the chart
38
chart.draw();
39
});