Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
555de253
提交
555de253
authored
6月 07, 2022
作者:
junjun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 轴值格式化
上级
e51b0d76
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
198 行增加
和
6 行删除
+198
-6
XAxisSelector.vue
.../views/chart/components/component-style/XAxisSelector.vue
+33
-1
XAxisSelectorAntV.vue
...ws/chart/components/component-style/XAxisSelectorAntV.vue
+33
-1
YAxisExtSelector.vue
...ews/chart/components/component-style/YAxisExtSelector.vue
+33
-1
YAxisExtSelectorAntV.vue
...chart/components/component-style/YAxisExtSelectorAntV.vue
+33
-1
YAxisSelector.vue
.../views/chart/components/component-style/YAxisSelector.vue
+33
-1
YAxisSelectorAntV.vue
...ws/chart/components/component-style/YAxisSelectorAntV.vue
+33
-1
没有找到文件。
frontend/src/views/chart/components/component-style/XAxisSelector.vue
浏览文件 @
555de253
...
@@ -88,6 +88,32 @@
...
@@ -88,6 +88,32 @@
<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"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<span
v-show=
"chart.type && chart.type.includes('horizontal')"
>
<el-form-item
:label=
"$t('chart.value_formatter_type')"
class=
"form-item"
>
<el-select
v-model=
"axisForm.axisLabelFormatter.type"
@
change=
"changeXAxisStyle"
>
<el-option
v-for=
"type in typeList"
:key=
"type.value"
:label=
"$t('chart.' + type.name)"
:value=
"type.value"
/>
</el-select>
</el-form-item>
<el-form-item
v-show=
"axisForm.axisLabelFormatter.type !== 'auto'"
:label=
"$t('chart.value_formatter_decimal_count')"
class=
"form-item"
>
<el-input-number
v-model=
"axisForm.axisLabelFormatter.decimalCount"
:precision=
"0"
:min=
"0"
:max=
"10"
size=
"mini"
@
change=
"changeXAxisStyle"
/>
</el-form-item>
<el-form-item
v-show=
"axisForm.axisLabelFormatter.type !== 'percent'"
:label=
"$t('chart.value_formatter_unit')"
class=
"form-item"
>
<el-select
v-model=
"axisForm.axisLabelFormatter.unit"
:placeholder=
"$t('chart.pls_select_field')"
size=
"mini"
@
change=
"changeXAxisStyle"
>
<el-option
v-for=
"item in unitList"
:key=
"item.value"
:label=
"$t('chart.' + item.name)"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('chart.value_formatter_suffix')"
class=
"form-item"
>
<el-input
v-model=
"axisForm.axisLabelFormatter.suffix"
size=
"mini"
clearable
:placeholder=
"$t('commons.input_content')"
@
change=
"changeXAxisStyle"
/>
</el-form-item>
<el-form-item
:label=
"$t('chart.value_formatter_thousand_separator')"
class=
"form-item"
>
<el-checkbox
v-model=
"axisForm.axisLabelFormatter.thousandSeparator"
@
change=
"changeXAxisStyle"
/>
</el-form-item>
</span>
</span>
</span>
<el-divider
v-if=
"showProperty('axisLabel')"
/>
<el-divider
v-if=
"showProperty('axisLabel')"
/>
<el-form-item
v-show=
"showProperty('axisLabel')"
:label=
"$t('chart.content_formatter')"
class=
"form-item"
>
<el-form-item
v-show=
"showProperty('axisLabel')"
:label=
"$t('chart.content_formatter')"
class=
"form-item"
>
...
@@ -101,6 +127,7 @@
...
@@ -101,6 +127,7 @@
<
script
>
<
script
>
import
{
COLOR_PANEL
,
DEFAULT_XAXIS_STYLE
}
from
'../../chart/chart'
import
{
COLOR_PANEL
,
DEFAULT_XAXIS_STYLE
}
from
'../../chart/chart'
import
{
formatterType
,
unitList
}
from
'@/views/chart/chart/formatter'
export
default
{
export
default
{
name
:
'XAxisSelector'
,
name
:
'XAxisSelector'
,
...
@@ -126,7 +153,9 @@ export default {
...
@@ -126,7 +153,9 @@ export default {
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_XAXIS_STYLE
)),
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_XAXIS_STYLE
)),
isSetting
:
false
,
isSetting
:
false
,
fontSize
:
[],
fontSize
:
[],
predefineColors
:
COLOR_PANEL
predefineColors
:
COLOR_PANEL
,
typeList
:
formatterType
,
unitList
:
unitList
}
}
},
},
watch
:
{
watch
:
{
...
@@ -161,6 +190,9 @@ export default {
...
@@ -161,6 +190,9 @@ export default {
if
(
!
this
.
axisForm
.
axisValue
)
{
if
(
!
this
.
axisForm
.
axisValue
)
{
this
.
axisForm
.
axisValue
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_XAXIS_STYLE
.
axisValue
))
this
.
axisForm
.
axisValue
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_XAXIS_STYLE
.
axisValue
))
}
}
if
(
!
this
.
axisForm
.
axisLabelFormatter
)
{
this
.
axisForm
.
axisLabelFormatter
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_XAXIS_STYLE
.
axisLabelFormatter
))
}
}
}
}
}
},
},
...
...
frontend/src/views/chart/components/component-style/XAxisSelectorAntV.vue
浏览文件 @
555de253
...
@@ -81,6 +81,32 @@
...
@@ -81,6 +81,32 @@
<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"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<span
v-show=
"chart.type && chart.type.includes('horizontal')"
>
<el-form-item
:label=
"$t('chart.value_formatter_type')"
class=
"form-item"
>
<el-select
v-model=
"axisForm.axisLabelFormatter.type"
@
change=
"changeXAxisStyle"
>
<el-option
v-for=
"type in typeList"
:key=
"type.value"
:label=
"$t('chart.' + type.name)"
:value=
"type.value"
/>
</el-select>
</el-form-item>
<el-form-item
v-show=
"axisForm.axisLabelFormatter.type !== 'auto'"
:label=
"$t('chart.value_formatter_decimal_count')"
class=
"form-item"
>
<el-input-number
v-model=
"axisForm.axisLabelFormatter.decimalCount"
:precision=
"0"
:min=
"0"
:max=
"10"
size=
"mini"
@
change=
"changeXAxisStyle"
/>
</el-form-item>
<el-form-item
v-show=
"axisForm.axisLabelFormatter.type !== 'percent'"
:label=
"$t('chart.value_formatter_unit')"
class=
"form-item"
>
<el-select
v-model=
"axisForm.axisLabelFormatter.unit"
:placeholder=
"$t('chart.pls_select_field')"
size=
"mini"
@
change=
"changeXAxisStyle"
>
<el-option
v-for=
"item in unitList"
:key=
"item.value"
:label=
"$t('chart.' + item.name)"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('chart.value_formatter_suffix')"
class=
"form-item"
>
<el-input
v-model=
"axisForm.axisLabelFormatter.suffix"
size=
"mini"
clearable
:placeholder=
"$t('commons.input_content')"
@
change=
"changeXAxisStyle"
/>
</el-form-item>
<el-form-item
:label=
"$t('chart.value_formatter_thousand_separator')"
class=
"form-item"
>
<el-checkbox
v-model=
"axisForm.axisLabelFormatter.thousandSeparator"
@
change=
"changeXAxisStyle"
/>
</el-form-item>
</span>
</span>
</span>
</div>
</div>
</el-form>
</el-form>
...
@@ -90,6 +116,7 @@
...
@@ -90,6 +116,7 @@
<
script
>
<
script
>
import
{
COLOR_PANEL
,
DEFAULT_XAXIS_STYLE
}
from
'../../chart/chart'
import
{
COLOR_PANEL
,
DEFAULT_XAXIS_STYLE
}
from
'../../chart/chart'
import
{
formatterType
,
unitList
}
from
'@/views/chart/chart/formatter'
export
default
{
export
default
{
name
:
'XAxisSelectorAntV'
,
name
:
'XAxisSelectorAntV'
,
...
@@ -115,7 +142,9 @@ export default {
...
@@ -115,7 +142,9 @@ export default {
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_XAXIS_STYLE
)),
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_XAXIS_STYLE
)),
isSetting
:
false
,
isSetting
:
false
,
fontSize
:
[],
fontSize
:
[],
predefineColors
:
COLOR_PANEL
predefineColors
:
COLOR_PANEL
,
typeList
:
formatterType
,
unitList
:
unitList
}
}
},
},
watch
:
{
watch
:
{
...
@@ -150,6 +179,9 @@ export default {
...
@@ -150,6 +179,9 @@ export default {
if
(
!
this
.
axisForm
.
axisValue
)
{
if
(
!
this
.
axisForm
.
axisValue
)
{
this
.
axisForm
.
axisValue
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_XAXIS_STYLE
.
axisValue
))
this
.
axisForm
.
axisValue
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_XAXIS_STYLE
.
axisValue
))
}
}
if
(
!
this
.
axisForm
.
axisLabelFormatter
)
{
this
.
axisForm
.
axisLabelFormatter
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_XAXIS_STYLE
.
axisLabelFormatter
))
}
}
}
}
}
},
},
...
...
frontend/src/views/chart/components/component-style/YAxisExtSelector.vue
浏览文件 @
555de253
...
@@ -88,6 +88,32 @@
...
@@ -88,6 +88,32 @@
<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"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<span
v-show=
"chart.type && !chart.type.includes('horizontal')"
>
<el-form-item
:label=
"$t('chart.value_formatter_type')"
class=
"form-item"
>
<el-select
v-model=
"axisForm.axisLabelFormatter.type"
@
change=
"changeYAxisStyle"
>
<el-option
v-for=
"type in typeList"
:key=
"type.value"
:label=
"$t('chart.' + type.name)"
:value=
"type.value"
/>
</el-select>
</el-form-item>
<el-form-item
v-show=
"axisForm.axisLabelFormatter.type !== 'auto'"
:label=
"$t('chart.value_formatter_decimal_count')"
class=
"form-item"
>
<el-input-number
v-model=
"axisForm.axisLabelFormatter.decimalCount"
:precision=
"0"
:min=
"0"
:max=
"10"
size=
"mini"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
<el-form-item
v-show=
"axisForm.axisLabelFormatter.type !== 'percent'"
:label=
"$t('chart.value_formatter_unit')"
class=
"form-item"
>
<el-select
v-model=
"axisForm.axisLabelFormatter.unit"
:placeholder=
"$t('chart.pls_select_field')"
size=
"mini"
@
change=
"changeYAxisStyle"
>
<el-option
v-for=
"item in unitList"
:key=
"item.value"
:label=
"$t('chart.' + item.name)"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('chart.value_formatter_suffix')"
class=
"form-item"
>
<el-input
v-model=
"axisForm.axisLabelFormatter.suffix"
size=
"mini"
clearable
:placeholder=
"$t('commons.input_content')"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
<el-form-item
:label=
"$t('chart.value_formatter_thousand_separator')"
class=
"form-item"
>
<el-checkbox
v-model=
"axisForm.axisLabelFormatter.thousandSeparator"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
</span>
</span>
</span>
<el-divider
v-if=
"showProperty('axisLabel')"
/>
<el-divider
v-if=
"showProperty('axisLabel')"
/>
<el-form-item
v-show=
"showProperty('axisLabel')"
:label=
"$t('chart.content_formatter')"
class=
"form-item"
>
<el-form-item
v-show=
"showProperty('axisLabel')"
:label=
"$t('chart.content_formatter')"
class=
"form-item"
>
...
@@ -101,6 +127,7 @@
...
@@ -101,6 +127,7 @@
<
script
>
<
script
>
import
{
COLOR_PANEL
,
DEFAULT_YAXIS_EXT_STYLE
}
from
'../../chart/chart'
import
{
COLOR_PANEL
,
DEFAULT_YAXIS_EXT_STYLE
}
from
'../../chart/chart'
import
{
formatterType
,
unitList
}
from
'@/views/chart/chart/formatter'
export
default
{
export
default
{
name
:
'YAxisExtSelector'
,
name
:
'YAxisExtSelector'
,
...
@@ -126,7 +153,9 @@ export default {
...
@@ -126,7 +153,9 @@ export default {
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_EXT_STYLE
)),
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_EXT_STYLE
)),
isSetting
:
false
,
isSetting
:
false
,
fontSize
:
[],
fontSize
:
[],
predefineColors
:
COLOR_PANEL
predefineColors
:
COLOR_PANEL
,
typeList
:
formatterType
,
unitList
:
unitList
}
}
},
},
watch
:
{
watch
:
{
...
@@ -164,6 +193,9 @@ export default {
...
@@ -164,6 +193,9 @@ export default {
if
(
!
this
.
axisForm
.
axisValue
)
{
if
(
!
this
.
axisForm
.
axisValue
)
{
this
.
axisForm
.
axisValue
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_EXT_STYLE
.
axisValue
))
this
.
axisForm
.
axisValue
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_EXT_STYLE
.
axisValue
))
}
}
if
(
!
this
.
axisForm
.
axisLabelFormatter
)
{
this
.
axisForm
.
axisLabelFormatter
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_EXT_STYLE
.
axisLabelFormatter
))
}
}
}
}
}
},
},
...
...
frontend/src/views/chart/components/component-style/YAxisExtSelectorAntV.vue
浏览文件 @
555de253
...
@@ -81,6 +81,32 @@
...
@@ -81,6 +81,32 @@
<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"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<span
v-show=
"chart.type && !chart.type.includes('horizontal')"
>
<el-form-item
:label=
"$t('chart.value_formatter_type')"
class=
"form-item"
>
<el-select
v-model=
"axisForm.axisLabelFormatter.type"
@
change=
"changeYAxisStyle"
>
<el-option
v-for=
"type in typeList"
:key=
"type.value"
:label=
"$t('chart.' + type.name)"
:value=
"type.value"
/>
</el-select>
</el-form-item>
<el-form-item
v-show=
"axisForm.axisLabelFormatter.type !== 'auto'"
:label=
"$t('chart.value_formatter_decimal_count')"
class=
"form-item"
>
<el-input-number
v-model=
"axisForm.axisLabelFormatter.decimalCount"
:precision=
"0"
:min=
"0"
:max=
"10"
size=
"mini"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
<el-form-item
v-show=
"axisForm.axisLabelFormatter.type !== 'percent'"
:label=
"$t('chart.value_formatter_unit')"
class=
"form-item"
>
<el-select
v-model=
"axisForm.axisLabelFormatter.unit"
:placeholder=
"$t('chart.pls_select_field')"
size=
"mini"
@
change=
"changeYAxisStyle"
>
<el-option
v-for=
"item in unitList"
:key=
"item.value"
:label=
"$t('chart.' + item.name)"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('chart.value_formatter_suffix')"
class=
"form-item"
>
<el-input
v-model=
"axisForm.axisLabelFormatter.suffix"
size=
"mini"
clearable
:placeholder=
"$t('commons.input_content')"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
<el-form-item
:label=
"$t('chart.value_formatter_thousand_separator')"
class=
"form-item"
>
<el-checkbox
v-model=
"axisForm.axisLabelFormatter.thousandSeparator"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
</span>
</span>
</span>
</div>
</div>
</el-form>
</el-form>
...
@@ -90,6 +116,7 @@
...
@@ -90,6 +116,7 @@
<
script
>
<
script
>
import
{
COLOR_PANEL
,
DEFAULT_YAXIS_EXT_STYLE
}
from
'../../chart/chart'
import
{
COLOR_PANEL
,
DEFAULT_YAXIS_EXT_STYLE
}
from
'../../chart/chart'
import
{
formatterType
,
unitList
}
from
'@/views/chart/chart/formatter'
export
default
{
export
default
{
name
:
'YAxisExtSelectorAntV'
,
name
:
'YAxisExtSelectorAntV'
,
...
@@ -115,7 +142,9 @@ export default {
...
@@ -115,7 +142,9 @@ export default {
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_EXT_STYLE
)),
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_EXT_STYLE
)),
isSetting
:
false
,
isSetting
:
false
,
fontSize
:
[],
fontSize
:
[],
predefineColors
:
COLOR_PANEL
predefineColors
:
COLOR_PANEL
,
typeList
:
formatterType
,
unitList
:
unitList
}
}
},
},
watch
:
{
watch
:
{
...
@@ -153,6 +182,9 @@ export default {
...
@@ -153,6 +182,9 @@ export default {
if
(
!
this
.
axisForm
.
axisValue
)
{
if
(
!
this
.
axisForm
.
axisValue
)
{
this
.
axisForm
.
axisValue
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_EXT_STYLE
.
axisValue
))
this
.
axisForm
.
axisValue
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_EXT_STYLE
.
axisValue
))
}
}
if
(
!
this
.
axisForm
.
axisLabelFormatter
)
{
this
.
axisForm
.
axisLabelFormatter
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_EXT_STYLE
.
axisLabelFormatter
))
}
}
}
}
}
},
},
...
...
frontend/src/views/chart/components/component-style/YAxisSelector.vue
浏览文件 @
555de253
...
@@ -88,6 +88,32 @@
...
@@ -88,6 +88,32 @@
<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"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<span
v-show=
"chart.type && !chart.type.includes('horizontal')"
>
<el-form-item
:label=
"$t('chart.value_formatter_type')"
class=
"form-item"
>
<el-select
v-model=
"axisForm.axisLabelFormatter.type"
@
change=
"changeYAxisStyle"
>
<el-option
v-for=
"type in typeList"
:key=
"type.value"
:label=
"$t('chart.' + type.name)"
:value=
"type.value"
/>
</el-select>
</el-form-item>
<el-form-item
v-show=
"axisForm.axisLabelFormatter.type !== 'auto'"
:label=
"$t('chart.value_formatter_decimal_count')"
class=
"form-item"
>
<el-input-number
v-model=
"axisForm.axisLabelFormatter.decimalCount"
:precision=
"0"
:min=
"0"
:max=
"10"
size=
"mini"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
<el-form-item
v-show=
"axisForm.axisLabelFormatter.type !== 'percent'"
:label=
"$t('chart.value_formatter_unit')"
class=
"form-item"
>
<el-select
v-model=
"axisForm.axisLabelFormatter.unit"
:placeholder=
"$t('chart.pls_select_field')"
size=
"mini"
@
change=
"changeYAxisStyle"
>
<el-option
v-for=
"item in unitList"
:key=
"item.value"
:label=
"$t('chart.' + item.name)"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('chart.value_formatter_suffix')"
class=
"form-item"
>
<el-input
v-model=
"axisForm.axisLabelFormatter.suffix"
size=
"mini"
clearable
:placeholder=
"$t('commons.input_content')"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
<el-form-item
:label=
"$t('chart.value_formatter_thousand_separator')"
class=
"form-item"
>
<el-checkbox
v-model=
"axisForm.axisLabelFormatter.thousandSeparator"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
</span>
</span>
</span>
<el-divider
v-if=
"showProperty('axisLabel')"
/>
<el-divider
v-if=
"showProperty('axisLabel')"
/>
<el-form-item
v-show=
"showProperty('axisLabel')"
:label=
"$t('chart.content_formatter')"
class=
"form-item"
>
<el-form-item
v-show=
"showProperty('axisLabel')"
:label=
"$t('chart.content_formatter')"
class=
"form-item"
>
...
@@ -101,6 +127,7 @@
...
@@ -101,6 +127,7 @@
<
script
>
<
script
>
import
{
COLOR_PANEL
,
DEFAULT_YAXIS_STYLE
}
from
'../../chart/chart'
import
{
COLOR_PANEL
,
DEFAULT_YAXIS_STYLE
}
from
'../../chart/chart'
import
{
formatterType
,
unitList
}
from
'@/views/chart/chart/formatter'
export
default
{
export
default
{
name
:
'YAxisSelector'
,
name
:
'YAxisSelector'
,
...
@@ -126,7 +153,9 @@ export default {
...
@@ -126,7 +153,9 @@ export default {
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_STYLE
)),
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_STYLE
)),
isSetting
:
false
,
isSetting
:
false
,
fontSize
:
[],
fontSize
:
[],
predefineColors
:
COLOR_PANEL
predefineColors
:
COLOR_PANEL
,
typeList
:
formatterType
,
unitList
:
unitList
}
}
},
},
watch
:
{
watch
:
{
...
@@ -161,6 +190,9 @@ export default {
...
@@ -161,6 +190,9 @@ export default {
if
(
!
this
.
axisForm
.
axisValue
)
{
if
(
!
this
.
axisForm
.
axisValue
)
{
this
.
axisForm
.
axisValue
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_STYLE
.
axisValue
))
this
.
axisForm
.
axisValue
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_STYLE
.
axisValue
))
}
}
if
(
!
this
.
axisForm
.
axisLabelFormatter
)
{
this
.
axisForm
.
axisLabelFormatter
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_STYLE
.
axisLabelFormatter
))
}
}
}
}
}
},
},
...
...
frontend/src/views/chart/components/component-style/YAxisSelectorAntV.vue
浏览文件 @
555de253
...
@@ -92,6 +92,32 @@
...
@@ -92,6 +92,32 @@
<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"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<span
v-show=
"chart.type && !chart.type.includes('horizontal')"
>
<el-form-item
:label=
"$t('chart.value_formatter_type')"
class=
"form-item"
>
<el-select
v-model=
"axisForm.axisLabelFormatter.type"
@
change=
"changeYAxisStyle"
>
<el-option
v-for=
"type in typeList"
:key=
"type.value"
:label=
"$t('chart.' + type.name)"
:value=
"type.value"
/>
</el-select>
</el-form-item>
<el-form-item
v-show=
"axisForm.axisLabelFormatter.type !== 'auto'"
:label=
"$t('chart.value_formatter_decimal_count')"
class=
"form-item"
>
<el-input-number
v-model=
"axisForm.axisLabelFormatter.decimalCount"
:precision=
"0"
:min=
"0"
:max=
"10"
size=
"mini"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
<el-form-item
v-show=
"axisForm.axisLabelFormatter.type !== 'percent'"
:label=
"$t('chart.value_formatter_unit')"
class=
"form-item"
>
<el-select
v-model=
"axisForm.axisLabelFormatter.unit"
:placeholder=
"$t('chart.pls_select_field')"
size=
"mini"
@
change=
"changeYAxisStyle"
>
<el-option
v-for=
"item in unitList"
:key=
"item.value"
:label=
"$t('chart.' + item.name)"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('chart.value_formatter_suffix')"
class=
"form-item"
>
<el-input
v-model=
"axisForm.axisLabelFormatter.suffix"
size=
"mini"
clearable
:placeholder=
"$t('commons.input_content')"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
<el-form-item
:label=
"$t('chart.value_formatter_thousand_separator')"
class=
"form-item"
>
<el-checkbox
v-model=
"axisForm.axisLabelFormatter.thousandSeparator"
@
change=
"changeYAxisStyle"
/>
</el-form-item>
</span>
</span>
</span>
</div>
</div>
</el-form>
</el-form>
...
@@ -101,6 +127,7 @@
...
@@ -101,6 +127,7 @@
<
script
>
<
script
>
import
{
COLOR_PANEL
,
DEFAULT_YAXIS_STYLE
}
from
'../../chart/chart'
import
{
COLOR_PANEL
,
DEFAULT_YAXIS_STYLE
}
from
'../../chart/chart'
import
{
formatterType
,
unitList
}
from
'@/views/chart/chart/formatter'
export
default
{
export
default
{
name
:
'YAxisSelectorAntV'
,
name
:
'YAxisSelectorAntV'
,
...
@@ -126,7 +153,9 @@ export default {
...
@@ -126,7 +153,9 @@ export default {
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_STYLE
)),
axisForm
:
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_STYLE
)),
isSetting
:
false
,
isSetting
:
false
,
fontSize
:
[],
fontSize
:
[],
predefineColors
:
COLOR_PANEL
predefineColors
:
COLOR_PANEL
,
typeList
:
formatterType
,
unitList
:
unitList
}
}
},
},
watch
:
{
watch
:
{
...
@@ -161,6 +190,9 @@ export default {
...
@@ -161,6 +190,9 @@ export default {
if
(
!
this
.
axisForm
.
axisValue
)
{
if
(
!
this
.
axisForm
.
axisValue
)
{
this
.
axisForm
.
axisValue
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_STYLE
.
axisValue
))
this
.
axisForm
.
axisValue
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_STYLE
.
axisValue
))
}
}
if
(
!
this
.
axisForm
.
axisLabelFormatter
)
{
this
.
axisForm
.
axisLabelFormatter
=
JSON
.
parse
(
JSON
.
stringify
(
DEFAULT_YAXIS_STYLE
.
axisLabelFormatter
))
}
}
}
}
}
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论