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: 0, value: 500},
6
{x: 180, value: 200}
7
];
8
9
// create a chart
10
var chart = anychart.polar();
11
12
// create a line series and set the data
13
var series = chart.line(data);
14
15
// configure the appearance of the y-axis
16
chart.yAxis().stroke({
17
color: "gray",
18
thickness: 2,
19
dash: "10 5"
20
});
21
22
// configure the appearance of the x-axis
23
chart.xAxis().stroke({
24
color: "#00cc99",
25
thickness: 4,
26
});
27
28
// set the maximum value of the x-scale
29
chart.xScale().maximum(360);
30
31
// set the chart title
32
chart.title("Polar Plot: Axes");
33
34
// set the container id
35
chart.container("container");
36
37
// initiate drawing the chart
38
chart.draw();
39
});