diff options
author | Sebastian Reichel <sre@ring0.de> | 2012-10-02 01:05:51 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2012-10-02 01:05:51 +0200 |
commit | 186049b3ed33f025eeb87eb34c19a28e1d5ba70a (patch) | |
tree | 5d892564001404fe979e18eac0e65dfcad65ed5e /templates/stats/profit_per_weekday.html | |
parent | 9713c98dbceb54d8d00c186ba8f41f3a5befcfd1 (diff) | |
download | serial-barcode-scanner-186049b3ed33f025eeb87eb34c19a28e1d5ba70a.tar.bz2 |
restructure code, switch from GTK to Web based UI
- move barcode generation scripts into generation/
- move code to src/
- remove database analysis from invoice/graph
- put database creation sql files into sql/
- remove glade builder file
- add new templates/ directory, which contains files
used by the Web-UI
Diffstat (limited to 'templates/stats/profit_per_weekday.html')
-rw-r--r-- | templates/stats/profit_per_weekday.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/templates/stats/profit_per_weekday.html b/templates/stats/profit_per_weekday.html new file mode 100644 index 0000000..d9f3e43 --- /dev/null +++ b/templates/stats/profit_per_weekday.html @@ -0,0 +1,30 @@ +<h1>Profit per Weekday (last 8 weeks, members only)</h1> +<div id="placeholder" style="width:800px;height:400px;float: left;"></div> + +<script type="text/javascript"> +$(function () { + var data = {{{DATA}}}; + + var options = { + legend: { + show: false + }, + series: { + pie: { + show: true, + label: { + show: true, + formatter: function(label, series) { + return "<div style=\"font-size:x-small;text-align:center;padding:2px;color:"+series.color+";\">"+label+"<br/>"+series.data[0][1]+"€ ("+Math.round(series.percent)+"%)</div>"; + } + } + } + } + } + + if (data.length > 0) + $.plot($("#placeholder"), data, options); + else + $.plot($("#placeholder"), [], options); +}); +</script> |