summaryrefslogtreecommitdiff
path: root/ebus/webapp/static/ebus.js
diff options
context:
space:
mode:
authormarc <marc@thinkpad.localnet.cc>2011-07-21 21:58:19 +0200
committermarc <you@example.com>2011-07-21 22:00:04 +0200
commitb6538e5d0f9b5fa58f8d94b33d8b7912471c0102 (patch)
treedbe79b5016d774678420ab809c14581dca136810 /ebus/webapp/static/ebus.js
parent02cab0b768b01a6c7b4c8b57362e992d1078c644 (diff)
downloadebus-alt-b6538e5d0f9b5fa58f8d94b33d8b7912471c0102.tar.gz
ebus-alt-b6538e5d0f9b5fa58f8d94b33d8b7912471c0102.zip
ausblenden von datensätzen
Diffstat (limited to 'ebus/webapp/static/ebus.js')
-rw-r--r--ebus/webapp/static/ebus.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/ebus/webapp/static/ebus.js b/ebus/webapp/static/ebus.js
index 32e9f3a..b334144 100644
--- a/ebus/webapp/static/ebus.js
+++ b/ebus/webapp/static/ebus.js
@@ -32,8 +32,9 @@ $(document).ready(function(){
shadowSize: 0
},
xaxis: { mode: "time" },
- yaxis: { ticks: [], min: 0, autoscaleMargin: 0.1 },
- selection: { mode: "x" }
+ yaxis: { ticks: [], min: 0, max: 100, autoscaleMargin: 0.1 },
+ legend: { show: false },
+ selection: { mode: "x" }
});
} else {
plotOverview.setData(datasetOverview);
@@ -64,13 +65,12 @@ $(document).ready(function(){
var unplotSensorDetail = function(sensorname) {
$.each(datasetDetail, function(i, sensor) {
- alert(datasetDetail[i].label);
if (sensor.label == sensorname) {
- indexFound = i;
+ datasetDetail.splice(i,1);
+ replot();
+ return false;
}
});
- datasetDetail.splice(indexFound,1);
- replot();
};
var plotSensorOverview = function(sensorname) {
@@ -78,7 +78,7 @@ $(document).ready(function(){
function(response) {
if (response['data']) {
datasetOverview.push({'data':response['data'],
- 'label':null});
+ 'label':sensorname});
replotOverview();
} else {
alert("Overview Fehler: " + response["error"]);
@@ -88,12 +88,12 @@ $(document).ready(function(){
};
var unplotSensorOverview = function(sensorname) {
$.each(datasetOverview, function(i, sensor) {
- if (datasetOverview[i].label == sensorname) {
- indexFound = i;
+ if (sensor.label == sensorname) {
+ datasetOverview.splice(i,1);
+ replotOverview();
+ return false;
}
});
- datasetOverview.splice(indexFound,1);
- replotOverview();
}
$("#overview").bind("plotselected", function (event, ranges) {