From 5bfac6fdc992c414b11f0e2d061572626750ebfb Mon Sep 17 00:00:00 2001 From: Fine Date: Thu, 3 Nov 2022 16:14:21 +0800 Subject: [PATCH] add legend in line/bar/area graphs --- src/types/dashboard.d.ts | 4 ++-- .../widget/graph-styles/components/Legend.vue | 9 -------- src/views/dashboard/graphs/Bar.vue | 14 ++++++++++-- src/views/dashboard/graphs/Line.vue | 22 ++++++++++++++----- .../dashboard/graphs/components/Legend.vue | 22 +++++++++++++++++-- 5 files changed, 50 insertions(+), 21 deletions(-) diff --git a/src/types/dashboard.d.ts b/src/types/dashboard.d.ts index 9ae422cd..ead63486 100644 --- a/src/types/dashboard.d.ts +++ b/src/types/dashboard.d.ts @@ -95,7 +95,7 @@ export type GraphConfig = export interface BarConfig { type?: string; showBackground?: boolean; - LegendOptions?: LegendOptions; + legend?: LegendOptions; } export interface LineConfig extends AreaConfig { type?: string; @@ -111,7 +111,7 @@ export interface LineConfig extends AreaConfig { export interface AreaConfig { type?: string; opacity?: number; - LegendOptions?: LegendOptions; + legend?: LegendOptions; } export interface CardConfig { diff --git a/src/views/dashboard/configuration/widget/graph-styles/components/Legend.vue b/src/views/dashboard/configuration/widget/graph-styles/components/Legend.vue index 71f33fac..f22f2ce6 100644 --- a/src/views/dashboard/configuration/widget/graph-styles/components/Legend.vue +++ b/src/views/dashboard/configuration/widget/graph-styles/components/Legend.vue @@ -13,15 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->