You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

56 lines
1.2 KiB

::use 'admin/design.mtt'::
<h3>::key::</h3>
<p>
Du ::hDate(from):: au ::hDate(to)::<br/>
Total : <b>::total::</b><br/>
Moyenne : <b>::averageValue::</b>
</p>
<p>
<script type="text/javascript" src="/js/rgraph/RGraph.common.core.js" ></script>
<script type="text/javascript" src="/js/rgraph/RGraph.bar.js" ></script>
<canvas id="graph" width="900" height="150">[No canvas support]</canvas>
<script>
window.onload = function ()
{
var datas = [];
var labels = [];
::foreach d data::
datas.push(::d.value::);
labels.push( '::d.date.toString().substr(0,10)::' );
::end::
var bar = new RGraph.Bar('graph', datas);
bar.Set('chart.labels', labels);
bar.Set('chart.colors', ['#CC0']);
bar.Set('chart.title', '::key::');
bar.Set('chart.labels.above', true);
bar.Set('chart.background.barcolor1', 'white');
bar.Set('chart.background.barcolor2', 'white');
bar.Set('chart.background.grid', true);
bar.Set('chart.gutter.left', 60);
bar.Set('chart.gutter.bottom', 40);
bar.Set('chart.text.angle', 45);
bar.Draw();
}
</script>
</p>
<p>
<table class="table table-bordered table-striped">
::foreach d data::
<tr>
<td>::hDate(d.date)::</td>
<td>::d.value::</td>
</tr>
::end::
</table>
</p>
::end::