fix: 动态series 刷新动画改为合并动画

This commit is contained in:
huanghao1412 2024-01-25 20:37:03 +08:00
parent 0de080e710
commit 33215bec1a
10 changed files with 12 additions and 10 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View File

@ -8,7 +8,7 @@
placeholder="px"
>
<template #prefix>
<n-text depth="3"></n-text>
<n-text depth="3"></n-text>
</template>
</n-input-number>
<n-input-number
@ -19,7 +19,7 @@
placeholder="px"
>
<template #prefix>
<n-text depth="3"></n-text>
<n-text depth="3"></n-text>
</template>
</n-input-number>
</setting-item-box>

View File

@ -57,7 +57,11 @@ export const useChartCommonData = (
series = [seriesItem]
}
if (vChartRef.value) {
setOption(vChartRef.value, { series, dataset: dataset })
Object.assign(targetComponent.option, {
series,
dataset,
})
setOption(vChartRef.value, { series, dataset })
}
}
else if(SingleDataArr.some(_ => _ === currentSource)) { // 单个值的处理

View File

@ -10,5 +10,5 @@ export const PieCommonConfig: ConfigType = {
categoryName: ChatCategoryEnumName.PIE,
package: PackagesCategoryEnum.CHARTS,
chartFrame: ChartFrameEnum.ECHARTS,
image: 'pie.png'
image: 'PieCommon.png'
}

View File

@ -10,5 +10,5 @@ export const PieCommon1Config: ConfigType = {
categoryName: ChatCategoryEnumName.PIE,
package: PackagesCategoryEnum.CHARTS,
chartFrame: ChartFrameEnum.ECHARTS,
image: 'pie.png'
image: 'PieCommon1.png'
}

View File

@ -10,5 +10,5 @@ export const PieCommon2Config: ConfigType = {
categoryName: ChatCategoryEnumName.PIE,
package: PackagesCategoryEnum.CHARTS,
chartFrame: ChartFrameEnum.ECHARTS,
image: 'pie.png'
image: 'PieCommon2.png'
}

View File

@ -44,7 +44,5 @@ export const setOption = <T extends typeof VChart | undefined, D>(instance: T, d
if (!instance) return
const option = instance.getOption()
option.dataset = null
instance.setOption(data, {
replaceMerge: ['series'],
})
instance.setOption(data)
}

View File

@ -38,7 +38,7 @@
</n-space>
</n-space>
</setting-item-box>
<setting-item-box name="测点数量" :alone="true">
<setting-item-box name="类目数量" :alone="true">
<n-input-number
v-model:value="pointRealTime.limit"
min="1"