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 for the first series
4
var data_1 = [
5
{x: 0, value: 500},
6
{x: 180, value: 200}
7
];
8
9
// create data for the second series
10
var data_2 = [
11
{x: 0, value: 0},
12
{x: 180, value: 200}
13
];
14
15
// create a chart
16
var chart = anychart.polar();
17
18
// create the first series (line) and set the data
19
var series1 = chart.line(data_1);
20
21
// create the second series (marker) and set the data
22
var series2 = chart.area(data_2);
23
24
// set the maximum value of the x-scale
25
chart.xScale().maximum(360);
26
27
// set the chart title
28
chart.title("Polar Plot: Basic Sample");
29
30
// set the container id
31
chart.container("container");
32
33
// initiate drawing the chart
34
chart.draw();
35
});