add legend component

This commit is contained in:
Fine
2022-11-07 16:23:36 +08:00
parent 5389d346c5
commit f0fcc63ff5
5 changed files with 18 additions and 8 deletions

View File

@@ -18,6 +18,9 @@ import { LegendOptions } from "@/types/dashboard";
export default function useLegendProcess() {
function showEchartsLegend(keys: string[], legend?: LegendOptions) {
if (legend && !legend.show === undefined) {
return legend.show;
}
if (keys.length === 1) {
return false;
}