01.
<script>
02.
var
chart = AmCharts.makeChart(
"chartdiv"
, {
03.
"theme"
:
"light"
,
04.
"type"
:
"serial"
,
05.
"startDuration"
: 2,
06.
"dataProvider"
: [{
07.
"country"
: <?=json_encode($lebels[0])?>,
08.
"visits"
: <?=json_encode($data[0], JSON_NUMERIC_CHECK);?>,
09.
"color"
:
"#FF0F00"
10.
}, {
11.
"country"
: <?=json_encode($lebels[1])?>,
12.
"visits"
: <?=json_encode($data[1], JSON_NUMERIC_CHECK);?>,
13.
"color"
:
"#FF6600"
14.
}, {
15.
"country"
: <?=json_encode($lebels[2])?>,
16.
"visits"
: <?=json_encode($data[2], JSON_NUMERIC_CHECK);?>,
17.
"color"
:
"#FF9E01"
18.
}, {
19.
"country"
: <?=json_encode($lebels[3])?>,
20.
"visits"
: <?=json_encode($data[3], JSON_NUMERIC_CHECK);?>,
21.
"color"
:
"#FCD202"
22.
}, {
23.
"country"
: <?=json_encode($lebels[4])?>,
24.
"visits"
: <?=json_encode($data[4], JSON_NUMERIC_CHECK);?>,
25.
"color"
:
"#F8FF01"
26.
}, {
27.
"country"
: <?=json_encode($lebels[5])?>,
28.
"visits"
: <?=json_encode($data[5], JSON_NUMERIC_CHECK);?>,
29.
"color"
:
"#B0DE09"
30.
}, {
31.
"country"
: <?=json_encode($lebels[6])?>,
32.
"visits"
: <?=json_encode($data[6], JSON_NUMERIC_CHECK);?>,
33.
"color"
:
"#04D215"
34.
}, {
35.
"country"
: <?=json_encode($lebels[7])?>,
36.
"visits"
: <?=json_encode($data[7], JSON_NUMERIC_CHECK);?>,
37.
"color"
:
"#0D8ECF"
38.
}, {
39.
"country"
: <?=json_encode($lebels[8])?>,
40.
"visits"
: <?=json_encode($data[8], JSON_NUMERIC_CHECK);?>,
41.
"color"
:
"#0D52D1"
42.
}, {
43.
"country"
: <?=json_encode($lebels[9])?>,
44.
"visits"
: <?=json_encode($data[9], JSON_NUMERIC_CHECK);?>,
45.
"color"
:
"#2A0CD0"
46.
}, {
47.
"country"
: <?=json_encode($lebels[10])?>,
48.
"visits"
: <?=json_encode($data[10], JSON_NUMERIC_CHECK);?>,
49.
"color"
:
"#8A0CCF"
50.
}],
51.
"valueAxes"
: [{
52.
"position"
:
"left"
,
53.
"axisAlpha"
:0,
54.
"gridAlpha"
:0
55.
}],
56.
"graphs"
: [{
57.
"balloonText"
:
"[[category]]: <b>[[value]]</b>"
,
58.
"colorField"
:
"color"
,
59.
"fillAlphas"
: 0.85,
60.
"lineAlpha"
: 0.1,
61.
"type"
:
"column"
,
62.
"topRadius"
:1,
63.
"valueField"
:
"visits"
64.
}],
65.
"depth3D"
: 40,
66.
"angle"
: 30,
67.
"chartCursor"
: {
68.
"categoryBalloonEnabled"
:
false
,
69.
"cursorAlpha"
: 0,
70.
"zoomable"
:
false
71.
},
72.
"categoryField"
:
"country"
,
73.
"categoryAxis"
: {
74.
"gridPosition"
:
"start"
,
75.
"axisAlpha"
:0,
76.
"gridAlpha"
:0
77.
78.
},
79.
"export"
: {
80.
"enabled"
:
true
81.
}
82.
83.
}, 0);
84.
</script>
85.
<!-- Chart code -->