mirror of
https://gitee.com/dromara/go-view.git
synced 2025-06-30 00:29:16 +08:00
Merge branch 'dev'
This commit is contained in:
commit
76100a4d22
@ -21,7 +21,7 @@
|
|||||||
"@types/crypto-js": "^4.1.1",
|
"@types/crypto-js": "^4.1.1",
|
||||||
"@types/keymaster": "^1.6.30",
|
"@types/keymaster": "^1.6.30",
|
||||||
"@types/lodash": "^4.14.184",
|
"@types/lodash": "^4.14.184",
|
||||||
"@visactor/vchart": "^1.12.12",
|
"@visactor/vchart": "^2.0.0",
|
||||||
"@visactor/vchart-theme": "^1.12.2",
|
"@visactor/vchart-theme": "^1.12.2",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
@ -77,7 +77,7 @@
|
|||||||
"mockjs": "^1.1.0",
|
"mockjs": "^1.1.0",
|
||||||
"plop": "^3.0.5",
|
"plop": "^3.0.5",
|
||||||
"prettier": "^2.6.2",
|
"prettier": "^2.6.2",
|
||||||
"sass": "~1.49.11",
|
"sass": "1.49.11",
|
||||||
"sass-loader": "^12.6.0",
|
"sass-loader": "^12.6.0",
|
||||||
"typescript": "4.6.3",
|
"typescript": "4.6.3",
|
||||||
"vite": "4.3.6",
|
"vite": "4.3.6",
|
||||||
|
1985
pnpm-lock.yaml
generated
1985
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
BIN
src/assets/images/chart/vchart/vchart_bar_y.png
Normal file
BIN
src/assets/images/chart/vchart/vchart_bar_y.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 144 KiB |
@ -197,7 +197,7 @@ const createOrUpdateChart = (
|
|||||||
}
|
}
|
||||||
) => {
|
) => {
|
||||||
if (vChartRef.value && !chart) {
|
if (vChartRef.value && !chart) {
|
||||||
const spec = transformHandler[chartProps.category](chartProps)
|
const spec = transformHandler[chartProps.category || '']?.(chartProps)
|
||||||
chart = new VChart(
|
chart = new VChart(
|
||||||
{ ...spec, data: chartProps.dataset },
|
{ ...spec, data: chartProps.dataset },
|
||||||
{
|
{
|
||||||
@ -208,8 +208,12 @@ const createOrUpdateChart = (
|
|||||||
chart.renderSync()
|
chart.renderSync()
|
||||||
return true
|
return true
|
||||||
} else if (chart) {
|
} else if (chart) {
|
||||||
const spec = transformHandler[chartProps.category](chartProps)
|
const spec = transformHandler[chartProps.category || '']?.(chartProps)
|
||||||
chart.updateSpec({ ...spec, data: toRaw(chartProps.dataset), dataset: undefined })
|
chart.updateSpec({ ...spec, data: toRaw(chartProps.dataset), dataset: undefined }, false, undefined, {
|
||||||
|
change: false,
|
||||||
|
reMake: true,
|
||||||
|
reAnimate: true
|
||||||
|
})
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { cloneDeep } from "lodash"
|
import { cloneDeep } from 'lodash'
|
||||||
|
|
||||||
export default (chartProps: any) => {
|
export default (chartProps: any) => {
|
||||||
const spec = cloneDeep(chartProps)
|
const spec = cloneDeep(chartProps)
|
||||||
@ -18,17 +18,28 @@ export default (chartProps: any) => {
|
|||||||
// axis
|
// axis
|
||||||
const { name: xAxisName, ...restXAxisProps } = chartProps.xAxis
|
const { name: xAxisName, ...restXAxisProps } = chartProps.xAxis
|
||||||
const { name: yAxisName, ...restYAxisProps } = chartProps.yAxis
|
const { name: yAxisName, ...restYAxisProps } = chartProps.yAxis
|
||||||
spec.axes = [{
|
spec.axes = [
|
||||||
|
{
|
||||||
orient: 'bottom',
|
orient: 'bottom',
|
||||||
...restXAxisProps,
|
...restXAxisProps
|
||||||
// paddingInner: 0.5
|
// paddingInner: 0.5
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
orient: 'left',
|
orient: 'left',
|
||||||
...restYAxisProps
|
...restYAxisProps
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
|
|
||||||
delete spec.xAxis
|
delete spec.xAxis
|
||||||
delete spec.yAxis
|
delete spec.yAxis
|
||||||
|
|
||||||
|
spec.label = {
|
||||||
|
...spec.label,
|
||||||
|
style: {
|
||||||
|
...spec.label?.style,
|
||||||
|
lineWidth: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
// console.log('spec-bar-transform', spec)
|
// console.log('spec-bar-transform', spec)
|
||||||
return spec
|
return spec
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
import { cloneDeep } from "lodash"
|
import { cloneDeep } from 'lodash'
|
||||||
|
|
||||||
export default (chartProps: any) => {
|
export default (chartProps: any) => {
|
||||||
const spec = cloneDeep(chartProps)
|
const spec = cloneDeep(chartProps)
|
||||||
@ -18,15 +18,26 @@ export default (chartProps: any) => {
|
|||||||
// axis
|
// axis
|
||||||
const { name: xAxisName, ...restXAxisProps } = chartProps.xAxis
|
const { name: xAxisName, ...restXAxisProps } = chartProps.xAxis
|
||||||
const { name: yAxisName, ...restYAxisProps } = chartProps.yAxis
|
const { name: yAxisName, ...restYAxisProps } = chartProps.yAxis
|
||||||
spec.axes = [{
|
spec.axes = [
|
||||||
|
{
|
||||||
orient: 'bottom',
|
orient: 'bottom',
|
||||||
...restXAxisProps
|
...restXAxisProps
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
orient: 'left',
|
orient: 'left',
|
||||||
...restYAxisProps
|
...restYAxisProps
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
delete spec.xAxis
|
delete spec.xAxis
|
||||||
delete spec.yAxis
|
delete spec.yAxis
|
||||||
|
|
||||||
|
spec.label = {
|
||||||
|
...spec.label,
|
||||||
|
style: {
|
||||||
|
...spec.label?.style,
|
||||||
|
lineWidth: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
// console.log('spec-line-transform', spec)
|
// console.log('spec-line-transform', spec)
|
||||||
return spec
|
return spec
|
||||||
}
|
}
|
@ -1,15 +1,10 @@
|
|||||||
import { Datum } from "@visactor/vchart/esm/typings"
|
import { Datum } from '@visactor/vchart/esm/typings'
|
||||||
import { cloneDeep } from "lodash"
|
import { cloneDeep } from 'lodash'
|
||||||
const INNER_RADIUS = 0.75
|
|
||||||
const OUTER_RADIUS = 0.68
|
|
||||||
|
|
||||||
export default (chartProps: any) => {
|
export default (chartProps: any) => {
|
||||||
const spec = cloneDeep(chartProps)
|
const spec = cloneDeep(chartProps)
|
||||||
delete spec.category
|
delete spec.category
|
||||||
|
|
||||||
spec.innerRadius = INNER_RADIUS
|
|
||||||
spec.outerRadius = OUTER_RADIUS
|
|
||||||
|
|
||||||
// tooltip
|
// tooltip
|
||||||
const keyFill = spec.tooltip.style.keyLabel.fill
|
const keyFill = spec.tooltip.style.keyLabel.fill
|
||||||
const valueFill = spec.tooltip.style.valueLabel.fill
|
const valueFill = spec.tooltip.style.valueLabel.fill
|
||||||
@ -21,6 +16,7 @@ export default (chartProps: any) => {
|
|||||||
spec.tooltip.style.valueLabel.fontColor = valueFill
|
spec.tooltip.style.valueLabel.fontColor = valueFill
|
||||||
spec.tooltip.style.titleLabel.fontColor = titleFill
|
spec.tooltip.style.titleLabel.fontColor = titleFill
|
||||||
|
|
||||||
|
if (spec.extensionMark) {
|
||||||
// extensionMark
|
// extensionMark
|
||||||
spec.extensionMark = [
|
spec.extensionMark = [
|
||||||
{
|
{
|
||||||
@ -30,29 +26,27 @@ export default (chartProps: any) => {
|
|||||||
style: {
|
style: {
|
||||||
interactive: false,
|
interactive: false,
|
||||||
startAngle: (datum: Datum) => {
|
startAngle: (datum: Datum) => {
|
||||||
console.log('startAngle', datum)
|
return datum['__VCHART_ARC_START_ANGLE']
|
||||||
return datum['__VCHART_ARC_START_ANGLE'];
|
|
||||||
},
|
},
|
||||||
endAngle: (datum: Datum) => {
|
endAngle: (datum: Datum) => {
|
||||||
return datum['__VCHART_ARC_END_ANGLE'];
|
return datum['__VCHART_ARC_END_ANGLE']
|
||||||
},
|
},
|
||||||
innerRadius: (datum: Datum, context: any) => {
|
innerRadius: (datum: Datum, context: any) => {
|
||||||
return context.getLayoutRadius() * spec.innerRadius - 30;
|
return context.getLayoutRadius() * spec.innerRadius - 30
|
||||||
},
|
},
|
||||||
outerRadius: (datum: Datum, context: any) => {
|
outerRadius: (datum: Datum, context: any) => {
|
||||||
return context.getLayoutRadius() * spec.innerRadius;
|
return context.getLayoutRadius() * spec.innerRadius
|
||||||
},
|
},
|
||||||
fillOpacity: 0.3,
|
fillOpacity: 0.3,
|
||||||
fill: (datum: Datum, context: any) => {
|
fill: (datum: Datum, context: any) => {
|
||||||
console.log('context', context.seriesColor(datum[spec.seriesField]))
|
return context.seriesColor(datum[spec.seriesField])
|
||||||
return context.seriesColor(datum[spec.seriesField]);
|
|
||||||
},
|
},
|
||||||
visible: true,
|
visible: true,
|
||||||
x: (datum: Datum, context: any) => {
|
x: (datum: Datum, context: any) => {
|
||||||
return context.getCenter().x();
|
return context.getCenter().x()
|
||||||
},
|
},
|
||||||
y: (datum: Datum, context: any) => {
|
y: (datum: Datum, context: any) => {
|
||||||
return context.getCenter().y();
|
return context.getCenter().y()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -63,7 +57,7 @@ export default (chartProps: any) => {
|
|||||||
style: {
|
style: {
|
||||||
interactive: false,
|
interactive: false,
|
||||||
size: (datum: Datum, context: any) => {
|
size: (datum: Datum, context: any) => {
|
||||||
return context.getLayoutRadius() * 2 * spec.innerRadius - 100;
|
return context.getLayoutRadius() * 2 * spec.innerRadius - 100
|
||||||
},
|
},
|
||||||
fillOpacity: 0,
|
fillOpacity: 0,
|
||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
@ -87,10 +81,10 @@ export default (chartProps: any) => {
|
|||||||
},
|
},
|
||||||
visible: true,
|
visible: true,
|
||||||
x: (datum: Datum, context: any) => {
|
x: (datum: Datum, context: any) => {
|
||||||
return context.getCenter().x();
|
return context.getCenter().x()
|
||||||
},
|
},
|
||||||
y: (datum: Datum, context: any) => {
|
y: (datum: Datum, context: any) => {
|
||||||
return context.getCenter().y();
|
return context.getCenter().y()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -101,7 +95,7 @@ export default (chartProps: any) => {
|
|||||||
style: {
|
style: {
|
||||||
interactive: false,
|
interactive: false,
|
||||||
size: (datum: Datum, context: any) => {
|
size: (datum: Datum, context: any) => {
|
||||||
return context.getLayoutRadius() * 2 * spec.outerRadius + 50;
|
return context.getLayoutRadius() * 2 * spec.outerRadius + 50
|
||||||
},
|
},
|
||||||
fillOpacity: 0,
|
fillOpacity: 0,
|
||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
@ -125,15 +119,14 @@ export default (chartProps: any) => {
|
|||||||
},
|
},
|
||||||
visible: true,
|
visible: true,
|
||||||
x: (datum: Datum, context: any) => {
|
x: (datum: Datum, context: any) => {
|
||||||
return context.getCenter().x();
|
return context.getCenter().x()
|
||||||
},
|
},
|
||||||
y: (datum: Datum, context: any) => {
|
y: (datum: Datum, context: any) => {
|
||||||
return context.getCenter().y();
|
return context.getCenter().y()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
// console.log('spec-pie-transform', spec)
|
|
||||||
return spec
|
return spec
|
||||||
}
|
}
|
@ -1,18 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<collapse-item v-model:name="axis.name">
|
<collapse-item :name="axis.name">
|
||||||
<template #header>
|
<template #header>
|
||||||
<n-switch v-model:value="axis.visible" size="small"></n-switch>
|
<n-switch v-model:value="axis.visible" size="small"></n-switch>
|
||||||
</template>
|
</template>
|
||||||
<setting-item-box name="轴标签">
|
<setting-item-box name="单位">
|
||||||
<setting-item name="可见性">
|
<setting-item name="可见性">
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="axis.unit.visible" size="small"></n-switch>
|
||||||
|
</n-space>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="内容">
|
||||||
|
<n-input v-model:value="axis.unit.text" size="small"></n-input>
|
||||||
|
</setting-item>
|
||||||
|
<FontStyle :style="toRefs(axis.unit.style)"></FontStyle>
|
||||||
|
</setting-item-box>
|
||||||
|
<setting-item-box name="轴标签">
|
||||||
|
<setting-item v-if="axis.label" name="可见性">
|
||||||
<n-space>
|
<n-space>
|
||||||
<n-switch v-model:value="axis.label.visible" size="small"></n-switch>
|
<n-switch v-model:value="axis.label.visible" size="small"></n-switch>
|
||||||
</n-space>
|
</n-space>
|
||||||
</setting-item>
|
</setting-item>
|
||||||
<setting-item name="角度">
|
<setting-item v-if="axis.label" name="角度">
|
||||||
<n-input-number v-model:value="axis.label.style.angle" :min="0" :max="360" size="small" />
|
<n-input-number v-model:value="axis.label.style.angle" :min="0" :max="360" size="small" />
|
||||||
</setting-item>
|
</setting-item>
|
||||||
<FontStyle :style="axis.label.style"></FontStyle>
|
<FontStyle v-if="axis.label" :style="toRefs(axis.label.style)"></FontStyle>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
<setting-item-box name="轴标题">
|
<setting-item-box name="轴标题">
|
||||||
<setting-item name="可见性">
|
<setting-item name="可见性">
|
||||||
@ -20,10 +31,16 @@
|
|||||||
<n-switch v-model:value="axis.title.visible" size="small"></n-switch>
|
<n-switch v-model:value="axis.title.visible" size="small"></n-switch>
|
||||||
</n-space>
|
</n-space>
|
||||||
</setting-item>
|
</setting-item>
|
||||||
<setting-item name="标题内容">
|
<setting-item name="内容">
|
||||||
<n-input v-model:value="axis.title.style.text" size="small"></n-input>
|
<n-input v-model:value="axis.title.style.text" size="small"></n-input>
|
||||||
</setting-item>
|
</setting-item>
|
||||||
<FontStyle :style="axis.title.style"></FontStyle>
|
<setting-item name="位置">
|
||||||
|
<n-select v-model:value="axis.title.position" :options="legendsConfig.position" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="角度">
|
||||||
|
<n-input-number v-model:value="axis.title.angle" :min="0" :max="360" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
<FontStyle :style="toRefs(axis.title.style)"></FontStyle>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
<setting-item-box name="轴线">
|
<setting-item-box name="轴线">
|
||||||
<setting-item name="可见性">
|
<setting-item name="可见性">
|
||||||
@ -45,7 +62,11 @@
|
|||||||
<n-switch v-model:value="axis.grid.visible" size="small"></n-switch>
|
<n-switch v-model:value="axis.grid.visible" size="small"></n-switch>
|
||||||
</n-space>
|
</n-space>
|
||||||
</setting-item>
|
</setting-item>
|
||||||
<setting-item name=""> </setting-item>
|
<setting-item name="开启虚线">
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="isLineDashRef" size="small" @update:value="changeLineDash"></n-switch>
|
||||||
|
</n-space>
|
||||||
|
</setting-item>
|
||||||
<setting-item name="粗细">
|
<setting-item name="粗细">
|
||||||
<n-input-number v-model:value="axis.grid.style.lineWidth" :min="0" size="small" />
|
<n-input-number v-model:value="axis.grid.style.lineWidth" :min="0" size="small" />
|
||||||
</setting-item>
|
</setting-item>
|
||||||
@ -57,15 +78,33 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PropType } from 'vue'
|
import { PropType, ref, toRefs } from 'vue'
|
||||||
import FontStyle from './common/FontStyle.vue'
|
import FontStyle from './common/FontStyle.vue'
|
||||||
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||||
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||||
|
import { legendsConfig } from '@/packages/chartConfiguration/vcharts/index'
|
||||||
|
|
||||||
defineProps({
|
const props = defineProps({
|
||||||
axis: {
|
axis: {
|
||||||
type: Object as PropType<vChartGlobalThemeJsonType>,
|
type: Object as PropType<vChartGlobalThemeJsonType>,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 判断是否是虚线
|
||||||
|
const isDash = (data: undefined | Array<number>) => {
|
||||||
|
if (!data || data.length === 0 || data[0] === 0) return false
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// 虚线
|
||||||
|
const isLineDashRef = ref(isDash(props.axis.grid.style.lineDash))
|
||||||
|
|
||||||
|
const changeLineDash = (data: boolean) => {
|
||||||
|
if (data) {
|
||||||
|
props.axis.grid.style.lineDash = [4, 4] // 设置为虚线
|
||||||
|
} else {
|
||||||
|
props.axis.grid.style.lineDash = [0] // 设置为实线
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
52
src/components/Pages/VChartItemSetting/Bar.vue
Normal file
52
src/components/Pages/VChartItemSetting/Bar.vue
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<template>
|
||||||
|
<template v-if="optionData.bar">
|
||||||
|
<collapse-item name="柱体">
|
||||||
|
<SettingItemBox name="样式">
|
||||||
|
<setting-item v-if="'width' in optionData.bar.style" name="宽度">
|
||||||
|
<n-input-number v-model:value="optionData.bar.style.width" size="small" :min="1"></n-input-number>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item v-if="'height' in (optionData.bar.style as any)" name="高度">
|
||||||
|
<n-input-number v-model:value="(optionData.bar.style as any).height" size="small" :min="1"></n-input-number>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="圆角大小">
|
||||||
|
<n-input-number v-model:value="optionData.bar.style.cornerRadius" size="small" :min="0"></n-input-number>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="填充透明度">
|
||||||
|
<n-input-number
|
||||||
|
v-model:value="optionData.bar.style.fillOpacity"
|
||||||
|
:step="0.1"
|
||||||
|
size="small"
|
||||||
|
:min="0"
|
||||||
|
:max="1"
|
||||||
|
></n-input-number>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="整体透明度">
|
||||||
|
<n-input-number
|
||||||
|
v-model:value="optionData.bar.style.opacity"
|
||||||
|
:step="0.1"
|
||||||
|
size="small"
|
||||||
|
:min="0"
|
||||||
|
:max="1"
|
||||||
|
></n-input-number>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="纹理类型">
|
||||||
|
<n-select v-model:value="optionData.bar.style.texture" :options="styleConfig.texture" size="small"></n-select>
|
||||||
|
</setting-item>
|
||||||
|
</SettingItemBox>
|
||||||
|
</collapse-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { PropType } from 'vue'
|
||||||
|
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||||
|
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||||
|
import { styleConfig } from '@/packages/chartConfiguration/vcharts/index'
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
optionData: {
|
||||||
|
type: Object as PropType<vChartGlobalThemeJsonType>,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
46
src/components/Pages/VChartItemSetting/Label.vue
Normal file
46
src/components/Pages/VChartItemSetting/Label.vue
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<template>
|
||||||
|
<template v-if="optionData.label">
|
||||||
|
<collapse-item name="标签">
|
||||||
|
<template #header>
|
||||||
|
<n-switch v-model:value="optionData.label.visible" size="small"></n-switch>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<setting-item-box name="布局">
|
||||||
|
<setting-item name="位置">
|
||||||
|
<n-select
|
||||||
|
v-model:value="optionData.label.position"
|
||||||
|
size="small"
|
||||||
|
:options="positionOptions || labelConfig.barPosition"
|
||||||
|
/>
|
||||||
|
</setting-item>
|
||||||
|
|
||||||
|
<setting-item name="间距">
|
||||||
|
<n-input-number v-model:value="optionData.label.offset" :min="1" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
</setting-item-box>
|
||||||
|
|
||||||
|
<setting-item-box name="字体">
|
||||||
|
<FontStyle :style="toRefs(optionData.label.style)"></FontStyle>
|
||||||
|
</setting-item-box>
|
||||||
|
</collapse-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { PropType, toRefs } from 'vue'
|
||||||
|
import { labelConfig } from '@/packages/chartConfiguration/vcharts/index'
|
||||||
|
import FontStyle from './common/FontStyle.vue'
|
||||||
|
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||||
|
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
optionData: {
|
||||||
|
type: Object as PropType<vChartGlobalThemeJsonType>,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
positionOptions: {
|
||||||
|
type: Array,
|
||||||
|
required: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
@ -15,7 +15,7 @@
|
|||||||
</setting-item>
|
</setting-item>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
<setting-item-box name="项配置">
|
<setting-item-box name="项配置">
|
||||||
<FontStyle :style="legendItem.item.label.style"></FontStyle>
|
<FontStyle :style="toRefs(legendItem.item.label.style)"></FontStyle>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
</collapse-item>
|
</collapse-item>
|
||||||
</div>
|
</div>
|
||||||
@ -23,7 +23,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PropType } from 'vue'
|
import { PropType, toRefs } from 'vue'
|
||||||
import { legendsConfig } from '@/packages/chartConfiguration/vcharts/index'
|
import { legendsConfig } from '@/packages/chartConfiguration/vcharts/index'
|
||||||
import FontStyle from './common/FontStyle.vue'
|
import FontStyle from './common/FontStyle.vue'
|
||||||
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||||
|
33
src/components/Pages/VChartItemSetting/Line.vue
Normal file
33
src/components/Pages/VChartItemSetting/Line.vue
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<template>
|
||||||
|
<collapse-item name="线条" v-if="optionData.line">
|
||||||
|
<SettingItemBox name="样式">
|
||||||
|
<setting-item name="宽度">
|
||||||
|
<n-input-number v-model:value="optionData.line.style.lineWidth" size="small" :min="1"></n-input-number>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="线条类型">
|
||||||
|
<n-select
|
||||||
|
v-model:value="optionData.line.style.curveType"
|
||||||
|
:options="styleConfig.curveType"
|
||||||
|
size="small"
|
||||||
|
></n-select>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="末端样式">
|
||||||
|
<n-select v-model:value="optionData.line.style.lineCap" :options="styleConfig.lineCap" size="small"></n-select>
|
||||||
|
</setting-item>
|
||||||
|
</SettingItemBox>
|
||||||
|
</collapse-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { PropType } from 'vue'
|
||||||
|
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||||
|
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||||
|
import { styleConfig } from '@/packages/chartConfiguration/vcharts/index'
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
optionData: {
|
||||||
|
type: Object as PropType<vChartGlobalThemeJsonType>,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
56
src/components/Pages/VChartItemSetting/Point.vue
Normal file
56
src/components/Pages/VChartItemSetting/Point.vue
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<template>
|
||||||
|
<template v-if="optionData.point">
|
||||||
|
<collapse-item name="实心点(图元)">
|
||||||
|
<template #header>
|
||||||
|
<n-switch v-model:value="optionData.point.visible" size="small"></n-switch>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<setting-item-box name="样式">
|
||||||
|
<setting-item name="位置">
|
||||||
|
<n-select v-model:value="optionData.point.style.symbolType" size="small" :options="styleConfig.symbolType" />
|
||||||
|
</setting-item>
|
||||||
|
|
||||||
|
<setting-item name="大小">
|
||||||
|
<n-input-number v-model:value="optionData.point.style.size" :min="0" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="填充透明度">
|
||||||
|
<n-input-number v-model:value="optionData.point.style.fillOpacity" :step="0.1" :min="0" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="边框宽度">
|
||||||
|
<n-input-number v-model:value="optionData.point.style.lineWidth" :min="0" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="边框颜色">
|
||||||
|
<n-color-picker v-model:value="optionData.point.style.stroke" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="边框透明度">
|
||||||
|
<n-input-number v-model:value="optionData.point.style.strokeOpacity" :step="0.1" :min="0" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="偏移X">
|
||||||
|
<n-input-number v-model:value="optionData.point.style.dx" :min="0" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="偏移Y">
|
||||||
|
<n-input-number v-model:value="optionData.point.style.dy" :min="0" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
</setting-item-box>
|
||||||
|
</collapse-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { PropType, toRefs } from 'vue'
|
||||||
|
import { styleConfig } from '@/packages/chartConfiguration/vcharts/index'
|
||||||
|
import FontStyle from './common/FontStyle.vue'
|
||||||
|
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||||
|
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
optionData: {
|
||||||
|
type: Object as PropType<vChartGlobalThemeJsonType>,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
positionOptions: {
|
||||||
|
type: Array,
|
||||||
|
required: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
@ -20,20 +20,20 @@
|
|||||||
</setting-item>
|
</setting-item>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
<setting-item-box name="标题">
|
<setting-item-box name="标题">
|
||||||
<FontStyle :style="optionData.tooltip.style.titleLabel"></FontStyle>
|
<FontStyle :style="toRefs(optionData.tooltip.style.titleLabel)"></FontStyle>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
<setting-item-box name="名称">
|
<setting-item-box name="名称">
|
||||||
<FontStyle :style="optionData.tooltip.style.keyLabel"></FontStyle>
|
<FontStyle :style="toRefs(optionData.tooltip.style.keyLabel)"></FontStyle>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
<setting-item-box name="值">
|
<setting-item-box name="值">
|
||||||
<FontStyle :style="optionData.tooltip.style.valueLabel"></FontStyle>
|
<FontStyle :style="toRefs(optionData.tooltip.style.valueLabel)"></FontStyle>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
</collapse-item>
|
</collapse-item>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PropType } from 'vue'
|
import { PropType, toRefs } from 'vue'
|
||||||
import FontStyle from './common/FontStyle.vue'
|
import FontStyle from './common/FontStyle.vue'
|
||||||
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||||
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||||
|
@ -1,21 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- todo 补充常用配置项 -->
|
<!-- todo 补充常用配置项 -->
|
||||||
<!-- <div v-if="style"> -->
|
<template v-if="style">
|
||||||
<!-- <setting-item-box v-if="style" name=""> -->
|
|
||||||
<setting-item name="颜色">
|
<setting-item name="颜色">
|
||||||
<n-color-picker v-model:value="style.fill" size="small" />
|
<n-color-picker v-model:value="style.fill.value" size="small" />
|
||||||
</setting-item>
|
</setting-item>
|
||||||
<setting-item name="大小">
|
<setting-item name="大小">
|
||||||
<n-input-number v-model:value="style.fontSize" :min="1" size="small" />
|
<n-input-number v-model:value="style.fontSize.value" :min="1" size="small" />
|
||||||
</setting-item>
|
</setting-item>
|
||||||
<setting-item name="字体">
|
<setting-item name="字体">
|
||||||
<n-select v-model:value="style.fontFamily" :options="fontStyleConfig.fontFamily" size="small" />
|
<n-select v-model:value="style.fontFamily.value" :options="fontStyleConfig.fontFamily" size="small" />
|
||||||
</setting-item>
|
</setting-item>
|
||||||
<setting-item name="字重">
|
<setting-item name="字重">
|
||||||
<n-select v-model:value="style.fontSize" :options="fontStyleConfig.fontWeight" size="small" />
|
<n-select v-model:value="style.fontWeight.value" :options="fontStyleConfig.fontWeight" size="small" />
|
||||||
</setting-item>
|
</setting-item>
|
||||||
<!-- </setting-item-box> -->
|
<setting-item v-if="style?.dx" name="X轴偏移">
|
||||||
<!-- </div> -->
|
<n-input-number v-model:value="style.dx.value" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
<setting-item v-if="style?.dy" name="Y轴偏移">
|
||||||
|
<n-input-number v-model:value="style.dy.value" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
<setting-item v-if="style?.angle" name="旋转">
|
||||||
|
<n-input-number v-model:value="style.angle.value" :step="0.1" :min="0" :max="360" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -26,7 +33,7 @@ import { SettingItem } from '@/components/Pages/ChartItemSetting'
|
|||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
style: {
|
style: {
|
||||||
type: Object as PropType<FontType>,
|
type: Object as PropType<any>,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
84
src/components/Pages/VChartItemSetting/common/Padding.vue
Normal file
84
src/components/Pages/VChartItemSetting/common/Padding.vue
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<setting-item name="间距">
|
||||||
|
<n-input v-model:value="paddingArray" size="small" @update:value="updateHandle"/>
|
||||||
|
</setting-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import type { ICartesianTitle } from '@visactor/vchart/esm/component/axis'
|
||||||
|
import { forEach, isNumber } from 'lodash'
|
||||||
|
import { SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||||
|
import { PropType, ref } from 'vue'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
axis: {
|
||||||
|
type: Object as PropType<ICartesianTitle>,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 解析间距
|
||||||
|
const paddingInit = (padding: ICartesianTitle['padding']) => {
|
||||||
|
const arr = [0, 0, 0, 0]
|
||||||
|
if (!padding) {
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
if (isNumber(padding)) {
|
||||||
|
arr.forEach((item, index) => {
|
||||||
|
arr[index] = padding
|
||||||
|
})
|
||||||
|
} else if (Array.isArray(padding)) {
|
||||||
|
if (padding.length === 1) {
|
||||||
|
arr.forEach((item, index) => {
|
||||||
|
arr[index] = padding[0]
|
||||||
|
})
|
||||||
|
} else if (padding.length === 2) {
|
||||||
|
arr[0] = padding[0]
|
||||||
|
arr[1] = padding[1]
|
||||||
|
arr[2] = padding[0]
|
||||||
|
arr[3] = padding[1]
|
||||||
|
} else if (padding.length === 3) {
|
||||||
|
arr[0] = padding[0]
|
||||||
|
arr[1] = padding[1]
|
||||||
|
arr[2] = padding[2]
|
||||||
|
arr[3] = padding[1]
|
||||||
|
} else if (padding.length === 4) {
|
||||||
|
arr[0] = padding[0]
|
||||||
|
arr[1] = padding[1]
|
||||||
|
arr[2] = padding[2]
|
||||||
|
arr[3] = padding[3]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转成字符串,逗号分隔
|
||||||
|
return arr.map(item => item.toString()).join(',')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 间距处理
|
||||||
|
const paddingArray = ref(paddingInit(props.axis.padding))
|
||||||
|
|
||||||
|
// 字符串转成数组
|
||||||
|
const paddingArrayToNumber = (padding: string) => {
|
||||||
|
const arr = padding.split(',').map(item => parseFloat(item.trim()))
|
||||||
|
if (arr.length === 1) {
|
||||||
|
return [arr[0], arr[0], arr[0], arr[0]]
|
||||||
|
} else if (arr.length === 2) {
|
||||||
|
return [arr[0], arr[1], arr[0], arr[1]]
|
||||||
|
} else if (arr.length === 3) {
|
||||||
|
return [arr[0], arr[1], arr[2], arr[1]]
|
||||||
|
} else if (arr.length === 4) {
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
return [0, 0, 0, 0]
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateHandle = (value: string) => {
|
||||||
|
const padding = paddingArrayToNumber(value)
|
||||||
|
forEach(padding, (item, index) => {
|
||||||
|
if (isNaN(item)) {
|
||||||
|
padding[index] = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
props.axis.padding = padding
|
||||||
|
}
|
||||||
|
</script>
|
@ -1,4 +1,8 @@
|
|||||||
import VChartGlobalSetting from './VChartGlobalSetting.vue'
|
import VChartGlobalSetting from './VChartGlobalSetting.vue'
|
||||||
import Axis from './Axis.vue'
|
import Axis from './Axis.vue'
|
||||||
|
import Label from './Label.vue'
|
||||||
|
import Bar from './Bar.vue'
|
||||||
|
import Line from './Line.vue'
|
||||||
|
import Point from './Point.vue'
|
||||||
|
|
||||||
export { VChartGlobalSetting, Axis }
|
export { VChartGlobalSetting, Axis, Label, Bar, Line, Point }
|
||||||
|
@ -1 +1,3 @@
|
|||||||
export * from './legends'
|
export * from './legends'
|
||||||
|
export * from './label'
|
||||||
|
export * from './style'
|
120
src/packages/chartConfiguration/vcharts/label.ts
Normal file
120
src/packages/chartConfiguration/vcharts/label.ts
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
export const labelConfig = {
|
||||||
|
position: [
|
||||||
|
{
|
||||||
|
label: '外部',
|
||||||
|
value: 'outside'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '内部',
|
||||||
|
value: 'inside'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '内部-外',
|
||||||
|
value: 'inside-outer'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '内部-里',
|
||||||
|
value: 'inside-inner'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '内部-居中',
|
||||||
|
value: 'inside-center'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
barPosition: [
|
||||||
|
{
|
||||||
|
label: '外部',
|
||||||
|
value: 'outside'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '内部',
|
||||||
|
value: 'inside'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '顶部',
|
||||||
|
value: 'top'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '底部',
|
||||||
|
value: 'bottom'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '左侧',
|
||||||
|
value: 'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '右侧',
|
||||||
|
value: 'right'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '内部-顶',
|
||||||
|
value: 'inside-top'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '内部-底',
|
||||||
|
value: 'inside-bottom'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '内部-右',
|
||||||
|
value: 'inside-right'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '内部-左',
|
||||||
|
value: 'inside-left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '顶部-右',
|
||||||
|
value: 'top-right'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '顶部-左',
|
||||||
|
value: 'top-left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '底部-右',
|
||||||
|
value: 'bottom-right'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '底部-左',
|
||||||
|
value: 'bottom-left'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
linePosition: [
|
||||||
|
{
|
||||||
|
label: '顶部',
|
||||||
|
value: 'top'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '底部',
|
||||||
|
value: 'bottom'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '左侧',
|
||||||
|
value: 'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '右侧',
|
||||||
|
value: 'right'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '顶部-右',
|
||||||
|
value: 'top-right'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '顶部-左',
|
||||||
|
value: 'top-left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '底部-右',
|
||||||
|
value: 'bottom-right'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '底部-左',
|
||||||
|
value: 'bottom-left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '居中',
|
||||||
|
value: 'center'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
150
src/packages/chartConfiguration/vcharts/style.ts
Normal file
150
src/packages/chartConfiguration/vcharts/style.ts
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
export const styleConfig = {
|
||||||
|
texture: [
|
||||||
|
{
|
||||||
|
label: '无纹理',
|
||||||
|
value: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '圆形',
|
||||||
|
value: 'circle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '钻石',
|
||||||
|
value: 'diamond'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '矩形',
|
||||||
|
value: 'rect'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '竖线',
|
||||||
|
value: 'horizontal-line'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '横线',
|
||||||
|
value: 'vertical-line'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '右向左斜线',
|
||||||
|
value: 'bias-rl'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '左向右斜线',
|
||||||
|
value: 'bias-lr'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '格子',
|
||||||
|
value: 'grid'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
curveType: [
|
||||||
|
{
|
||||||
|
label: '线性',
|
||||||
|
value: 'linear'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '平滑',
|
||||||
|
value: 'monotone'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '平滑趋近X',
|
||||||
|
value: 'monotoneX'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '台阶',
|
||||||
|
value: 'step'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '连线闭合',
|
||||||
|
value: 'catmullRom'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '顺滑闭合',
|
||||||
|
value: 'catmullRomClosed'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
lineCap: [
|
||||||
|
{
|
||||||
|
label: '默认',
|
||||||
|
value: 'butt'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '圆形',
|
||||||
|
value: 'round'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '方形',
|
||||||
|
value: 'square'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
symbolType: [
|
||||||
|
{
|
||||||
|
label: '圆形',
|
||||||
|
value: 'circle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '方形',
|
||||||
|
value: 'rect'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '菱形',
|
||||||
|
value: 'diamond'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '三角形',
|
||||||
|
value: 'square'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '指向向上',
|
||||||
|
value: 'arrow'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '指向向左',
|
||||||
|
value: 'arrow2Left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '箭头向右',
|
||||||
|
value: 'arrow2Right'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '瘦箭头向上',
|
||||||
|
value: 'wedge'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '箭头向上',
|
||||||
|
value: 'triangle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '箭头向下',
|
||||||
|
value: 'triangleDown'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '箭头向右',
|
||||||
|
value: 'triangleRight'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '箭头向左',
|
||||||
|
value: 'triangleLeft'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '星星',
|
||||||
|
value: 'star'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'y字形物',
|
||||||
|
value: 'wye'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '矩形',
|
||||||
|
value: 'rect'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '圆角矩形',
|
||||||
|
value: 'rectRound'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '扁平矩形',
|
||||||
|
value: 'roundLine'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -66,7 +66,7 @@
|
|||||||
:options="labelConfig.fontWeight"
|
:options="labelConfig.fontWeight"
|
||||||
/>
|
/>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
<setting-item name="文字边框大小" v-if="optionData.series[0].label.textBorderWidth">
|
<setting-item name="文字边框大小" v-if="optionData.series[0].label.textBorderWidth > -1">
|
||||||
<n-input-number
|
<n-input-number
|
||||||
v-model:value="optionData.series[0].label.textBorderWidth"
|
v-model:value="optionData.series[0].label.textBorderWidth"
|
||||||
size="small"
|
size="small"
|
||||||
@ -81,7 +81,7 @@
|
|||||||
></n-color-picker>
|
></n-color-picker>
|
||||||
</setting-item>
|
</setting-item>
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
<setting-item-box name="圆角">
|
<setting-item-box name="分段样式">
|
||||||
<setting-item name="圆角大小">
|
<setting-item name="圆角大小">
|
||||||
<n-input-number
|
<n-input-number
|
||||||
v-model:value="optionData.series[0].itemStyle.borderRadius"
|
v-model:value="optionData.series[0].itemStyle.borderRadius"
|
||||||
|
@ -3,11 +3,11 @@ import { VChartBarCommonConfig } from './index'
|
|||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
import { vChartOptionPrefixHandle } from '@/packages/public/vChart'
|
import { vChartOptionPrefixHandle } from '@/packages/public/vChart'
|
||||||
import data from './data.json'
|
import data from './data.json'
|
||||||
import cloneDeep from 'lodash/cloneDeep'
|
|
||||||
import axisThemeJson from '@/settings/vchartThemes/axis.theme.json'
|
import axisThemeJson from '@/settings/vchartThemes/axis.theme.json'
|
||||||
import { IBarOption } from '../../index.d'
|
import { ChatCategoryEnum, IBarOption } from '../../index.d'
|
||||||
|
import { merge, cloneDeep } from 'lodash'
|
||||||
|
|
||||||
export const includes = ['legends', 'tooltip']
|
export const includes = ['legends', 'tooltip', 'label', 'bar']
|
||||||
export const option: IBarOption & { dataset?: any } = {
|
export const option: IBarOption & { dataset?: any } = {
|
||||||
// 图表配置
|
// 图表配置
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
@ -17,10 +17,17 @@ export const option: IBarOption & { dataset?: any } = {
|
|||||||
yField: ['value'],
|
yField: ['value'],
|
||||||
seriesField: 'type',
|
seriesField: 'type',
|
||||||
// 业务配置(后续会被转换为图表spec)
|
// 业务配置(后续会被转换为图表spec)
|
||||||
category: VChartBarCommonConfig.category,
|
category: VChartBarCommonConfig.category as ChatCategoryEnum.BAR,
|
||||||
xAxis: {
|
xAxis: {
|
||||||
name: 'x轴',
|
name: 'x轴',
|
||||||
...axisThemeJson,
|
...(merge(cloneDeep(axisThemeJson), {
|
||||||
|
unit: {
|
||||||
|
style: {
|
||||||
|
dx: 10,
|
||||||
|
dy: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}) as any),
|
||||||
grid: {
|
grid: {
|
||||||
...axisThemeJson.grid,
|
...axisThemeJson.grid,
|
||||||
visible: false
|
visible: false
|
||||||
@ -28,12 +35,18 @@ export const option: IBarOption & { dataset?: any } = {
|
|||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: 'y轴',
|
name: 'y轴',
|
||||||
...axisThemeJson,
|
...(merge(cloneDeep(axisThemeJson), {
|
||||||
|
unit: {
|
||||||
|
style: {
|
||||||
|
dx: 0,
|
||||||
|
dy: -10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}) as any),
|
||||||
grid: {
|
grid: {
|
||||||
...axisThemeJson.grid,
|
...axisThemeJson.grid,
|
||||||
style: {
|
style: {
|
||||||
...axisThemeJson.grid.style,
|
...axisThemeJson.grid.style
|
||||||
lineDash: [3, 3]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,15 @@
|
|||||||
<VChartGlobalSetting :optionData="optionData"></VChartGlobalSetting>
|
<VChartGlobalSetting :optionData="optionData"></VChartGlobalSetting>
|
||||||
<Axis :axis="optionData.xAxis"></Axis>
|
<Axis :axis="optionData.xAxis"></Axis>
|
||||||
<Axis :axis="optionData.yAxis"></Axis>
|
<Axis :axis="optionData.yAxis"></Axis>
|
||||||
|
<!-- 标签 -->
|
||||||
|
<Label :optionData="optionData"></Label>
|
||||||
|
<!-- 柱体 -->
|
||||||
|
<Bar :optionData="optionData"></Bar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PropType } from 'vue'
|
import { PropType } from 'vue'
|
||||||
import { VChartGlobalSetting, Axis } from '@/components/Pages/VChartItemSetting'
|
import { VChartGlobalSetting, Axis, Label, Bar } from '@/components/Pages/VChartItemSetting'
|
||||||
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
|
@ -5,7 +5,7 @@ export const VChartBarCommonConfig: ConfigType = {
|
|||||||
key: 'VChartBarCommon',
|
key: 'VChartBarCommon',
|
||||||
chartKey: 'VVChartBarCommon',
|
chartKey: 'VVChartBarCommon',
|
||||||
conKey: 'VCVChartBarCommon',
|
conKey: 'VCVChartBarCommon',
|
||||||
title: 'VChart并列柱状图',
|
title: '并列柱状图-VChart',
|
||||||
category: ChatCategoryEnum.BAR,
|
category: ChatCategoryEnum.BAR,
|
||||||
categoryName: ChatCategoryEnumName.BAR,
|
categoryName: ChatCategoryEnumName.BAR,
|
||||||
package: PackagesCategoryEnum.VCHART,
|
package: PackagesCategoryEnum.VCHART,
|
||||||
|
@ -0,0 +1,72 @@
|
|||||||
|
import { PublicConfigClass } from '@/packages/public'
|
||||||
|
import { VChartBarCrossrangeConfig } from './index'
|
||||||
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
|
import { vChartOptionPrefixHandle } from '@/packages/public/vChart'
|
||||||
|
import data from './data.json'
|
||||||
|
import axisThemeJson from '@/settings/vchartThemes/axis.theme.json'
|
||||||
|
import { ChatCategoryEnum, IBarOption } from '../../index.d'
|
||||||
|
import { merge, cloneDeep } from 'lodash'
|
||||||
|
import { vChartGlobalThemeJson } from '@/settings/vchartThemes'
|
||||||
|
|
||||||
|
const barConfig = merge(cloneDeep(vChartGlobalThemeJson.bar), {
|
||||||
|
style: {
|
||||||
|
height: 10
|
||||||
|
}
|
||||||
|
})
|
||||||
|
delete (barConfig.style as { width?: any }).width
|
||||||
|
|
||||||
|
export const includes = ['legends', 'tooltip', 'label']
|
||||||
|
export const option: IBarOption & { dataset?: any } = {
|
||||||
|
// 图表配置
|
||||||
|
type: 'bar',
|
||||||
|
dataset: data,
|
||||||
|
stack: true,
|
||||||
|
xField: ['value'],
|
||||||
|
yField: ['year', 'type'],
|
||||||
|
seriesField: 'type',
|
||||||
|
// 业务配置(后续会被转换为图表spec)
|
||||||
|
category: VChartBarCrossrangeConfig.category as ChatCategoryEnum.BAR,
|
||||||
|
direction: 'horizontal',
|
||||||
|
xAxis: {
|
||||||
|
name: 'x轴',
|
||||||
|
...(merge(cloneDeep(axisThemeJson), {
|
||||||
|
unit: {
|
||||||
|
style: {
|
||||||
|
dx: 10,
|
||||||
|
dy: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}) as any),
|
||||||
|
grid: {
|
||||||
|
...axisThemeJson.grid,
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
name: 'y轴',
|
||||||
|
...(merge(cloneDeep(axisThemeJson), {
|
||||||
|
unit: {
|
||||||
|
style: {
|
||||||
|
dx: 0,
|
||||||
|
dy: -10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}) as any),
|
||||||
|
grid: {
|
||||||
|
...axisThemeJson.grid,
|
||||||
|
style: {
|
||||||
|
...axisThemeJson.grid.style
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
bar: {
|
||||||
|
...barConfig
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class Config extends PublicConfigClass implements CreateComponentType {
|
||||||
|
public key = VChartBarCrossrangeConfig.key
|
||||||
|
public chartConfig = cloneDeep(VChartBarCrossrangeConfig)
|
||||||
|
// 图表配置项
|
||||||
|
public option = vChartOptionPrefixHandle(option, includes)
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
<template>
|
||||||
|
<!-- vCharts 全局设置 -->
|
||||||
|
<VChartGlobalSetting :optionData="optionData"></VChartGlobalSetting>
|
||||||
|
<Axis :axis="optionData.xAxis"></Axis>
|
||||||
|
<Axis :axis="optionData.yAxis"></Axis>
|
||||||
|
<!-- 标签 -->
|
||||||
|
<Label :optionData="optionData"></Label>
|
||||||
|
<!-- 柱体 -->
|
||||||
|
<Bar :optionData="optionData"></Bar>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { PropType } from 'vue'
|
||||||
|
import { VChartGlobalSetting, Axis, Label, Bar } from '@/components/Pages/VChartItemSetting'
|
||||||
|
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
optionData: {
|
||||||
|
type: Object as PropType<vChartGlobalThemeJsonType>,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
{ "type": "Autocracies", "year": "1930", "value": 129 },
|
||||||
|
{ "type": "Autocracies", "year": "1940", "value": 133 },
|
||||||
|
{ "type": "Autocracies", "year": "1950", "value": 130 },
|
||||||
|
{ "type": "Autocracies", "year": "1960", "value": 126 },
|
||||||
|
{ "type": "Autocracies", "year": "1970", "value": 117 },
|
||||||
|
{ "type": "Autocracies", "year": "1980", "value": 114 },
|
||||||
|
{ "type": "Autocracies", "year": "1990", "value": 111 },
|
||||||
|
{ "type": "Autocracies", "year": "2000", "value": 89 },
|
||||||
|
{ "type": "Autocracies", "year": "2010", "value": 80 },
|
||||||
|
{ "type": "Autocracies", "year": "2018", "value": 80 },
|
||||||
|
|
||||||
|
{ "type": "Democracies", "year": "1930", "value": 22 },
|
||||||
|
{ "type": "Democracies", "year": "1940", "value": 13 },
|
||||||
|
{ "type": "Democracies", "year": "1950", "value": 25 },
|
||||||
|
{ "type": "Democracies", "year": "1960", "value": 29 },
|
||||||
|
{ "type": "Democracies", "year": "1970", "value": 38 },
|
||||||
|
{ "type": "Democracies", "year": "1980", "value": 41 },
|
||||||
|
{ "type": "Democracies", "year": "1990", "value": 57 },
|
||||||
|
{ "type": "Democracies", "year": "2000", "value": 87 },
|
||||||
|
{ "type": "Democracies", "year": "2010", "value": 98 },
|
||||||
|
{ "type": "Democracies", "year": "2018", "value": 99 }
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d'
|
||||||
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
|
export const VChartBarCrossrangeConfig: ConfigType = {
|
||||||
|
key: 'VChartBarCrossrange',
|
||||||
|
chartKey: 'VVChartBarCrossrange',
|
||||||
|
conKey: 'VCVChartBarCrossrange',
|
||||||
|
title: '并列柱状图-VChart',
|
||||||
|
category: ChatCategoryEnum.BAR,
|
||||||
|
categoryName: ChatCategoryEnumName.BAR,
|
||||||
|
package: PackagesCategoryEnum.VCHART,
|
||||||
|
chartFrame: ChartFrameEnum.VCHART,
|
||||||
|
image: 'vchart_bar_y.png'
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
<template>
|
||||||
|
<GoVChart ref="vChartRef" :option="chartConfig.option"> </GoVChart>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { PropType } from 'vue'
|
||||||
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
|
import { GoVChart } from '@/components/GoVChart'
|
||||||
|
import { useChartDataFetch } from '@/hooks'
|
||||||
|
import config from './config'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
chartConfig: {
|
||||||
|
type: Object as PropType<config>,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore, (newData: any) => {
|
||||||
|
props.chartConfig.option.dataset = newData
|
||||||
|
})
|
||||||
|
</script>
|
@ -3,11 +3,18 @@ import { VChartBarStackConfig } from './index'
|
|||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
import { vChartOptionPrefixHandle } from '@/packages/public/vChart'
|
import { vChartOptionPrefixHandle } from '@/packages/public/vChart'
|
||||||
import data from './data.json'
|
import data from './data.json'
|
||||||
import cloneDeep from 'lodash/cloneDeep'
|
|
||||||
import axisThemeJson from '@/settings/vchartThemes/axis.theme.json'
|
import axisThemeJson from '@/settings/vchartThemes/axis.theme.json'
|
||||||
import { IBarOption } from '../../index.d'
|
import { ChatCategoryEnum, IBarOption } from '../../index.d'
|
||||||
|
import { merge, cloneDeep } from 'lodash'
|
||||||
|
import { vChartGlobalThemeJson } from '@/settings/vchartThemes'
|
||||||
|
|
||||||
export const includes = ['legends', 'tooltip']
|
const barConfig = merge(cloneDeep(vChartGlobalThemeJson.bar), {
|
||||||
|
style: {
|
||||||
|
width: 15
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
export const includes = ['legends', 'tooltip', 'label']
|
||||||
export const option: IBarOption & { dataset?: any } = {
|
export const option: IBarOption & { dataset?: any } = {
|
||||||
// 图表配置
|
// 图表配置
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
@ -16,11 +23,20 @@ export const option: IBarOption & { dataset?: any } = {
|
|||||||
yField: ['value'],
|
yField: ['value'],
|
||||||
seriesField: 'year',
|
seriesField: 'year',
|
||||||
stack: true,
|
stack: true,
|
||||||
|
// 开启百分比
|
||||||
|
percent: false,
|
||||||
// 业务配置(后续会被转换为图表spec)
|
// 业务配置(后续会被转换为图表spec)
|
||||||
category: VChartBarStackConfig.category,
|
category: VChartBarStackConfig.category as ChatCategoryEnum.BAR,
|
||||||
xAxis: {
|
xAxis: {
|
||||||
name: 'x轴',
|
name: 'x轴',
|
||||||
...axisThemeJson,
|
...(merge(cloneDeep(axisThemeJson), {
|
||||||
|
unit: {
|
||||||
|
style: {
|
||||||
|
dx: 10,
|
||||||
|
dy: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}) as any),
|
||||||
grid: {
|
grid: {
|
||||||
...axisThemeJson.grid,
|
...axisThemeJson.grid,
|
||||||
visible: false
|
visible: false
|
||||||
@ -28,14 +44,23 @@ export const option: IBarOption & { dataset?: any } = {
|
|||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: 'y轴',
|
name: 'y轴',
|
||||||
...axisThemeJson,
|
...(merge(cloneDeep(axisThemeJson), {
|
||||||
|
unit: {
|
||||||
|
style: {
|
||||||
|
dx: 0,
|
||||||
|
dy: -10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}) as any),
|
||||||
grid: {
|
grid: {
|
||||||
...axisThemeJson.grid,
|
...axisThemeJson.grid,
|
||||||
style: {
|
style: {
|
||||||
...axisThemeJson.grid.style,
|
...axisThemeJson.grid.style
|
||||||
lineDash: [3, 3]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
bar: {
|
||||||
|
...barConfig
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,12 +3,26 @@
|
|||||||
<VChartGlobalSetting :optionData="optionData"></VChartGlobalSetting>
|
<VChartGlobalSetting :optionData="optionData"></VChartGlobalSetting>
|
||||||
<Axis :axis="optionData.xAxis"></Axis>
|
<Axis :axis="optionData.xAxis"></Axis>
|
||||||
<Axis :axis="optionData.yAxis"></Axis>
|
<Axis :axis="optionData.yAxis"></Axis>
|
||||||
|
<!-- 标签 -->
|
||||||
|
<Label :optionData="optionData"></Label>
|
||||||
|
<!-- 柱体 -->
|
||||||
|
<Bar :optionData="optionData"></Bar>
|
||||||
|
<!-- 开启百分比 -->
|
||||||
|
<CollapseItem name="百分比堆叠">
|
||||||
|
<SettingItemBox name="配置" alone>
|
||||||
|
<n-space>
|
||||||
|
<span>开启百分比堆叠</span>
|
||||||
|
<n-switch v-model:value="optionData.percent" size="small"></n-switch>
|
||||||
|
</n-space>
|
||||||
|
</SettingItemBox>
|
||||||
|
</CollapseItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PropType } from 'vue'
|
import { PropType } from 'vue'
|
||||||
import { VChartGlobalSetting, Axis } from '@/components/Pages/VChartItemSetting'
|
import { VChartGlobalSetting, Axis, Label, Bar } from '@/components/Pages/VChartItemSetting'
|
||||||
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||||
|
import { CollapseItem, SettingItemBox } from '@/components/Pages/ChartItemSetting'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
optionData: {
|
optionData: {
|
||||||
|
@ -5,7 +5,7 @@ export const VChartBarStackConfig: ConfigType = {
|
|||||||
key: 'VChartBarStack',
|
key: 'VChartBarStack',
|
||||||
chartKey: 'VVChartBarStack',
|
chartKey: 'VVChartBarStack',
|
||||||
conKey: 'VCVChartBarStack',
|
conKey: 'VCVChartBarStack',
|
||||||
title: 'VChart堆叠柱状图',
|
title: '堆叠柱状图-VChart',
|
||||||
category: ChatCategoryEnum.BAR,
|
category: ChatCategoryEnum.BAR,
|
||||||
categoryName: ChatCategoryEnumName.BAR,
|
categoryName: ChatCategoryEnumName.BAR,
|
||||||
package: PackagesCategoryEnum.VCHART,
|
package: PackagesCategoryEnum.VCHART,
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { VChartBarCommonConfig } from './VChartBarCommon/index'
|
import { VChartBarCommonConfig } from './VChartBarCommon/index'
|
||||||
|
import { VChartBarCrossrangeConfig } from './VChartBarCrossrange/index'
|
||||||
import { VChartBarStackConfig } from './VChartBarStack/index'
|
import { VChartBarStackConfig } from './VChartBarStack/index'
|
||||||
|
|
||||||
export default [VChartBarCommonConfig, VChartBarStackConfig]
|
export default [VChartBarCommonConfig, VChartBarCrossrangeConfig, VChartBarStackConfig]
|
||||||
|
@ -5,7 +5,7 @@ export const VChartFunnelConfig: ConfigType = {
|
|||||||
key: 'VChartFunnel',
|
key: 'VChartFunnel',
|
||||||
chartKey: 'VVChartFunnel',
|
chartKey: 'VVChartFunnel',
|
||||||
conKey: 'VCVChartFunnel',
|
conKey: 'VCVChartFunnel',
|
||||||
title: 'VChart漏斗图',
|
title: '漏斗图-VChart',
|
||||||
category: ChatCategoryEnum.FUNNEL,
|
category: ChatCategoryEnum.FUNNEL,
|
||||||
categoryName: ChatCategoryEnumName.FUNNEL,
|
categoryName: ChatCategoryEnumName.FUNNEL,
|
||||||
package: PackagesCategoryEnum.VCHART,
|
package: PackagesCategoryEnum.VCHART,
|
||||||
|
@ -5,9 +5,9 @@ import { vChartOptionPrefixHandle } from '@/packages/public/vChart'
|
|||||||
import data from './data.json'
|
import data from './data.json'
|
||||||
import cloneDeep from 'lodash/cloneDeep'
|
import cloneDeep from 'lodash/cloneDeep'
|
||||||
import axisThemeJson from '@/settings/vchartThemes/axis.theme.json'
|
import axisThemeJson from '@/settings/vchartThemes/axis.theme.json'
|
||||||
import { ILineOption } from '../../index.d'
|
import { ChatCategoryEnum, ILineOption } from '../../index.d'
|
||||||
|
|
||||||
export const includes = ['legends', 'tooltip']
|
export const includes = ['legends', 'tooltip', 'label', 'line', 'point']
|
||||||
export const option: ILineOption & { dataset?: any } = {
|
export const option: ILineOption & { dataset?: any } = {
|
||||||
// 图表配置
|
// 图表配置
|
||||||
type: 'line',
|
type: 'line',
|
||||||
@ -16,8 +16,10 @@ export const option: ILineOption & { dataset?: any } = {
|
|||||||
yField: 'value',
|
yField: 'value',
|
||||||
seriesField: 'country',
|
seriesField: 'country',
|
||||||
stack: true,
|
stack: true,
|
||||||
|
// 开启百分比
|
||||||
|
percent: false,
|
||||||
// 业务配置(后续会被转换为图表spec)
|
// 业务配置(后续会被转换为图表spec)
|
||||||
category: VChartLineConfig.category,
|
category: VChartLineConfig.category as ChatCategoryEnum.LINE,
|
||||||
xAxis: {
|
xAxis: {
|
||||||
name: 'x轴',
|
name: 'x轴',
|
||||||
...axisThemeJson,
|
...axisThemeJson,
|
||||||
@ -25,7 +27,7 @@ export const option: ILineOption & { dataset?: any } = {
|
|||||||
...axisThemeJson.grid,
|
...axisThemeJson.grid,
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
},
|
} as any,
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: 'y轴',
|
name: 'y轴',
|
||||||
...axisThemeJson,
|
...axisThemeJson,
|
||||||
@ -36,7 +38,7 @@ export const option: ILineOption & { dataset?: any } = {
|
|||||||
lineDash: [3, 3]
|
lineDash: [3, 3]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} as any
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Config extends PublicConfigClass implements CreateComponentType {
|
export default class Config extends PublicConfigClass implements CreateComponentType {
|
||||||
|
@ -3,12 +3,26 @@
|
|||||||
<VChartGlobalSetting :optionData="optionData"></VChartGlobalSetting>
|
<VChartGlobalSetting :optionData="optionData"></VChartGlobalSetting>
|
||||||
<Axis :axis="optionData.xAxis"></Axis>
|
<Axis :axis="optionData.xAxis"></Axis>
|
||||||
<Axis :axis="optionData.yAxis"></Axis>
|
<Axis :axis="optionData.yAxis"></Axis>
|
||||||
|
<!-- 开启百分比 -->
|
||||||
|
<CollapseItem name="百分比堆叠">
|
||||||
|
<SettingItemBox name="配置" alone>
|
||||||
|
<n-space>
|
||||||
|
<span>开启百分比堆叠</span>
|
||||||
|
<n-switch v-model:value="optionData.percent" size="small"></n-switch>
|
||||||
|
</n-space>
|
||||||
|
</SettingItemBox>
|
||||||
|
</CollapseItem>
|
||||||
|
<Line :optionData="optionData"></Line>
|
||||||
|
<Label :optionData="optionData" :positionOptions="labelConfig.linePosition"></Label>
|
||||||
|
<Point :optionData="optionData"></Point>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PropType } from 'vue'
|
import { PropType } from 'vue'
|
||||||
import { VChartGlobalSetting, Axis } from '@/components/Pages/VChartItemSetting'
|
import { VChartGlobalSetting, Axis, Label, Line, Point } from '@/components/Pages/VChartItemSetting'
|
||||||
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||||
|
import { CollapseItem, SettingItemBox } from '@/components/Pages/ChartItemSetting'
|
||||||
|
import { labelConfig } from '@/packages/chartConfiguration/vcharts/index'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
optionData: {
|
optionData: {
|
||||||
|
@ -5,7 +5,7 @@ export const VChartLineConfig: ConfigType = {
|
|||||||
key: 'VChartLine',
|
key: 'VChartLine',
|
||||||
chartKey: 'VVChartLine',
|
chartKey: 'VVChartLine',
|
||||||
conKey: 'VCVChartLine',
|
conKey: 'VCVChartLine',
|
||||||
title: 'VChart折线图',
|
title: '折线图-VChart',
|
||||||
category: ChatCategoryEnum.LINE,
|
category: ChatCategoryEnum.LINE,
|
||||||
categoryName: ChatCategoryEnumName.LINE,
|
categoryName: ChatCategoryEnumName.LINE,
|
||||||
package: PackagesCategoryEnum.VCHART,
|
package: PackagesCategoryEnum.VCHART,
|
||||||
|
@ -4,7 +4,9 @@ import { CreateComponentType } from '@/packages/index.d'
|
|||||||
import { vChartOptionPrefixHandle } from '@/packages/public/vChart'
|
import { vChartOptionPrefixHandle } from '@/packages/public/vChart'
|
||||||
import data from './data.json'
|
import data from './data.json'
|
||||||
import cloneDeep from 'lodash/cloneDeep'
|
import cloneDeep from 'lodash/cloneDeep'
|
||||||
import { IPieOption } from '../../index.d'
|
import type { ChatCategoryEnum, IPieOption } from '../../index.d'
|
||||||
|
|
||||||
|
const OUTER_RADIUS = 0.75
|
||||||
|
|
||||||
export const includes = ['legends', 'tooltip']
|
export const includes = ['legends', 'tooltip']
|
||||||
export const option: IPieOption & { dataset?: any } = {
|
export const option: IPieOption & { dataset?: any } = {
|
||||||
@ -14,8 +16,57 @@ export const option: IPieOption & { dataset?: any } = {
|
|||||||
categoryField: 'year',
|
categoryField: 'year',
|
||||||
valueField: 'value',
|
valueField: 'value',
|
||||||
seriesField: 'year',
|
seriesField: 'year',
|
||||||
|
// 中心
|
||||||
|
centerX: '50%',
|
||||||
|
centerY: '50%',
|
||||||
|
innerRadius: 0.68,
|
||||||
|
outerRadius: OUTER_RADIUS,
|
||||||
|
label: {
|
||||||
|
visible: true,
|
||||||
|
position: 'outside',
|
||||||
|
style: {
|
||||||
|
fontSize: 12,
|
||||||
|
fill: '#B9B8CE',
|
||||||
|
fontFamily: 'SimSun',
|
||||||
|
fontWeight: 'normal',
|
||||||
|
angle: 0
|
||||||
|
},
|
||||||
|
line: {
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pie: {
|
||||||
|
style: {
|
||||||
|
// 圆角
|
||||||
|
cornerRadius: 50,
|
||||||
|
// 描边宽度
|
||||||
|
outerBorder: {
|
||||||
|
// 透明度
|
||||||
|
strokeOpacity: 1,
|
||||||
|
// 外描边距离
|
||||||
|
distance: 0,
|
||||||
|
// 宽度
|
||||||
|
lineWidth: 0,
|
||||||
|
// 颜色
|
||||||
|
stroke: '#ffffff'
|
||||||
|
},
|
||||||
|
// 纹理
|
||||||
|
texture: ''
|
||||||
|
},
|
||||||
|
state: {
|
||||||
|
hover: {
|
||||||
|
outerRadius: 0.85
|
||||||
|
},
|
||||||
|
selected: {
|
||||||
|
outerRadius: 0.85
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 业务配置(后续会被转换为图表spec)
|
// 业务配置(后续会被转换为图表spec)
|
||||||
category: VChartPieConfig.category,
|
category: VChartPieConfig.category as ChatCategoryEnum.PIE,
|
||||||
|
extensionMark: [],
|
||||||
|
// 动画
|
||||||
|
animationNormal: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Config extends PublicConfigClass implements CreateComponentType {
|
export default class Config extends PublicConfigClass implements CreateComponentType {
|
||||||
|
@ -1,17 +1,164 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- vCharts 全局设置 -->
|
<!-- vCharts 全局设置 -->
|
||||||
<VChartGlobalSetting :optionData="optionData"></VChartGlobalSetting>
|
<VChartGlobalSetting :optionData="optionData"></VChartGlobalSetting>
|
||||||
|
<!-- 饼图配制 -->
|
||||||
|
<CollapseItem name="饼图" expanded>
|
||||||
|
<!-- <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 name="图形">
|
||||||
|
<setting-item name="内圈范围">
|
||||||
|
<n-input-number v-model:value="optionData.innerRadius" :step="0.1" :min="0" size="small"></n-input-number>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="外圈范围">
|
||||||
|
<n-input-number v-model:value="optionData.outerRadius" :step="0.1" :min="0" size="small"></n-input-number>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="中心轴X">
|
||||||
|
<n-input v-model:value="optionData.centerX" :step="1" :min="0" size="small"></n-input>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="中心轴Y">
|
||||||
|
<n-input v-model:value="optionData.centerY" :step="1" :min="0" size="small"></n-input>
|
||||||
|
</setting-item>
|
||||||
|
</SettingItemBox>
|
||||||
|
<SettingItemBox name="标签" v-if="optionData.label">
|
||||||
|
<SettingItem>
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="optionData.label.visible" size="small"></n-switch>
|
||||||
|
<n-text>展示标签</n-text>
|
||||||
|
</n-space>
|
||||||
|
</SettingItem>
|
||||||
|
<SettingItem>
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="optionData.label.line.visible" size="small"></n-switch>
|
||||||
|
<n-text>引导线</n-text>
|
||||||
|
</n-space>
|
||||||
|
</SettingItem>
|
||||||
|
<SettingItem name="位置">
|
||||||
|
<n-select v-model:value="optionData.label.position" :options="labelConfig.position" size="small" />
|
||||||
|
</SettingItem>
|
||||||
|
<FontStyle :style="toRefs(optionData.label.style)"></FontStyle>
|
||||||
|
</SettingItemBox>
|
||||||
|
<SettingItemBox name="分段样式">
|
||||||
|
<setting-item name="纹理类型">
|
||||||
|
<n-select v-model:value="optionData.pie.style.texture" :options="styleConfig.texture" size="small"></n-select>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="圆角大小">
|
||||||
|
<n-input-number v-model:value="optionData.pie.style.cornerRadius" size="small" :min="0"></n-input-number>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="描边宽度">
|
||||||
|
<n-input-number
|
||||||
|
v-model:value="optionData.pie.style.outerBorder.lineWidth"
|
||||||
|
size="small"
|
||||||
|
:min="0"
|
||||||
|
></n-input-number>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="颜色">
|
||||||
|
<n-color-picker v-model:value="optionData.pie.style.outerBorder.stroke" size="small" />
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="外描边距离">
|
||||||
|
<n-input-number
|
||||||
|
v-model:value="optionData.pie.style.outerBorder.distance"
|
||||||
|
size="small"
|
||||||
|
:min="0"
|
||||||
|
></n-input-number>
|
||||||
|
</setting-item>
|
||||||
|
<setting-item name="描边透明度">
|
||||||
|
<n-input-number
|
||||||
|
v-model:value="optionData.pie.style.outerBorder.strokeOpacity"
|
||||||
|
:step="0.1"
|
||||||
|
size="small"
|
||||||
|
:min="0"
|
||||||
|
></n-input-number>
|
||||||
|
</setting-item>
|
||||||
|
</SettingItemBox>
|
||||||
|
<SettingItemBox name="内环形">
|
||||||
|
<setting-item name="可见性">
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="extensionMarkRef" size="small" @update:value="markerHandle"></n-switch>
|
||||||
|
</n-space>
|
||||||
|
</setting-item>
|
||||||
|
</SettingItemBox>
|
||||||
|
</CollapseItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PropType } from 'vue'
|
import { PropType, ref, toRefs } from 'vue'
|
||||||
import { VChartGlobalSetting } from '@/components/Pages/VChartItemSetting'
|
import { VChartGlobalSetting } from '@/components/Pages/VChartItemSetting'
|
||||||
import { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
import FontStyle from '@/components/Pages/VChartItemSetting/common/FontStyle.vue'
|
||||||
|
import type { vChartGlobalThemeJsonType } from '@/settings/vchartThemes/index'
|
||||||
|
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
||||||
|
import { labelConfig, styleConfig } from '@/packages/chartConfiguration/vcharts/index'
|
||||||
|
|
||||||
defineProps({
|
const props = defineProps({
|
||||||
optionData: {
|
optionData: {
|
||||||
type: Object as PropType<vChartGlobalThemeJsonType>,
|
type: Object as PropType<vChartGlobalThemeJsonType>,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const animationRef = ref(props.optionData.animationNormal && Object.keys(props.optionData.animationNormal)?.length > 0)
|
||||||
|
const extensionMarkRef = ref(!!props.optionData?.extensionMark)
|
||||||
|
|
||||||
|
const markerHandle = (value: boolean) => {
|
||||||
|
if (value) {
|
||||||
|
props.optionData.extensionMark = []
|
||||||
|
} else {
|
||||||
|
delete props.optionData.extensionMark
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const animationHandle = (value: boolean) => {
|
||||||
|
if (value) {
|
||||||
|
props.optionData.animationNormal = {
|
||||||
|
pie: [
|
||||||
|
{
|
||||||
|
loop: true,
|
||||||
|
startTime: 800,
|
||||||
|
oneByOne: true,
|
||||||
|
timeSlices: [
|
||||||
|
{
|
||||||
|
effects: {
|
||||||
|
channel: {
|
||||||
|
outerRadius: {
|
||||||
|
to: props.optionData.outerRadius * 100 + 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
easing: 'linear'
|
||||||
|
},
|
||||||
|
duration: 500
|
||||||
|
},
|
||||||
|
{
|
||||||
|
effects: {
|
||||||
|
channel: {
|
||||||
|
outerRadius: {
|
||||||
|
to: props.optionData.outerRadius * 100 + 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
easing: 'linear'
|
||||||
|
},
|
||||||
|
duration: 500
|
||||||
|
},
|
||||||
|
{
|
||||||
|
effects: {
|
||||||
|
channel: {
|
||||||
|
outerRadius: {
|
||||||
|
to: props.optionData.outerRadius * 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
duration: 500
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
props.optionData.animationNormal = {}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -5,7 +5,7 @@ export const VChartPieConfig: ConfigType = {
|
|||||||
key: 'VChartPie',
|
key: 'VChartPie',
|
||||||
chartKey: 'VVChartPie',
|
chartKey: 'VVChartPie',
|
||||||
conKey: 'VCVChartPie',
|
conKey: 'VCVChartPie',
|
||||||
title: 'VChart饼图',
|
title: '饼图多欢-VChart',
|
||||||
category: ChatCategoryEnum.PIE,
|
category: ChatCategoryEnum.PIE,
|
||||||
categoryName: ChatCategoryEnumName.PIE,
|
categoryName: ChatCategoryEnumName.PIE,
|
||||||
package: PackagesCategoryEnum.VCHART,
|
package: PackagesCategoryEnum.VCHART,
|
||||||
|
@ -5,7 +5,7 @@ export const VChartScatterConfig: ConfigType = {
|
|||||||
key: 'VChartScatter',
|
key: 'VChartScatter',
|
||||||
chartKey: 'VVChartScatter',
|
chartKey: 'VVChartScatter',
|
||||||
conKey: 'VCVChartScatter',
|
conKey: 'VCVChartScatter',
|
||||||
title: 'VChart散点图',
|
title: '散点图-VChart',
|
||||||
category: ChatCategoryEnum.SCATTER,
|
category: ChatCategoryEnum.SCATTER,
|
||||||
categoryName: ChatCategoryEnumName.SCATTER,
|
categoryName: ChatCategoryEnumName.SCATTER,
|
||||||
package: PackagesCategoryEnum.VCHART,
|
package: PackagesCategoryEnum.VCHART,
|
||||||
|
@ -5,7 +5,7 @@ export const VChartWordCloudConfig: ConfigType = {
|
|||||||
key: 'VChartWordCloud',
|
key: 'VChartWordCloud',
|
||||||
chartKey: 'VVChartWordCloud',
|
chartKey: 'VVChartWordCloud',
|
||||||
conKey: 'VCVChartWordCloud',
|
conKey: 'VCVChartWordCloud',
|
||||||
title: 'VChart词云图',
|
title: '词云图-VChart',
|
||||||
category: ChatCategoryEnum.WORDCLOUD,
|
category: ChatCategoryEnum.WORDCLOUD,
|
||||||
categoryName: ChatCategoryEnumName.WORDCLOUD,
|
categoryName: ChatCategoryEnumName.WORDCLOUD,
|
||||||
package: PackagesCategoryEnum.VCHART,
|
package: PackagesCategoryEnum.VCHART,
|
||||||
|
2
src/packages/components/VChart/index.d.ts
vendored
2
src/packages/components/VChart/index.d.ts
vendored
@ -56,7 +56,7 @@ export interface IAreaOption extends Omit<IAreaChartSpec, 'axes'> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IPieOption extends IPieChartSpec {
|
export interface IPieOption extends IPieChartSpec {
|
||||||
category: ChatCategoryEnum.PIE
|
category?: ChatCategoryEnum.PIE
|
||||||
type: 'pie'
|
type: 'pie'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,19 @@
|
|||||||
{
|
{
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"unit": {
|
||||||
|
"visible": true,
|
||||||
|
"text": "",
|
||||||
|
"style": {
|
||||||
|
"text": "",
|
||||||
|
"fontSize": 12,
|
||||||
|
"fill": "#B9B8CE",
|
||||||
|
"fontFamily": "SimSun",
|
||||||
|
"fontWeight": "normal",
|
||||||
|
"angle": 0,
|
||||||
|
"dx": 0,
|
||||||
|
"dy": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
"label": {
|
"label": {
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"style": {
|
"style": {
|
||||||
@ -7,17 +21,25 @@
|
|||||||
"fill": "#B9B8CE",
|
"fill": "#B9B8CE",
|
||||||
"fontFamily": "SimSun",
|
"fontFamily": "SimSun",
|
||||||
"fontWeight": "normal",
|
"fontWeight": "normal",
|
||||||
"angle": 0
|
"angle": 0,
|
||||||
|
"dx": 0,
|
||||||
|
"dy": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"position": "middle",
|
||||||
|
"angle": 0,
|
||||||
|
"padding": [],
|
||||||
"style": {
|
"style": {
|
||||||
"text": "",
|
"text": "",
|
||||||
"fontSize": 12,
|
"fontSize": 12,
|
||||||
"fill": "#B9B8CE",
|
"fill": "#B9B8CE",
|
||||||
"fontFamily": "SimSun",
|
"fontFamily": "SimSun",
|
||||||
"fontWeight": "normal"
|
"fontWeight": "normal",
|
||||||
|
"angle": 0,
|
||||||
|
"dx": 0,
|
||||||
|
"dy": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"domainLine": {
|
"domainLine": {
|
||||||
|
@ -74,5 +74,49 @@
|
|||||||
},
|
},
|
||||||
"spaceRow": 10
|
"spaceRow": 10
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"label": {
|
||||||
|
"visible": false,
|
||||||
|
"position": "outside",
|
||||||
|
"offset": 5,
|
||||||
|
"type": "text",
|
||||||
|
"style": {
|
||||||
|
"fontSize": 12,
|
||||||
|
"fill": "#B9B8CE",
|
||||||
|
"fontFamily": "SimSun",
|
||||||
|
"fontWeight": "normal",
|
||||||
|
"angle": 0,
|
||||||
|
"dx": 0,
|
||||||
|
"dy": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bar": {
|
||||||
|
"style": {
|
||||||
|
"width": 10,
|
||||||
|
"cornerRadius": 0,
|
||||||
|
"fillOpacity": 1,
|
||||||
|
"opacity": 1,
|
||||||
|
"texture": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"line": {
|
||||||
|
"style": {
|
||||||
|
"lineWidth": 1,
|
||||||
|
"lineCap": "butt",
|
||||||
|
"curveType": "linear"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"point": {
|
||||||
|
"visible": true,
|
||||||
|
"style": {
|
||||||
|
"symbolType": "circle",
|
||||||
|
"size": 10,
|
||||||
|
"fillOpacity": 1,
|
||||||
|
"lineWidth": 2,
|
||||||
|
"stroke": "#ffffff",
|
||||||
|
"strokeOpacity": 1,
|
||||||
|
"dx": 0,
|
||||||
|
"dy": 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,6 +6,9 @@ export type FontType = {
|
|||||||
fontFamily: string
|
fontFamily: string
|
||||||
fontWeight: string
|
fontWeight: string
|
||||||
fill: string
|
fill: string
|
||||||
|
dy?: number
|
||||||
|
dx?: number
|
||||||
|
angle?: number
|
||||||
[T: string]: any
|
[T: string]: any
|
||||||
}
|
}
|
||||||
export interface vChartGlobalThemeJsonType extends Partial<ThemeJsonType> {
|
export interface vChartGlobalThemeJsonType extends Partial<ThemeJsonType> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user