Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
9 lars 1
$(document).ready(function(){
2
 
3
    $.jqplot.config.enablePlugins = true;
4
 
5
    s1 = [['a',2], ['b',6], ['c',7], ['d',10]];
6
    s2 = [['a', 4], ['b', 7], ['c', 6], ['d', 3]];
7
    s3 = [['a', 2], ['b', 1], ['c', 3], ['d', 3]];
8
    s4 = [['a', 4], ['b', 3], ['c', 2], ['d', 1]];
9
 
10
    s5 = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
11
 
12
    plot1 = $.jqplot('chart1', [s1], {
13
        seriesDefaults:{
14
            renderer:$.jqplot.PieRenderer
15
        },
16
        legend: {show:true}
17
    });
18
 
19
    plot2 = $.jqplot('chart2', [s2], {
20
        seriesDefaults: {
21
            renderer:$.jqplot.PieRenderer,
22
            rendererOptions:{
23
                sliceMargin: 4,
24
                startAngle: -90
25
            }
26
        }
27
    });
28
 
29
    plot3 = $.jqplot('chart3', [s3], {
30
        captureRightClick: true,
31
        seriesDefaults:{
32
            renderer:$.jqplot.PieRenderer,
33
            shadow: false,
34
            rendererOptions:{
35
                startAngle: 90,
36
                sliceMargin: 4,
37
                highlightMouseDown: true
38
            }
39
        },
40
        legend: {
41
            show: true,
42
            location: 'e',
43
            placement: 'outside'
44
        }
45
    });
46
 
47
    plot5 = $.jqplot('chart5', [s5], {
48
        seriesDefaults:{
49
            renderer:$.jqplot.PieRenderer
50
        }
51
    });
52
 
53
    plot6 = $.jqplot('chart6', [[1,2,3,4]]);
54
 
55
    $('#chart1').bind('jqplotDataClick',
56
        function (ev, seriesIndex, pointIndex, data) {
57
            $('#info1').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
58
        }
59
    );
60
 
61
    $('#chart2').bind('jqplotDataHighlight',
62
        function (ev, seriesIndex, pointIndex, data) {
63
            $('#info2').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
64
        }
65
    );
66
 
67
    $('#chart2').bind('jqplotDataUnhighlight',
68
        function (ev) {
69
            $('#info2').html('Nothing');
70
        }
71
    );
72
 
73
    $('#chart3').bind('jqplotDataRightClick',
74
        function (ev, seriesIndex, pointIndex, data) {
75
            $('#info3').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
76
        }
77
    );
78
 
79
    $(document).unload(function() {$('*').unbind(); });
80
});