|
|
@ -7,6 +7,7 @@ |
|
|
|
:update-options="{ |
|
|
|
replaceMerge: replaceMergeArr |
|
|
|
}" |
|
|
|
:key="key" |
|
|
|
autoresize |
|
|
|
></v-chart> |
|
|
|
</template> |
|
|
@ -45,8 +46,16 @@ use([DatasetComponent, CanvasRenderer, BarChart, GridComponent, TooltipComponent |
|
|
|
|
|
|
|
const replaceMergeArr = ref<string[]>() |
|
|
|
|
|
|
|
const dataset1 = ref() |
|
|
|
const dataset2 = ref(props.chartConfig.option) |
|
|
|
const key = ref(0) |
|
|
|
const option = computed(() => { |
|
|
|
return mergeTheme(props.chartConfig.option, props.themeSetting, includes) |
|
|
|
if(dataset1.value){ |
|
|
|
dataset2.value.dataset = dataset1.value |
|
|
|
} |
|
|
|
console.log(3444, mergeTheme(dataset2.value, props.themeSetting, includes)) |
|
|
|
key.value++ |
|
|
|
return mergeTheme(dataset2.value, props.themeSetting, includes) |
|
|
|
}) |
|
|
|
|
|
|
|
// dataset 无法变更条数的补丁 |
|
|
@ -74,6 +83,11 @@ watch( |
|
|
|
deep: false |
|
|
|
} |
|
|
|
) |
|
|
|
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore,(dataset,res)=>{ |
|
|
|
dataset1.value = { |
|
|
|
source : res.source, |
|
|
|
dimensions : res.dimensions, |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore) |
|
|
|
</script> |
|
|
|