Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
6bcd7044
Unverified
提交
6bcd7044
authored
1月 11, 2022
作者:
Junjie
提交者:
GitHub
1月 11, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1624 from dataease/pr@dev@refactor_chart_style
refactor: 视图样式配置项调整
上级
b571ef24
5cff660c
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
86 行增加
和
66 行删除
+86
-66
chart.js
frontend/src/views/chart/chart/chart.js
+2
-2
liquid.js
frontend/src/views/chart/chart/liquid/liquid.js
+1
-13
LabelNormal.vue
frontend/src/views/chart/components/normal/LabelNormal.vue
+1
-1
LabelSelector.vue
...d/src/views/chart/components/shape-attr/LabelSelector.vue
+26
-6
LabelSelectorAntV.vue
...c/views/chart/components/shape-attr/LabelSelectorAntV.vue
+24
-24
SizeSelector.vue
...nd/src/views/chart/components/shape-attr/SizeSelector.vue
+0
-3
SizeSelectorAntV.vue
...rc/views/chart/components/shape-attr/SizeSelectorAntV.vue
+0
-15
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+32
-2
没有找到文件。
frontend/src/views/chart/chart/chart.js
浏览文件 @
6bcd7044
...
@@ -13,11 +13,11 @@ export const DEFAULT_SIZE = {
...
@@ -13,11 +13,11 @@ export const DEFAULT_SIZE = {
barDefault
:
true
,
barDefault
:
true
,
barWidth
:
40
,
barWidth
:
40
,
barGap
:
0.4
,
barGap
:
0.4
,
lineWidth
:
1
,
lineWidth
:
2
,
lineType
:
'solid'
,
lineType
:
'solid'
,
lineSymbol
:
'circle'
,
lineSymbol
:
'circle'
,
lineSymbolSize
:
4
,
lineSymbolSize
:
4
,
lineSmooth
:
fals
e
,
lineSmooth
:
tru
e
,
lineArea
:
false
,
lineArea
:
false
,
pieInnerRadius
:
0
,
pieInnerRadius
:
0
,
pieOuterRadius
:
80
,
pieOuterRadius
:
80
,
...
...
frontend/src/views/chart/chart/liquid/liquid.js
浏览文件 @
6bcd7044
...
@@ -5,7 +5,7 @@ import { DEFAULT_SIZE } from '@/views/chart/chart/chart'
...
@@ -5,7 +5,7 @@ import { DEFAULT_SIZE } from '@/views/chart/chart/chart'
export
function
baseLiquid
(
plot
,
container
,
chart
)
{
export
function
baseLiquid
(
plot
,
container
,
chart
)
{
let
value
=
0
let
value
=
0
const
colors
=
[]
const
colors
=
[]
let
max
,
radius
,
outlineBorder
,
outlineDistance
,
waveLength
,
waveCount
,
bgColor
,
shape
,
labelContent
,
title
let
max
,
radius
,
bgColor
,
shape
,
labelContent
,
title
if
(
chart
.
data
)
{
if
(
chart
.
data
)
{
if
(
chart
.
data
.
series
.
length
>
0
)
{
if
(
chart
.
data
.
series
.
length
>
0
)
{
value
=
chart
.
data
.
series
[
0
].
data
[
0
]
value
=
chart
.
data
.
series
[
0
].
data
[
0
]
...
@@ -26,10 +26,6 @@ export function baseLiquid(plot, container, chart) {
...
@@ -26,10 +26,6 @@ export function baseLiquid(plot, container, chart) {
const
size
=
JSON
.
parse
(
JSON
.
stringify
(
customAttr
.
size
))
const
size
=
JSON
.
parse
(
JSON
.
stringify
(
customAttr
.
size
))
max
=
size
.
liquidMax
?
size
.
liquidMax
:
DEFAULT_SIZE
.
liquidMax
max
=
size
.
liquidMax
?
size
.
liquidMax
:
DEFAULT_SIZE
.
liquidMax
radius
=
parseFloat
((
size
.
liquidSize
?
size
.
liquidSize
:
DEFAULT_SIZE
.
liquidSize
)
/
100
)
radius
=
parseFloat
((
size
.
liquidSize
?
size
.
liquidSize
:
DEFAULT_SIZE
.
liquidSize
)
/
100
)
outlineBorder
=
parseInt
(
size
.
liquidOutlineBorder
?
size
.
liquidOutlineBorder
:
DEFAULT_SIZE
.
liquidOutlineBorder
)
outlineDistance
=
parseInt
((
size
.
liquidOutlineDistance
||
size
.
liquidOutlineDistance
===
0
)
?
size
.
liquidOutlineDistance
:
DEFAULT_SIZE
.
liquidOutlineDistance
)
waveLength
=
parseInt
(
size
.
liquidWaveLength
?
size
.
liquidWaveLength
:
DEFAULT_SIZE
.
liquidWaveLength
)
waveCount
=
parseInt
(
size
.
liquidWaveCount
?
size
.
liquidWaveCount
:
DEFAULT_SIZE
.
liquidWaveCount
)
shape
=
size
.
liquidShape
?
size
.
liquidShape
:
DEFAULT_SIZE
.
liquidShape
shape
=
size
.
liquidShape
?
size
.
liquidShape
:
DEFAULT_SIZE
.
liquidShape
}
}
// label
// label
...
@@ -86,14 +82,6 @@ export function baseLiquid(plot, container, chart) {
...
@@ -86,14 +82,6 @@ export function baseLiquid(plot, container, chart) {
percent
:
(
parseFloat
(
value
)
/
parseFloat
(
max
)),
percent
:
(
parseFloat
(
value
)
/
parseFloat
(
max
)),
radius
:
radius
,
radius
:
radius
,
shape
:
shape
,
shape
:
shape
,
outline
:
{
border
:
outlineBorder
,
distance
:
outlineDistance
},
wave
:
{
length
:
waveLength
,
count
:
waveCount
},
statistic
:
{
statistic
:
{
// title: title,
// title: title,
content
:
labelContent
content
:
labelContent
...
...
frontend/src/views/chart/components/normal/LabelNormal.vue
浏览文件 @
6bcd7044
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
id=
"label-content"
id=
"label-content"
:style=
"content_class"
:style=
"content_class"
>
>
<span
v-if=
"quotaShow"
:style=
"label_class"
>
<span
:style=
"label_class"
>
<p
v-for=
"item in chart.data.series"
:key=
"item.name"
:style=
"label_content_class"
>
<p
v-for=
"item in chart.data.series"
:key=
"item.name"
:style=
"label_content_class"
>
{{
item
.
data
[
0
]
}}
{{
item
.
data
[
0
]
}}
</p>
</p>
...
...
frontend/src/views/chart/components/shape-attr/LabelSelector.vue
浏览文件 @
6bcd7044
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<el-form-item
:label=
"$t('chart.text_color')"
class=
"form-item"
>
<el-form-item
:label=
"$t('chart.text_color')"
class=
"form-item"
>
<el-color-picker
v-model=
"labelForm.color"
class=
"color-picker-style"
:predefine=
"predefineColors"
@
change=
"changeLabelAttr"
/>
<el-color-picker
v-model=
"labelForm.color"
class=
"color-picker-style"
:predefine=
"predefineColors"
@
change=
"changeLabelAttr"
/>
</el-form-item>
</el-form-item>
<el-form-item
v-show=
"chart.type && chart.type !== 'liquid'"
:label=
"$t('chart.label_position')"
class=
"form-item"
>
<el-form-item
v-show=
"chart.type && chart.type !== 'liquid'
&& !chart.type.includes('line') && chart.type !== 'treemap'
"
:label=
"$t('chart.label_position')"
class=
"form-item"
>
<el-select
v-model=
"labelForm.position"
:placeholder=
"$t('chart.label_position')"
@
change=
"changeLabelAttr"
>
<el-select
v-model=
"labelForm.position"
:placeholder=
"$t('chart.label_position')"
@
change=
"changeLabelAttr"
>
<el-option
v-for=
"option in labelPosition"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
<el-option
v-for=
"option in labelPosition"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
</el-select>
</el-select>
...
@@ -84,27 +84,35 @@ export default {
...
@@ -84,27 +84,35 @@ export default {
labelForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_LABEL
)),
labelForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_LABEL
)),
fontSize
:
[],
fontSize
:
[],
isSetting
:
false
,
isSetting
:
false
,
labelPosition
:
[
labelPosition
:
[],
labelPositionPie
:
[
{
name
:
this
.
$t
(
'chart.inside'
),
value
:
'inside'
},
{
name
:
this
.
$t
(
'chart.inside'
),
value
:
'inside'
},
{
name
:
this
.
$t
(
'chart.outside'
),
value
:
'outside'
},
{
name
:
this
.
$t
(
'chart.outside'
),
value
:
'outside'
}
{
name
:
this
.
$t
(
'chart.center'
),
value
:
'center'
},
],
{
name
:
this
.
$t
(
'chart.text_pos_top'
),
value
:
'top'
},
labelPositionH
:
[
{
name
:
this
.
$t
(
'chart.text_pos_bottom'
),
value
:
'bottom'
},
{
name
:
this
.
$t
(
'chart.text_pos_left'
),
value
:
'left'
},
{
name
:
this
.
$t
(
'chart.text_pos_left'
),
value
:
'left'
},
{
name
:
this
.
$t
(
'chart.center'
),
value
:
'inside'
},
{
name
:
this
.
$t
(
'chart.text_pos_right'
),
value
:
'right'
}
{
name
:
this
.
$t
(
'chart.text_pos_right'
),
value
:
'right'
}
],
],
labelPositionV
:
[
{
name
:
this
.
$t
(
'chart.text_pos_top'
),
value
:
'top'
},
{
name
:
this
.
$t
(
'chart.center'
),
value
:
'inside'
},
{
name
:
this
.
$t
(
'chart.text_pos_bottom'
),
value
:
'bottom'
}
],
predefineColors
:
COLOR_PANEL
predefineColors
:
COLOR_PANEL
}
}
},
},
watch
:
{
watch
:
{
'chart'
:
{
'chart'
:
{
handler
:
function
()
{
handler
:
function
()
{
this
.
initOptions
()
this
.
initData
()
this
.
initData
()
}
}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
init
()
this
.
init
()
this
.
initOptions
()
this
.
initData
()
this
.
initData
()
},
},
methods
:
{
methods
:
{
...
@@ -140,6 +148,18 @@ export default {
...
@@ -140,6 +148,18 @@ export default {
this
.
isSetting
=
false
this
.
isSetting
=
false
}
}
this
.
$emit
(
'onLabelChange'
,
this
.
labelForm
)
this
.
$emit
(
'onLabelChange'
,
this
.
labelForm
)
},
initOptions
()
{
const
type
=
this
.
chart
.
type
if
(
type
)
{
if
(
type
.
includes
(
'horizontal'
))
{
this
.
labelPosition
=
this
.
labelPositionH
}
else
if
(
type
.
includes
(
'pie'
))
{
this
.
labelPosition
=
this
.
labelPositionPie
}
else
{
this
.
labelPosition
=
this
.
labelPositionV
}
}
}
}
}
}
}
}
...
...
frontend/src/views/chart/components/shape-attr/LabelSelectorAntV.vue
浏览文件 @
6bcd7044
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<el-form-item
:label=
"$t('chart.text_color')"
class=
"form-item"
>
<el-form-item
:label=
"$t('chart.text_color')"
class=
"form-item"
>
<el-color-picker
v-model=
"labelForm.color"
class=
"color-picker-style"
:predefine=
"predefineColors"
@
change=
"changeLabelAttr"
/>
<el-color-picker
v-model=
"labelForm.color"
class=
"color-picker-style"
:predefine=
"predefineColors"
@
change=
"changeLabelAttr"
/>
</el-form-item>
</el-form-item>
<el-form-item
v-show=
"chart.type && chart.type !== 'liquid' && chart.type !== 'pie-rose'"
:label=
"$t('chart.label_position')"
class=
"form-item"
>
<el-form-item
v-show=
"chart.type && chart.type !== 'liquid' && chart.type !== 'pie-rose'
&& !chart.type.includes('line') && chart.type !== 'treemap'
"
:label=
"$t('chart.label_position')"
class=
"form-item"
>
<el-select
v-model=
"labelForm.position"
:placeholder=
"$t('chart.label_position')"
@
change=
"changeLabelAttr"
>
<el-select
v-model=
"labelForm.position"
:placeholder=
"$t('chart.label_position')"
@
change=
"changeLabelAttr"
>
<el-option
v-for=
"option in labelPosition"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
<el-option
v-for=
"option in labelPosition"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
</el-select>
</el-select>
...
@@ -62,29 +62,35 @@ export default {
...
@@ -62,29 +62,35 @@ export default {
labelForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_LABEL
)),
labelForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_LABEL
)),
fontSize
:
[],
fontSize
:
[],
isSetting
:
false
,
isSetting
:
false
,
labelPosition
:
[
labelPosition
:
[
],
{
name
:
this
.
$t
(
'chart.inside'
),
value
:
'middle'
},
labelPositionPie
:
[
{
name
:
this
.
$t
(
'chart.
outside'
),
value
:
'outside
'
},
{
name
:
this
.
$t
(
'chart.
inside'
),
value
:
'inner
'
},
{
name
:
this
.
$t
(
'chart.
center'
),
value
:
'center'
},
{
name
:
this
.
$t
(
'chart.
outside'
),
value
:
'outer'
}
{
name
:
this
.
$t
(
'chart.text_pos_top'
),
value
:
'top'
}
,
]
,
{
name
:
this
.
$t
(
'chart.text_pos_bottom'
),
value
:
'bottom'
},
labelPositionH
:
[
{
name
:
this
.
$t
(
'chart.text_pos_left'
),
value
:
'left'
},
{
name
:
this
.
$t
(
'chart.text_pos_left'
),
value
:
'left'
},
{
name
:
this
.
$t
(
'chart.center'
),
value
:
'middle'
},
{
name
:
this
.
$t
(
'chart.text_pos_right'
),
value
:
'right'
}
{
name
:
this
.
$t
(
'chart.text_pos_right'
),
value
:
'right'
}
],
],
labelPositionV
:
[
{
name
:
this
.
$t
(
'chart.text_pos_top'
),
value
:
'top'
},
{
name
:
this
.
$t
(
'chart.center'
),
value
:
'middle'
},
{
name
:
this
.
$t
(
'chart.text_pos_bottom'
),
value
:
'bottom'
}
],
predefineColors
:
COLOR_PANEL
predefineColors
:
COLOR_PANEL
}
}
},
},
watch
:
{
watch
:
{
'chart'
:
{
'chart'
:
{
handler
:
function
()
{
handler
:
function
()
{
this
.
init
LabelPosition
()
this
.
init
Options
()
this
.
initData
()
this
.
initData
()
}
}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
init
()
this
.
init
()
this
.
init
LabelPosition
()
this
.
init
Options
()
this
.
initData
()
this
.
initData
()
},
},
methods
:
{
methods
:
{
...
@@ -121,22 +127,16 @@ export default {
...
@@ -121,22 +127,16 @@ export default {
}
}
this
.
$emit
(
'onLabelChange'
,
this
.
labelForm
)
this
.
$emit
(
'onLabelChange'
,
this
.
labelForm
)
},
},
initLabelPosition
()
{
initOptions
()
{
if
(
this
.
chart
&&
this
.
chart
.
type
&&
this
.
chart
.
type
.
includes
(
'pie'
))
{
const
type
=
this
.
chart
.
type
this
.
labelPosition
=
[
if
(
type
)
{
{
name
:
this
.
$t
(
'chart.inside'
),
value
:
'inner'
},
if
(
type
.
includes
(
'horizontal'
))
{
{
name
:
this
.
$t
(
'chart.outside'
),
value
:
'outer'
}
this
.
labelPosition
=
this
.
labelPositionH
]
}
else
if
(
type
.
includes
(
'pie'
))
{
this
.
labelPosition
=
this
.
labelPositionPie
}
else
{
}
else
{
this
.
labelPosition
=
[
this
.
labelPosition
=
this
.
labelPositionV
{
name
:
this
.
$t
(
'chart.inside'
),
value
:
'middle'
},
}
{
name
:
this
.
$t
(
'chart.outside'
),
value
:
'outside'
},
{
name
:
this
.
$t
(
'chart.center'
),
value
:
'center'
},
{
name
:
this
.
$t
(
'chart.text_pos_top'
),
value
:
'top'
},
{
name
:
this
.
$t
(
'chart.text_pos_bottom'
),
value
:
'bottom'
},
{
name
:
this
.
$t
(
'chart.text_pos_left'
),
value
:
'left'
},
{
name
:
this
.
$t
(
'chart.text_pos_right'
),
value
:
'right'
}
]
}
}
}
}
}
}
...
...
frontend/src/views/chart/components/shape-attr/SizeSelector.vue
浏览文件 @
6bcd7044
...
@@ -128,9 +128,6 @@
...
@@ -128,9 +128,6 @@
</el-form>
</el-form>
<el-form
v-show=
"chart.type && chart.type.includes('text')"
ref=
"sizeFormPie"
:disabled=
"param && !hasDataPermission('manage',param.privileges)"
:model=
"sizeForm"
label-width=
"100px"
size=
"mini"
>
<el-form
v-show=
"chart.type && chart.type.includes('text')"
ref=
"sizeFormPie"
:disabled=
"param && !hasDataPermission('manage',param.privileges)"
:model=
"sizeForm"
label-width=
"100px"
size=
"mini"
>
<el-form-item
:label=
"$t('chart.quota_show')"
class=
"form-item"
>
<el-checkbox
v-model=
"sizeForm.quotaShow"
@
change=
"changeBarSizeCase"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
</el-form-item>
<el-form-item
:label=
"$t('chart.quota_font_size')"
class=
"form-item"
>
<el-form-item
:label=
"$t('chart.quota_font_size')"
class=
"form-item"
>
<el-select
v-model=
"sizeForm.quotaFontSize"
:placeholder=
"$t('chart.quota_font_size')"
@
change=
"changeBarSizeCase"
>
<el-select
v-model=
"sizeForm.quotaFontSize"
:placeholder=
"$t('chart.quota_font_size')"
@
change=
"changeBarSizeCase"
>
<el-option
v-for=
"option in fontSize"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
<el-option
v-for=
"option in fontSize"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
...
...
frontend/src/views/chart/components/shape-attr/SizeSelectorAntV.vue
浏览文件 @
6bcd7044
...
@@ -125,9 +125,6 @@
...
@@ -125,9 +125,6 @@
</el-form>
</el-form>
<el-form
v-show=
"chart.type && chart.type.includes('text')"
ref=
"sizeFormPie"
:disabled=
"param && !hasDataPermission('manage',param.privileges)"
:model=
"sizeForm"
label-width=
"100px"
size=
"mini"
>
<el-form
v-show=
"chart.type && chart.type.includes('text')"
ref=
"sizeFormPie"
:disabled=
"param && !hasDataPermission('manage',param.privileges)"
:model=
"sizeForm"
label-width=
"100px"
size=
"mini"
>
<el-form-item
:label=
"$t('chart.quota_show')"
class=
"form-item"
>
<el-checkbox
v-model=
"sizeForm.quotaShow"
@
change=
"changeBarSizeCase"
>
{{
$t
(
'chart.show'
)
}}
</el-checkbox>
</el-form-item>
<el-form-item
:label=
"$t('chart.quota_font_size')"
class=
"form-item"
>
<el-form-item
:label=
"$t('chart.quota_font_size')"
class=
"form-item"
>
<el-select
v-model=
"sizeForm.quotaFontSize"
:placeholder=
"$t('chart.quota_font_size')"
@
change=
"changeBarSizeCase"
>
<el-select
v-model=
"sizeForm.quotaFontSize"
:placeholder=
"$t('chart.quota_font_size')"
@
change=
"changeBarSizeCase"
>
<el-option
v-for=
"option in fontSize"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
<el-option
v-for=
"option in fontSize"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
...
@@ -244,18 +241,6 @@
...
@@ -244,18 +241,6 @@
<el-form-item
:label=
"$t('chart.radar_size')"
class=
"form-item form-item-slider"
>
<el-form-item
:label=
"$t('chart.radar_size')"
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"sizeForm.liquidSize"
show-input
:show-input-controls=
"false"
input-size=
"mini"
:min=
"1"
:max=
"100"
@
change=
"changeBarSizeCase"
/>
<el-slider
v-model=
"sizeForm.liquidSize"
show-input
:show-input-controls=
"false"
input-size=
"mini"
:min=
"1"
:max=
"100"
@
change=
"changeBarSizeCase"
/>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('chart.liquid_outline_border')"
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"sizeForm.liquidOutlineBorder"
show-input
:show-input-controls=
"false"
input-size=
"mini"
:min=
"1"
:max=
"20"
@
change=
"changeBarSizeCase"
/>
</el-form-item>
<el-form-item
:label=
"$t('chart.liquid_outline_distance')"
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"sizeForm.liquidOutlineDistance"
show-input
:show-input-controls=
"false"
input-size=
"mini"
:min=
"0"
:max=
"20"
@
change=
"changeBarSizeCase"
/>
</el-form-item>
<el-form-item
:label=
"$t('chart.liquid_wave_length')"
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"sizeForm.liquidWaveLength"
show-input
:show-input-controls=
"false"
input-size=
"mini"
:min=
"10"
:max=
"500"
@
change=
"changeBarSizeCase"
/>
</el-form-item>
<el-form-item
:label=
"$t('chart.liquid_wave_count')"
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"sizeForm.liquidWaveCount"
show-input
:show-input-controls=
"false"
input-size=
"mini"
:min=
"2"
:max=
"10"
@
change=
"changeBarSizeCase"
/>
</el-form-item>
</el-form>
</el-form>
</el-col>
</el-col>
</div>
</div>
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
6bcd7044
...
@@ -141,7 +141,7 @@
...
@@ -141,7 +141,7 @@
class=
"render-select"
class=
"render-select"
style=
"width: 100px"
style=
"width: 100px"
size=
"mini"
size=
"mini"
@
change=
"c
alcData(true,'chart',true,true
)"
@
change=
"c
hangeChartType(
)"
>
>
<el-option
<el-option
v-for=
"item in renderOptions"
v-for=
"item in renderOptions"
...
@@ -158,7 +158,7 @@
...
@@ -158,7 +158,7 @@
v-model=
"view.type"
v-model=
"view.type"
style=
"width: 100%"
style=
"width: 100%"
:disabled=
"!hasDataPermission('manage',param.privileges)"
:disabled=
"!hasDataPermission('manage',param.privileges)"
@
change=
"c
alcData(true,'chart',true,true
)"
@
change=
"c
hangeChartType(
)"
>
>
<chart-type
:chart=
"view"
style=
"height: 480px"
/>
<chart-type
:chart=
"view"
style=
"height: 480px"
/>
</el-radio-group>
</el-radio-group>
...
@@ -2066,6 +2066,36 @@ export default {
...
@@ -2066,6 +2066,36 @@ export default {
reset
()
{
reset
()
{
this
.
getData
(
this
.
param
.
id
)
this
.
getData
(
this
.
param
.
id
)
},
changeChartType
()
{
this
.
setChartDefaultOptions
()
this
.
calcData
(
true
,
'chart'
,
true
,
true
)
},
setChartDefaultOptions
()
{
const
type
=
this
.
view
.
type
if
(
type
.
includes
(
'pie'
))
{
if
(
this
.
view
.
render
===
'echarts'
)
{
this
.
view
.
customAttr
.
label
.
position
=
'inside'
}
else
{
this
.
view
.
customAttr
.
label
.
position
=
'inner'
}
}
else
if
(
type
.
includes
(
'line'
))
{
this
.
view
.
customAttr
.
label
.
position
=
'top'
}
else
if
(
type
.
includes
(
'treemap'
))
{
if
(
this
.
view
.
render
===
'echarts'
)
{
this
.
view
.
customAttr
.
label
.
position
=
'inside'
}
else
{
this
.
view
.
customAttr
.
label
.
position
=
'middle'
}
}
else
{
if
(
this
.
view
.
render
===
'echarts'
)
{
this
.
view
.
customAttr
.
label
.
position
=
'inside'
}
else
{
this
.
view
.
customAttr
.
label
.
position
=
'middle'
}
}
}
}
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论