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 a stage
4
var stage = anychart.graphics.create("container");
5
6
// create data
7
var data = [
8
{x: 0, value: 500},
9
{x: 180, value: 200}
10
];
11
12
// set the position and data for the first chart
13
var polar1 = anychart.polar();
14
polar1.title("Start Angle: Default (0\xb0)");
15
polar1.bounds(0, 0, "50%", "100%");
16
// create a line series
17
polar1.line(data);
18
// set the maximum value of the x-scale
19
polar1.xScale().maximum(360);
20
// set the chart container
21
polar1.container(stage);
22
// initiate drawing the chart
23
polar1.draw();
24
25
// set the position and data for the second chart
26
var polar2 = anychart.polar();
27
polar2.title("Start Angle: 90\xb0");
28
polar2.bounds("50%", 0, "50%", "100%");
29
// create a line series
30
polar2.line(data);
31
// set the start angle
32
polar2.startAngle(90);
33
// set the maximum value of the x-scale
34
polar2.xScale().maximum(360);
35
// set the chart container
36
polar2.container(stage);
37
// initiate drawing the chart
38
polar2.draw();
39
});