Code

share/collection.js: Fix a typo.
authorFlorian Forster <octo@noris.net>
Wed, 22 Dec 2010 17:05:50 +0000 (18:05 +0100)
committerFlorian Forster <octo@noris.net>
Wed, 22 Dec 2010 17:05:50 +0000 (18:05 +0100)
share/collection.js

index c7200868b0417c56165d485d94f192181ea2d268..6aff20fb41d4883b00d366b5de64574a89bd005e 100644 (file)
@@ -218,7 +218,6 @@ function def_draw_one (def, data, chart_opts) /* {{{ */
   var chart_series = new Object ();
 
   chart_series.type = 'line';
-  chart_series.name = def.legend || def.data_source;
   chart_series.pointInterval = data.interval * 1000;
   chart_series.pointStart = data.first_value_time * 1000;
   chart_series.data = data.data;
@@ -226,6 +225,11 @@ function def_draw_one (def, data, chart_opts) /* {{{ */
   chart_series.shadow = false;
   chart_series.marker = { enabled: false };
 
+  if (def.legend)
+    chart_series.name = def.legend;
+  else if (def.ds_name)
+    chart_series.name = def.ds_name;
+
   if (def.area)
     chart_series.type = 'area';