|
|
@ -7,7 +7,6 @@ |
|
|
|
:update-options="{ |
|
|
|
replaceMerge: replaceMergeArr |
|
|
|
}" |
|
|
|
:key="key" |
|
|
|
autoresize |
|
|
|
></v-chart> |
|
|
|
</template> |
|
|
@ -46,17 +45,9 @@ 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 = ref() |
|
|
|
// const option = computed(() => { |
|
|
|
// if(dataset1.value){ |
|
|
|
// dataset2.value.dataset = dataset1.value |
|
|
|
// } |
|
|
|
// key.value++ |
|
|
|
// return mergeTheme(dataset2.value, props.themeSetting, includes) |
|
|
|
// }) |
|
|
|
const option = computed(() => { |
|
|
|
return mergeTheme(props.chartConfig.option, props.themeSetting, includes) |
|
|
|
}) |
|
|
|
|
|
|
|
// dataset 无法变更条数的补丁 |
|
|
|
watch( |
|
|
@ -83,14 +74,6 @@ watch( |
|
|
|
deep: false |
|
|
|
} |
|
|
|
) |
|
|
|
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore,(dataset,res)=>{ |
|
|
|
dataset1.value = { |
|
|
|
source : res.source, |
|
|
|
dimensions : res.dimensions, |
|
|
|
} |
|
|
|
dataset2.value.dataset = dataset1.value |
|
|
|
option.value = mergeTheme(dataset2.value, props.themeSetting, includes) |
|
|
|
key.value++ |
|
|
|
}) |
|
|
|
|
|
|
|
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore) |
|
|
|
</script> |
|
|
|