fix:当使用动态数据时,option 的格式不满足 echarts 的数据格式会报错,修改 filter 也没用

This commit is contained in:
刘彪 2022-11-18 15:39:53 +08:00
parent 2a4a179550
commit cf179f116d

View File

@ -44,8 +44,11 @@ const props = defineProps({
use([DatasetComponent, CanvasRenderer, LineChart, GridComponent, TooltipComponent, LegendComponent])
const replaceMergeArr = ref<string[]>()
// 使option echarts filter
const option = computed(() => {
if(!('dimensions' in props.chartConfig.option.dataset)) {
return window['$message'].error('数据格式不正确!')
}
return mergeTheme(props.chartConfig.option, props.themeSetting, includes)
})