mirror of
https://gitee.com/dromara/go-view.git
synced 2026-02-10 00:03:02 +08:00
Compare commits
7 Commits
fix/vchart
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa76f63760 | ||
|
|
34b808aebd | ||
|
|
c42c644567 | ||
|
|
99d1215654 | ||
|
|
a6ff024bf8 | ||
|
|
bbbf9691f3 | ||
|
|
85c0a08969 |
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -56,7 +56,7 @@ export const option = {
|
||||
mapOptions: {
|
||||
pitch: 60,
|
||||
skyColor: '#53A9DE',
|
||||
amapKey: 'd5f3e16589dbecae64d05fe90e2ba4f2',
|
||||
amapKey: '',
|
||||
amapStyleKey: ThemeEnum.DARK,
|
||||
amapStyleKeyCustom: '',
|
||||
amapLon: 116.397428,
|
||||
|
||||
@@ -61,7 +61,7 @@ const option = {
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '40',
|
||||
fontSize: 40,
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user