error in graph labels corrected

parent 003c73ad
......@@ -23,7 +23,13 @@
ticks = [],
counter = 1,
series = [],
options = {};
options = {},
key, data = {};
for (key in conf_data) {
if (conf_data.hasOwnProperty(key)) {
data[key] = [];
}
}
$.each(
output_data.elementList.sort(
function (a, b) {
......@@ -31,7 +37,7 @@
}
),
function (idx, obj) {
var reqKey, // ctrl_flag = false,
var reqKey,
request, i;
// if the obj is of the requested family
if (obj.family === config.family) {
......@@ -43,10 +49,7 @@
for (i = 0; i <= conf_data[reqKey].length-1; i += 1) {
request += getRequestedValue(obj, conf_data[reqKey][i]);
}
series.push({
label: reqKey,
data: [[counter, request]]
});
data[reqKey].push([counter, request]);
}
}
ticks.push([counter, obj.id]);
......@@ -63,6 +66,14 @@
);
if (config.plot === "bars") {
for (key in data) {
if (data.hasOwnProperty(key)) {
series.push({
label: key,
data: data[key]
});
}
}
options = {
xaxis: {
minTickSize: 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment