diff --git a/src/hooks/useChartCommonData.hook.ts b/src/hooks/useChartCommonData.hook.ts index 4b6df83c..d0e75d09 100644 --- a/src/hooks/useChartCommonData.hook.ts +++ b/src/hooks/useChartCommonData.hook.ts @@ -35,6 +35,7 @@ export const useChartCommonData = ( // if (vChartRef.value) { // setOption(vChartRef.value, { dataset: dataset }) // } + if(!dataset.dimensions) return if(targetComponent.option){ let seriesItem = cloneDeep(targetComponent.option.series[0]) let series = [] @@ -105,7 +106,7 @@ export const useChartCommonData = ( if (res) { try { const { data } = res - echartsUpdateHandle(data.length ? data[0] : { dimensions: [], source: [] }) + if(data.length) echartsUpdateHandle(data[0]) } catch (error) { console.error(error) } diff --git a/src/views/chart/ContentConfigurations/components/ChartDataV2/components/ChartDataPointHistory.vue b/src/views/chart/ContentConfigurations/components/ChartDataV2/components/ChartDataPointHistory.vue index 422476ae..6d0a1991 100644 --- a/src/views/chart/ContentConfigurations/components/ChartDataV2/components/ChartDataPointHistory.vue +++ b/src/views/chart/ContentConfigurations/components/ChartDataV2/components/ChartDataPointHistory.vue @@ -3,14 +3,14 @@ - + - + - + @@ -28,7 +28,14 @@ - + + + + + + @@ -49,7 +56,7 @@