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 stroke of the x-grid
16
chart.xGrid().stroke({
17
color: "green",
18
thickness: 0.5,
19
opacity: 0.5
20
});
21
22
// configure the stroke of the circular grid
23
chart.yGrid().stroke({
24
color: "green",
25
thickness: 0.5,
26
opacity: 0.5,
27
dash: "10 5"
28
});
29
30
// set the maximum value of the x-scale
31
chart.xScale().maximum(360);
32
33
// set the chart title
34
chart.title("Polar Plot: Grid Stroke");
35
36
// set the container id
37
chart.container("container");
38
39
// initiate drawing the chart
40
chart.draw();
41
});