Compare commits

...

7 Commits

Author SHA1 Message Date
奔跑的面条
fa76f63760 feat: 去除过期的key 2025-09-28 17:09:24 +08:00
奔跑的面条
34b808aebd fix: 处理胶囊柱图无数据不会更新图表的问题 2025-09-06 13:49:37 +08:00
奔跑的面条
c42c644567 fix: 解决折线图使用接口会一起被修改的 bug 2025-07-28 10:34:07 +08:00
奔跑的面条
99d1215654 !267 fix: 饼图控制台异常
Merge pull request !267 from 杨运交/dev
2025-07-02 06:32:17 +00:00
zk_wpw
a6ff024bf8 fix: 饼图控制台异常 2025-07-01 09:44:06 +08:00
奔跑的面条
bbbf9691f3 feat: 先隐藏饼图的动画配置 2025-06-17 14:36:50 +08:00
奔跑的面条
85c0a08969 !266 fix: 去除vchart标签描边
Merge pull request !266 from Skie Chen/fix/vchart-label
2025-06-17 03:21:28 +00:00
5 changed files with 15 additions and 9 deletions

View File

@@ -124,7 +124,14 @@ const calcData = (data: any, type?: string) => {
const calcCapsuleLengthAndLabelData = (dataset: any) => {
try {
const { source } = dataset
if (!source || !source.length) return
if (!source) return
if (source.length === 0) {
// 清空数据
state.capsuleLength = []
state.labelData = []
return
}
state.capsuleItemHeight = numberSizeHandle(state.mergedConfig.itemHeight)
const capsuleValue = source.map((item: DataProps) => item[state.mergedConfig.dataset.dimensions[1]])
@@ -140,9 +147,8 @@ const calcCapsuleLengthAndLabelData = (dataset: any) => {
const labelData = Array.from(new Set(new Array(6).fill(0).map((v, i) => Math.ceil(i * oneFifth))))
state.labelData = labelData
} catch (error) {
console.warn(error);
console.warn(error)
}
}

View File

@@ -23,9 +23,9 @@ import config, { includes, seriesItem } from './config'
import { mergeTheme } from '@/packages/public/chart'
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
import { useChartDataFetch } from '@/hooks'
import { isPreview } from '@/utils'
import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent } from 'echarts/components'
import isObject from 'lodash/isObject'
import { cloneDeep } from 'lodash'
const props = defineProps({
themeSetting: {
@@ -61,7 +61,7 @@ watch(
if (Array.isArray(newData?.dimensions)) {
const seriesArr = []
for (let i = 0; i < newData.dimensions.length - 1; i++) {
seriesArr.push(seriesItem)
seriesArr.push(cloneDeep(seriesItem))
}
replaceMergeArr.value = ['series']
props.chartConfig.option.series = seriesArr

View File

@@ -56,7 +56,7 @@ export const option = {
mapOptions: {
pitch: 60,
skyColor: '#53A9DE',
amapKey: 'd5f3e16589dbecae64d05fe90e2ba4f2',
amapKey: '',
amapStyleKey: ThemeEnum.DARK,
amapStyleKeyCustom: '',
amapLon: 116.397428,

View File

@@ -61,7 +61,7 @@ const option = {
emphasis: {
label: {
show: true,
fontSize: '40',
fontSize: 40,
fontWeight: 'bold'
}
},

View File

@@ -3,14 +3,14 @@
<VChartGlobalSetting :optionData="optionData"></VChartGlobalSetting>
<!-- 饼图配制 -->
<CollapseItem name="饼图" expanded>
<SettingItemBox name="动画">
<!-- <SettingItemBox name="动画">
<SettingItem>
<n-space>
<n-switch v-model:value="animationRef" size="small" @update:value="animationHandle"></n-switch>
<n-text>开启动画</n-text>
</n-space>
</SettingItem>
</SettingItemBox>
</SettingItemBox> -->
<SettingItemBox name="图形">
<setting-item name="内圈范围">
<n-input-number v-model:value="optionData.innerRadius" :step="0.1" :min="0" size="small"></n-input-number>