perf: 词云优化

This commit is contained in:
奔跑的面条 2022-09-26 20:00:39 +08:00
parent f25217c394
commit 55d5f160a5
5 changed files with 13 additions and 5 deletions

View File

@ -1,5 +1,5 @@
import image from '@/assets/images/chart/informations/photo.png'
import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d'
import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d'
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
export const ImageConfig: ConfigType = {
@ -10,5 +10,6 @@ export const ImageConfig: ConfigType = {
category: ChatCategoryEnum.MORE,
categoryName: ChatCategoryEnumName.MORE,
package: PackagesCategoryEnum.INFORMATIONS,
chartFrame: ChartFrameEnum.COMMON,
image
}

View File

@ -70,9 +70,11 @@ const sliderFormatTooltip = (v: number) => {
const updateWidth = (value: number) => {
props.optionData.series[0].width = `${value}%`
}
const updateHeight = (value: number) => {
props.optionData.series[0].height = `${value}%`
}
const updateRotation = (value: number) => {
props.optionData.series[0].rotationStep = value
props.optionData.series[0].rotationRange = value === 0 ? [0, 0] : [-90, 90]

View File

@ -1,5 +1,5 @@
import image from '@/assets/images/chart/informations/words_cloud.png'
import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d'
import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d'
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
export const WordCloudConfig: ConfigType = {
@ -10,5 +10,6 @@ export const WordCloudConfig: ConfigType = {
category: ChatCategoryEnum.MORE,
categoryName: ChatCategoryEnumName.MORE,
package: PackagesCategoryEnum.INFORMATIONS,
chartFrame: ChartFrameEnum.COMMON,
image
}

View File

@ -21,7 +21,7 @@ import { mergeTheme } from '@/packages/public/chart'
import { useChartDataFetch } from '@/hooks'
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
import { isPreview } from '@/utils'
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent } from 'echarts/components'
import { GridComponent, TooltipComponent, LegendComponent } from 'echarts/components'
import dataJson from './data.json'
const props = defineProps({
@ -39,7 +39,7 @@ const props = defineProps({
}
})
use([DatasetComponent, CanvasRenderer, BarChart, GridComponent, TooltipComponent, LegendComponent])
use([CanvasRenderer, BarChart, GridComponent, TooltipComponent, LegendComponent])
const replaceMergeArr = ref<string[]>()

View File

@ -74,7 +74,8 @@ import {
radarUrl,
heatMapUrl,
scatterBasicUrl,
mapUrl
mapUrl,
wordCloudUrl
} from '@/api/mock'
const { HelpOutlineIcon } = icon.ionicons5
@ -119,6 +120,9 @@ const apiList = [
{
value: `【地图数据】${mapUrl}`
},
{
value: `【词云】${wordCloudUrl}`
},
]
</script>