mirror of
https://github.com/zaphar/Heracles.git
synced 2025-07-24 04:59:49 -04:00
fix: bug in scalar graph types
This commit is contained in:
parent
18eb50fbbd
commit
847413f4f5
@ -188,17 +188,22 @@ class TimeseriesGraph extends HTMLElement {
|
|||||||
type: "bar",
|
type: "bar",
|
||||||
x: [],
|
x: [],
|
||||||
y: [],
|
y: [],
|
||||||
yaxis: yaxis,
|
|
||||||
yhoverformat: meta["d3_tick_format"],
|
yhoverformat: meta["d3_tick_format"],
|
||||||
};
|
};
|
||||||
let nameLabel = meta["name_label"];
|
const formatter = meta.name_format;
|
||||||
if (nameLabel && labels[nameLabel]) {
|
var name = "";
|
||||||
trace.name = labels[nameLabel];
|
if (formatter) {
|
||||||
};
|
name = eval(formatter);
|
||||||
if (nameLabel && labels[nameLabel]) {
|
} else {
|
||||||
trace.x.push(labels[nameLabel]);
|
var names = [];
|
||||||
};
|
for (const value of labels) {
|
||||||
|
names.push(value);
|
||||||
|
}
|
||||||
|
name = names.join(" ");
|
||||||
|
}
|
||||||
|
if (name) { trace.name = name; }
|
||||||
trace.y.push(series.value);
|
trace.y.push(series.value);
|
||||||
|
trace.x.push(trace.name);
|
||||||
traces.push(trace);
|
traces.push(trace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user