luci-app-statistics: fix datasource selection in graph rendering
[project/luci.git] / applications / luci-app-statistics / htdocs / luci-static / resources / statistics / rrdtool.js
index c99d1e683849d8523ae926b0feed8d1a863870b8..fb3eeebd9ba47f7f0ca3697b129894ff842146f3 100644 (file)
@@ -568,7 +568,7 @@ return L.Class.extend({
                                                noarea: dopts.noarea || false,
                                                title: dopts.title || null,
                                                weight: dopts.weight || (dopts.negweight ? -+data_instances[j] : null) || (dopts.posweight ? +data_instances[j] : null) || null,
-                                               ds: data_sources[j],
+                                               ds: data_sources[k],
                                                type: data_types[i],
                                                instance: data_instances[j],
                                                index: _sources.length + 1,