Added legend and fixed tooltip

This commit is contained in:
2021-07-19 02:34:55 +01:00
parent 3ca44334f6
commit c55f3d7bd9

View File

@@ -69,7 +69,11 @@
text: g.data.name
},
tooltip: {
trigger: "axis"
trigger: "axis",
order: "valueDesc"
},
legend: {
show: data[0].length !== 2 || !Array.isArray(data[0][0])
},
xAxis: g.data.x_axis || {
name: "Date & time",
@@ -79,7 +83,7 @@
type: "value"
},
series:
data[0].length === 2
data[0].length === 2 && !Array.isArray(data[0][0])
? [
{
name: g.data.name,