summaryrefslogtreecommitdiff
path: root/jrrd.js
diff options
context:
space:
mode:
authorRichard Wall <richard@aziz>2010-04-20 01:07:46 +0100
committerRichard Wall <richard@aziz>2010-04-20 01:07:46 +0100
commit5f10a21baf8889294d457481a56f3bfcd31d4f60 (patch)
treed7f12d482048c08b318d1f91cac91695486e6dd2 /jrrd.js
parentc417d77a4ad5f057b61c70ce78dd94ed53df6ebf (diff)
Add more DNS stats and experiment with a different legend position.
Diffstat (limited to 'jrrd.js')
-rw-r--r--jrrd.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/jrrd.js b/jrrd.js
index 3f9070a..62ebce6 100644
--- a/jrrd.js
+++ b/jrrd.js
@@ -257,8 +257,8 @@ jrrd.Chart = function(template, options) {
// Listen for clicks on the legend items - onclick enable / disable the
// corresponding data source.
- $('.legend tr', this.template[0]).live('click', function(e) {
- self.switchDataEnabled($(this).children('.legendLabel').text());
+ $('.legend .legendLabel', this.template[0]).live('click', function(e) {
+ self.switchDataEnabled($(this).text());
self.draw();
});
@@ -402,7 +402,9 @@ jrrd.Chart.prototype.draw = function() {
unit = '';
for(i=0; i<data.length; i++) {
label = self.data[i][0];
- data[i].label = label;
+ if(label) {
+ data[i].label = label;
+ }
if(typeof data[i].unit != 'undefined') {
// Just use the last unit for now
unit = data[i].unit;