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
// chart type
4
var chart = anychart.polar();
5
6
// chart title
7
chart.title("Polar Series Types");
8
9
// background fill
10
var background = chart.background();
11
background.enabled(true);
12
background.fill("#EEEEEE");
13
14
// scale settings
15
var xScale = chart.xScale();
16
xScale.maximum(100);
17
18
// set data and adjust visual settings
19
var area = chart.area([
20
{x: 0, value: 0},
21
{x: 50, value: 100},
22
{x: 100, value: 0}
23
]);
24
area.fill("red 0.7");
25
area.stroke("darkred");
26
27
var line = chart.line([
28
{x: 50, value: 0},
29
{x: 100, value: 100},
30
{x: 50, value: 0}
31
]);
32
line.stroke("lightblue");
33
34
var marker = chart.marker([
35
{x: 10, value: 20},
36
{x: 25, value: 100},
37
{x: 50, value: 40},
38
{x: 75, value: 100},
39
{x: 80, value: 45}
40
]);
41
marker.fill("lightgreen");
42
marker.stroke("green");
43
44
// grid settings
45
var grid = chart.grid(0);
46
grid.evenFill("white");
47
grid.oddFill("white");
48
49
chart.legend(false);
50
51
// draw chart
52
chart.container("container");
53
chart.draw();
54
});