From d256ec6ba098cef253038c61f530c588aa8c4df8 Mon Sep 17 00:00:00 2001 From: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Date: Sun, 16 Jan 2022 14:21:47 +0200 Subject: [PATCH] chore(plugin-chart-echarts): add types to controls (#18059) --- .../plugin-chart-echarts/src/controls.tsx | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx index 614a0481e1951..5f8ebeaa271c1 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx +++ b/superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx @@ -20,6 +20,7 @@ import React from 'react'; import { t } from '@superset-ui/core'; import { ControlPanelsContainerProps, + ControlSetItem, ControlSetRow, sharedControls, } from '@superset-ui/chart-controls'; @@ -29,7 +30,7 @@ import { DEFAULT_FORM_DATA } from './Timeseries/types'; const { legendMargin, legendOrientation, legendType, showLegend } = DEFAULT_LEGEND_FORM_DATA; -const showLegendControl = { +const showLegendControl: ControlSetItem = { name: 'show_legend', config: { type: 'CheckboxControl', @@ -40,7 +41,7 @@ const showLegendControl = { }, }; -const legendMarginControl = { +const legendMarginControl: ControlSetItem = { name: 'legendMargin', config: { type: 'TextControl', @@ -54,7 +55,7 @@ const legendMarginControl = { }, }; -const legendTypeControl = { +const legendTypeControl: ControlSetItem = { name: 'legendType', config: { type: 'SelectControl', @@ -72,7 +73,7 @@ const legendTypeControl = { }, }; -const legendOrientationControl = { +const legendOrientationControl: ControlSetItem = { name: 'legendOrientation', config: { type: 'SelectControl', @@ -92,7 +93,7 @@ const legendOrientationControl = { }, }; -export const legendSection = [ +export const legendSection: ControlSetRow[] = [ [