source: trunk/LATMOS-Accounts-Web/root/html/summary/accage/index.tt @ 1485

Last change on this file since 1485 was 1485, checked in by nanardon, 9 years ago

Add account per contract graph

File size: 2.1 KB
Line 
1
2<script>
3$(document).ready(function(){
4    $.jqplot.config.enablePlugins = true;
5    $.ajax({
6      // have to use synchronous here, else the function
7      // will return before the data is fetched
8      async: false,
9      url: "[% jsonurl %]",
10      dataType:"json",
11      success: function(data) {
12          var plot2 = $.jqplot('charth', data.data,
13            {
14                title: 'Expiration des comptes utilisateurs',
15                stackSeries: true,
16                axes: {
17                    xaxis: {
18                        renderer: $.jqplot.DateAxisRenderer,
19                        rendererOptions:{
20                            tickRenderer:$.jqplot.CanvasAxisTickRenderer,
21                            stackedValue: true,
22                            tickInset: 0,
23                        },
24                        tickOptions: {
25                            formatString:'%Y',
26                            fontSize:'10pt',
27                            fontFamily:'Tahoma',
28                            angle:-40
29                        },
30                        tickInterval:'1 year',
31                    }
32                },
33                seriesDefaults: {
34                    renderer: $.jqplot.BarRenderer,
35                    lineWidth: 2,
36                    pointLabels: {show: true},
37                    rendererOptions: {
38                        padding: 1,
39                        sliceMargin: 2,
40                        showDataLabels: true,
41                        smooth: true,
42                        barPadding: 8,
43                    },
44                    //markerOptions:{style:'square'}
45                },
46                legend:{
47                    renderer: $.jqplot.EnhancedLegendRenderer,
48                    placement: 'outside',
49                    show: true
50                },
51                cursor:{
52                    zoom:true,
53                    tooltipLocation:'sw',
54                    looseZoom: true
55                },
56                series: data.series,
57            }
58          );
59        }
60    });
61});
62</script>
63
64
65<div id="charth" style="width:80%; height:600px; clear: both"></div>
Note: See TracBrowser for help on using the repository browser.