Subversion Repositories php-qbpwcf

Rev

Rev 23 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 liveuser 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
<html>
3
 
4
    <head>
5
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6
        <title>amCharts examples</title>
7
        <link rel="stylesheet" href="style.css" type="text/css">
8
        <script src="../amcharts/amcharts.js" type="text/javascript"></script>
9
        <script src="../amcharts/serial.js" type="text/javascript"></script>
10
        <script>
11
            var chart;
12
 
13
            var chartData = [
14
                {
15
                    "year": 2005,
16
                    "income": 23.5
17
                },
18
                {
19
                    "year": 2006,
20
                    "income": 26.2
21
                },
22
                {
23
                    "year": 2007,
24
                    "income": 30.1
25
                },
26
                {
27
                    "year": 2008,
28
                    "income": 29.5
29
                },
30
                {
31
                    "year": 2009,
32
                    "income": 24.6
33
                }
34
            ];
35
 
36
 
37
            AmCharts.ready(function () {
38
                // SERIAL CHART
39
                chart = new AmCharts.AmSerialChart();
40
                chart.dataProvider = chartData;
41
                chart.categoryField = "year";
42
                // this single line makes the chart a bar chart,
43
                // try to set it to false - your bars will turn to columns
44
                chart.rotate = true;
45
                // the following two lines makes chart 3D
46
                chart.depth3D = 20;
47
                chart.angle = 30;
48
 
49
                // AXES
50
                // Category
51
                var categoryAxis = chart.categoryAxis;
52
                categoryAxis.gridPosition = "start";
53
                categoryAxis.axisColor = "#DADADA";
54
                categoryAxis.fillAlpha = 1;
55
                categoryAxis.gridAlpha = 0;
56
                categoryAxis.fillColor = "#FAFAFA";
57
 
58
                // value
59
                var valueAxis = new AmCharts.ValueAxis();
60
                valueAxis.axisColor = "#DADADA";
61
                valueAxis.title = "Income in millions, USD";
62
                valueAxis.gridAlpha = 0.1;
63
                chart.addValueAxis(valueAxis);
64
 
65
                // GRAPH
66
                var graph = new AmCharts.AmGraph();
67
                graph.title = "Income";
68
                graph.valueField = "income";
69
                graph.type = "column";
70
                graph.balloonText = "Income in [[category]]:[[value]]";
71
                graph.lineAlpha = 0;
72
                graph.fillColors = "#bf1c25";
73
                graph.fillAlphas = 1;
74
                chart.addGraph(graph);
75
 
76
                chart.creditsPosition = "top-right";
77
 
78
                // WRITE
79
                chart.write("chartdiv");
80
            });
81
        </script>
82
    </head>
83
 
84
    <body>
85
        <div id="chartdiv" style="width: 500px; height: 600px;"></div>
86
    </body>
87
 
88
</html>