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/xy.js" type="text/javascript"></script>
10
 
11
        <script>
12
            var chart;
13
 
14
            var chartData = [
15
                {
16
                    "x": 10,
17
                    "y": 14,
18
                    "value": 59
19
                },
20
                {
21
                    "x": 5,
22
                    "y": 3,
23
                    "value": 50
24
                },
25
                {
26
                    "x": -10,
27
                    "y": -3,
28
                    "value": 19
29
                },
30
                {
31
                    "x": -6,
32
                    "y": 5,
33
                    "value": 65
34
                },
35
                {
36
                    "x": 15,
37
                    "y": -4,
38
                    "value": 92
39
                },
40
                {
41
                    "x": 13,
42
                    "y": 1,
43
                    "value": 8
44
                },
45
                {
46
                    "x": 1,
47
                    "y": 6,
48
                    "value": 35
49
                }
50
            ];
51
 
52
            AmCharts.ready(function () {
53
                // XY Chart
54
                chart = new AmCharts.AmXYChart();
55
                chart.dataProvider = chartData;
56
                chart.startDuration = 1.5;
57
 
58
                // AXES
59
                // X
60
                var xAxis = new AmCharts.ValueAxis();
61
                xAxis.title = "X Axis";
62
                xAxis.position = "bottom";
63
                xAxis.autoGridCount = true;
64
                chart.addValueAxis(xAxis);
65
 
66
                // Y
67
                var yAxis = new AmCharts.ValueAxis();
68
                yAxis.title = "Y Axis";
69
                yAxis.position = "left";
70
                yAxis.autoGridCount = true;
71
                chart.addValueAxis(yAxis);
72
 
73
                // GRAPH
74
                var graph = new AmCharts.AmGraph();
75
                graph.valueField = "value"; // valueField responsible for the size of a bullet
76
                graph.xField = "x";
77
                graph.yField = "y";
78
                graph.lineAlpha = 0;
79
                graph.bullet = "bubble";
80
                graph.balloonText = "x:<b>[[x]]</b> y:<b>[[y]]</b><br>value:<b>[[value]]</b>"
81
                chart.addGraph(graph);
82
 
83
                // WRITE
84
                chart.write("chartdiv");
85
            });
86
        </script>
87
    </head>
88
 
89
    <body>
90
        <div id="chartdiv" style="width: 600px; height: 400px;"></div>
91
    </body>
92
 
93
</html>