From: Florian Forster Date: Wed, 22 Dec 2010 17:05:50 +0000 (+0100) Subject: share/collection.js: Fix a typo. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a5ffcea3f2edf3bce54d3e7b8863a8287366b686;p=collection4.git share/collection.js: Fix a typo. --- diff --git a/share/collection.js b/share/collection.js index c720086..6aff20f 100644 --- a/share/collection.js +++ b/share/collection.js @@ -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';