diff --git a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx index 5e3eb4d6a..802124baa 100644 --- a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx +++ b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx @@ -117,7 +117,7 @@ function WidgetChart(props: Props) { useEffect(() => { _metric.updateKey('page', 1); loadPage(); - }, [drillDownPeriod, period, depsString, metric.metricType, metric.metricOf, metric.viewType, metric.metricValue, metric.startType]); + }, [drillDownPeriod, period, depsString, metric.metricType, metric.metricOf, metric.viewType, metric.metricValue, metric.startType, metric.metricFormat]); useEffect(loadPage, [_metric.page]); diff --git a/frontend/app/components/Dashboard/components/WidgetOptions.tsx b/frontend/app/components/Dashboard/components/WidgetOptions.tsx new file mode 100644 index 000000000..9cd20e89c --- /dev/null +++ b/frontend/app/components/Dashboard/components/WidgetOptions.tsx @@ -0,0 +1,60 @@ +import React from 'react'; +import { HEATMAP, TABLE, USER_PATH } from 'App/constants/card'; +import { Select, Space, Switch } from 'antd'; +import { useStore } from 'App/mstore'; +import ClickMapRagePicker from 'Components/Dashboard/components/ClickMapRagePicker/ClickMapRagePicker'; +import { FilterKey } from 'Types/filter/filterType'; + +interface Props { + +} + + +function WidgetOptions(props: Props) { + const { metricStore, dashboardStore } = useStore(); + const metric: any = metricStore.instance; + + const handleChange = (value: any) => { + console.log(`selected ${value}`); + metric.update({ metricFormat: value }); + }; + + return ( +