summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/statistic/index.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'application/views/scripts/statistic/index.phtml')
-rw-r--r--application/views/scripts/statistic/index.phtml28
1 files changed, 19 insertions, 9 deletions
diff --git a/application/views/scripts/statistic/index.phtml b/application/views/scripts/statistic/index.phtml
index 17bcc15..511c364 100644
--- a/application/views/scripts/statistic/index.phtml
+++ b/application/views/scripts/statistic/index.phtml
@@ -30,29 +30,39 @@ function setPoolIDtmp() {
function plot() {
poolID = $("#poolselectbox option:selected").val();
$.get("/statistic/categorylist/poolID/" + poolID, function(data) {
- if(data == '') {
- $( "#noEventsDialog" ).dialog('open');
- $('#plot').empty();
- } else refreshPlot(data);
+ $.get("/statistic/colorlist/poolID/" + poolID, function(color) {
+ if(data == '') {
+ $( "#noEventsDialog" ).dialog('open');
+ $('#plot').empty();
+ } else refreshPlot(data);
+ }, "json");
}, "json");
}
-function refreshPlot(data) {
+function refreshPlot(data, color) {
$('#plot').empty();
$.jqplot('plot', data, {
seriesDefaults: {
- renderer:$.jqplot.BarRenderer,
- pointLabels: { show: true, location: 'e', edgeTolerance: -15 },
+ //renderer: $.jqplot.PieRenderer,
+ renderer: $.jqplot.BarRenderer,
+ pointLabels: { show: true, edgeTolerance: -15 },
shadowAngle: 135,
rendererOptions: {
- barDirection: 'horizontal'
+ //showDataLabels: true,
+ barDirection: 'horizontal',
+ varyBarColor : true
}
},
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer
+ },
+ xaxis: {
+ renderer: $.jqplot.CategoryAxisRenderer
}
- }
+ },
+ seriesColors: [ "green", "blue", "red", "yellow" ], //color,
+ highlighter: { show: false }
});
}