Removed title and fixed optimizer
This commit is contained in:
parent
6c89ca79fe
commit
d9bb3c82f7
|
@ -41,15 +41,15 @@ export async function get(
|
||||||
).all();
|
).all();
|
||||||
res.writeHead(200);
|
res.writeHead(200);
|
||||||
if (graph.data.style === "line") {
|
if (graph.data.style === "line") {
|
||||||
if (data[0].length === 2) {
|
if (data[0].length === 2 && !Array.isArray(data[0][0])) {
|
||||||
res.end(
|
res.end(
|
||||||
JSON.stringify(
|
JSON.stringify(
|
||||||
data.filter((value, idx) => {
|
data.filter((value, idx) => {
|
||||||
return (
|
return (
|
||||||
idx === 0 ||
|
idx === 0 ||
|
||||||
idx === data.length - 1 ||
|
idx === data.length - 1 ||
|
||||||
data[idx - 1][1] !== value ||
|
data[idx - 1][1] !== value[1] ||
|
||||||
data[idx + 1][1] !== value
|
data[idx + 1][1] !== value[1]
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
|
@ -65,9 +65,6 @@
|
||||||
let c = document.querySelector("div#list");
|
let c = document.querySelector("div#list");
|
||||||
if (c && g) {
|
if (c && g) {
|
||||||
init(c as HTMLElement, "dark").setOption({
|
init(c as HTMLElement, "dark").setOption({
|
||||||
title: {
|
|
||||||
text: g.data.name
|
|
||||||
},
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
order: "valueDesc"
|
order: "valueDesc"
|
||||||
|
|
Loading…
Reference in New Issue