Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
50d27e1f
Unverified
提交
50d27e1f
authored
9月 01, 2021
作者:
XiaJunjie2020
提交者:
GitHub
9月 01, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #738 from dataease/pr@dev@feat_chart_mix
feat: 视图增加组合图;折线面积优化
上级
58a607ed
7a3efa68
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
73 行增加
和
6 行删除
+73
-6
chart.js
frontend/src/views/chart/chart/chart.js
+57
-0
line.js
frontend/src/views/chart/chart/line/line.js
+6
-2
mix.js
frontend/src/views/chart/chart/mix/mix.js
+6
-2
ChartComponent.vue
frontend/src/views/chart/components/ChartComponent.vue
+4
-2
没有找到文件。
frontend/src/views/chart/chart/chart.js
浏览文件 @
50d27e1f
...
...
@@ -736,3 +736,60 @@ export const BASE_TREEMAP = {
}
]
}
export
const
BASE_MIX
=
{
title
:
{
text
:
''
,
textStyle
:
{
fontWeight
:
'normal'
}
},
grid
:
{
containLabel
:
true
},
tooltip
:
{},
legend
:
{
show
:
true
,
type
:
'scroll'
,
itemWidth
:
10
,
itemHeight
:
10
,
icon
:
'rect'
,
data
:
[]
},
xAxis
:
{
data
:
[]
},
yAxis
:
{
type
:
'value'
},
series
:
[],
dataZoom
:
[
{
type
:
'slider'
,
show
:
false
,
xAxisIndex
:
[
0
],
start
:
0
,
end
:
100
},
{
type
:
'slider'
,
show
:
false
,
yAxisIndex
:
[
0
],
left
:
'93%'
,
start
:
0
,
end
:
100
},
{
type
:
'inside'
,
xAxisIndex
:
[
0
],
start
:
0
,
end
:
100
},
{
type
:
'inside'
,
yAxisIndex
:
[
0
],
start
:
0
,
end
:
100
}
]
}
frontend/src/views/chart/chart/line/line.js
浏览文件 @
50d27e1f
...
...
@@ -36,8 +36,12 @@ export function baseLineOption(chart_option, chart) {
type
:
customAttr
.
size
.
lineType
}
y
.
smooth
=
customAttr
.
size
.
lineSmooth
y
.
areaStyle
=
{
opacity
:
customAttr
.
size
.
lineArea
?
0.6
:
0
if
(
customAttr
.
size
.
lineArea
)
{
y
.
areaStyle
=
{
opacity
:
0.6
}
}
else
{
delete
y
.
areaStyle
}
}
// label
...
...
frontend/src/views/chart/chart/mix/mix.js
浏览文件 @
50d27e1f
...
...
@@ -49,8 +49,12 @@ export function baseMixOption(chart_option, chart) {
type
:
customAttr
.
size
.
lineType
}
y
.
smooth
=
customAttr
.
size
.
lineSmooth
y
.
areaStyle
=
{
opacity
:
customAttr
.
size
.
lineArea
?
0.6
:
0
if
(
customAttr
.
size
.
lineArea
)
{
y
.
areaStyle
=
{
opacity
:
0.6
}
}
else
{
delete
y
.
areaStyle
}
}
// scatter
...
...
frontend/src/views/chart/components/ChartComponent.vue
浏览文件 @
50d27e1f
...
...
@@ -16,7 +16,8 @@ import {
BASE_GAUGE
,
BASE_MAP
,
BASE_SCATTER
,
BASE_TREEMAP
BASE_TREEMAP
,
BASE_MIX
}
from
'../chart/chart'
import
{
baseBarOption
,
stackBarOption
,
horizontalBarOption
,
horizontalStackBarOption
}
from
'../chart/bar/bar'
import
{
baseLineOption
,
stackLineOption
}
from
'../chart/line/line'
...
...
@@ -152,8 +153,9 @@ export default {
}
else
if
(
chart
.
type
===
'treemap'
)
{
chart_option
=
baseTreemapOption
(
JSON
.
parse
(
JSON
.
stringify
(
BASE_TREEMAP
)),
chart
)
}
else
if
(
chart
.
type
===
'chart-mix'
)
{
chart_option
=
baseMixOption
(
JSON
.
parse
(
JSON
.
stringify
(
BASE_
BAR
)),
chart
)
chart_option
=
baseMixOption
(
JSON
.
parse
(
JSON
.
stringify
(
BASE_
MIX
)),
chart
)
}
console
.
log
(
JSON
.
stringify
(
chart_option
))
if
(
chart
.
type
===
'map'
)
{
const
customAttr
=
JSON
.
parse
(
chart
.
customAttr
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论