mirror of
https://gitee.com/dromara/go-view.git
synced 2025-10-13 22:12:11 +08:00
fix: 动态series 刷新动画改为合并动画
This commit is contained in:
parent
0de080e710
commit
33215bec1a
BIN
src/assets/images/chart/charts/PieCommon.png
Normal file
BIN
src/assets/images/chart/charts/PieCommon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
BIN
src/assets/images/chart/charts/PieCommon2.png
Normal file
BIN
src/assets/images/chart/charts/PieCommon2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
@ -8,7 +8,7 @@
|
|||||||
placeholder="px"
|
placeholder="px"
|
||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<n-text depth="3">宽度</n-text>
|
<n-text depth="3">宽</n-text>
|
||||||
</template>
|
</template>
|
||||||
</n-input-number>
|
</n-input-number>
|
||||||
<n-input-number
|
<n-input-number
|
||||||
@ -19,7 +19,7 @@
|
|||||||
placeholder="px"
|
placeholder="px"
|
||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<n-text depth="3">高度</n-text>
|
<n-text depth="3">高</n-text>
|
||||||
</template>
|
</template>
|
||||||
</n-input-number>
|
</n-input-number>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
|
@ -57,7 +57,11 @@ export const useChartCommonData = (
|
|||||||
series = [seriesItem]
|
series = [seriesItem]
|
||||||
}
|
}
|
||||||
if (vChartRef.value) {
|
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)) { // 单个值的处理
|
else if(SingleDataArr.some(_ => _ === currentSource)) { // 单个值的处理
|
||||||
|
@ -10,5 +10,5 @@ export const PieCommonConfig: ConfigType = {
|
|||||||
categoryName: ChatCategoryEnumName.PIE,
|
categoryName: ChatCategoryEnumName.PIE,
|
||||||
package: PackagesCategoryEnum.CHARTS,
|
package: PackagesCategoryEnum.CHARTS,
|
||||||
chartFrame: ChartFrameEnum.ECHARTS,
|
chartFrame: ChartFrameEnum.ECHARTS,
|
||||||
image: 'pie.png'
|
image: 'PieCommon.png'
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,5 @@ export const PieCommon1Config: ConfigType = {
|
|||||||
categoryName: ChatCategoryEnumName.PIE,
|
categoryName: ChatCategoryEnumName.PIE,
|
||||||
package: PackagesCategoryEnum.CHARTS,
|
package: PackagesCategoryEnum.CHARTS,
|
||||||
chartFrame: ChartFrameEnum.ECHARTS,
|
chartFrame: ChartFrameEnum.ECHARTS,
|
||||||
image: 'pie.png'
|
image: 'PieCommon1.png'
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,5 @@ export const PieCommon2Config: ConfigType = {
|
|||||||
categoryName: ChatCategoryEnumName.PIE,
|
categoryName: ChatCategoryEnumName.PIE,
|
||||||
package: PackagesCategoryEnum.CHARTS,
|
package: PackagesCategoryEnum.CHARTS,
|
||||||
chartFrame: ChartFrameEnum.ECHARTS,
|
chartFrame: ChartFrameEnum.ECHARTS,
|
||||||
image: 'pie.png'
|
image: 'PieCommon2.png'
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,5 @@ export const setOption = <T extends typeof VChart | undefined, D>(instance: T, d
|
|||||||
if (!instance) return
|
if (!instance) return
|
||||||
const option = instance.getOption()
|
const option = instance.getOption()
|
||||||
option.dataset = null
|
option.dataset = null
|
||||||
instance.setOption(data, {
|
instance.setOption(data)
|
||||||
replaceMerge: ['series'],
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
</n-space>
|
</n-space>
|
||||||
</n-space>
|
</n-space>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
<setting-item-box name="测点数量" :alone="true">
|
<setting-item-box name="类目数量" :alone="true">
|
||||||
<n-input-number
|
<n-input-number
|
||||||
v-model:value="pointRealTime.limit"
|
v-model:value="pointRealTime.limit"
|
||||||
min="1"
|
min="1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user