Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
1abfbef7
提交
1abfbef7
authored
10月 21, 2021
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:瀑布图
上级
9ce51923
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
124 行增加
和
13 行删除
+124
-13
waterfall.svg
frontend/src/icons/svg/waterfall.svg
+1
-0
en.js
frontend/src/lang/en.js
+2
-1
tw.js
frontend/src/lang/tw.js
+2
-1
zh.js
frontend/src/lang/zh.js
+2
-1
waterfall.js
frontend/src/views/chart/chart/waterfall/waterfall.js
+100
-0
ChartComponentG2.vue
frontend/src/views/chart/components/ChartComponentG2.vue
+3
-0
SizeSelectorAntV.vue
...rc/views/chart/components/shape-attr/SizeSelectorAntV.vue
+1
-1
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+5
-5
ChartType.vue
frontend/src/views/chart/view/ChartType.vue
+7
-3
FieldEdit.vue
frontend/src/views/dataset/data/FieldEdit.vue
+1
-1
没有找到文件。
frontend/src/icons/svg/waterfall.svg
0 → 100644
浏览文件 @
1abfbef7
<svg
t=
"1631170441004"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"826"
width=
"200"
height=
"200"
><path
d=
"M64 104.1c0-1.3 0.5-2.6 1.5-3.6s2.3-1.5 3.6-1.5H101c1.3 0 2.6 0.5 3.6 1.5s1.5 2.3 1.5 3.6V883H955c1.3 0 2.6 0.5 3.6 1.5s1.5 2.3 1.5 3.6V920c0 1.3-0.5 2.6-1.5 3.6s-2.3 1.5-3.6 1.5H64v-821z"
p-id=
"827"
></path><path
d=
"M524.9 640.7H387c-8.3 0-15-6.7-15-15V300.3c0-8.3 6.7-15 15-15h137.9c8.3 0 15 6.7 15 15v325.3c0 8.3-6.7 15.1-15 15.1zM314.9 827H177c-8.3 0-15-6.7-15-15V300.3c0-8.3 6.7-15 15-15h137.9c8.3 0 15 6.7 15 15V812c0 8.3-6.7 15-15 15zM734.9 640.7H597c-8.3 0-15-6.7-15-15V114c0-8.3 6.7-15 15-15h137.9c8.3 0 15 6.7 15 15v511.7c0 8.2-6.7 15-15 15zM944.9 463H807c-8.3 0-15-6.7-15-15V104.2c0-8.3 6.7-15 15-15h137.9c8.3 0 15 6.7 15 15V448c0 8.3-6.7 15-15 15z"
p-id=
"828"
></path></svg>
frontend/src/lang/en.js
浏览文件 @
1abfbef7
...
...
@@ -932,7 +932,8 @@ export default {
liquid_shape_pin
:
'Pin'
,
liquid_shape_rect
:
'Rect'
,
dimension_or_quota
:
'Dimension Or Quota'
,
axis_value_split_count
:
'Tick Count'
axis_value_split_count
:
'Tick Count'
,
chart_waterfall
:
'Waterfall'
},
dataset
:
{
sheet_warn
:
'There are multiple sheet pages, and the first one is extracted by default'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
1abfbef7
...
...
@@ -933,7 +933,8 @@ export default {
liquid_shape_pin
:
'氣球'
,
liquid_shape_rect
:
'矩形'
,
dimension_or_quota
:
'維度或指標'
,
axis_value_split_count
:
'刻度數'
axis_value_split_count
:
'刻度數'
,
chart_waterfall
:
'瀑布圖'
},
dataset
:
{
sheet_warn
:
'有多個 Sheet 頁,默認抽取第一個'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
1abfbef7
...
...
@@ -933,7 +933,8 @@ export default {
liquid_shape_pin
:
'气球'
,
liquid_shape_rect
:
'矩形'
,
dimension_or_quota
:
'维度或指标'
,
axis_value_split_count
:
'刻度数'
axis_value_split_count
:
'刻度数'
,
chart_waterfall
:
'瀑布图'
},
dataset
:
{
sheet_warn
:
'有多个 Sheet 页,默认抽取第一个'
,
...
...
frontend/src/views/chart/chart/waterfall/waterfall.js
0 → 100644
浏览文件 @
1abfbef7
import
{
getLabel
,
getLegend
,
getPadding
,
getTheme
,
getTooltip
,
getXAxis
,
getYAxis
}
from
'@/views/chart/chart/common/common_antv'
import
{
Waterfall
}
from
'@antv/g2plot'
export
function
baseWaterfallOptionAntV
(
plot
,
container
,
chart
,
action
)
{
// theme
const
theme
=
getTheme
(
chart
)
// attr
const
label
=
getLabel
(
chart
)
const
tooltip
=
getTooltip
(
chart
)
// style
const
legend
=
getLegend
(
chart
)
const
xAxis
=
getXAxis
(
chart
)
const
yAxis
=
getYAxis
(
chart
)
// data
const
data
=
chart
.
data
.
datas
// total
const
total
=
{
label
:
'合计'
,
style
:
{
fill
:
theme
.
styleSheet
.
paletteQualitative10
[
2
]
}
}
// options
const
options
=
{
theme
:
theme
,
data
:
data
,
xField
:
'field'
,
yField
:
'value'
,
seriesField
:
'category'
,
appendPadding
:
getPadding
(
chart
),
label
:
label
,
tooltip
:
tooltip
,
legend
:
false
,
xAxis
:
xAxis
,
yAxis
:
yAxis
,
risingFill
:
theme
.
styleSheet
.
paletteQualitative10
[
0
],
fallingFill
:
theme
.
styleSheet
.
paletteQualitative10
[
1
],
total
:
total
,
interactions
:
[
{
type
:
'element-active'
,
cfg
:
{
start
:
[{
trigger
:
'element:mouseenter'
,
action
:
[
'element-highlight:highlight'
,
'element-active:reset'
,
'cursor:pointer'
]
}],
end
:
[{
trigger
:
'element:mouseleave'
,
action
:
[
'element-highlight:reset'
,
'element-active:reset'
,
'cursor:default'
]
}]
}
},
// {
// type: 'legend-active', cfg: {
// start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],
// end: [{ trigger: 'legend-item:mouseleave', action: ['element-active:reset'] }]
// }
// },
// {
// type: 'legend-filter', cfg: {
// start: [{ trigger: 'legend-item:click', action: ['list-unchecked:toggle', 'data-filter:filter', 'element-active:reset', 'element-highlight:reset'] }]
// }
// },
{
type
:
'tooltip'
,
cfg
:
{
start
:
[{
trigger
:
'interval:mousemove'
,
action
:
'tooltip:show'
}],
end
:
[{
trigger
:
'interval:mouseleave'
,
action
:
'tooltip:hide'
}]
}
},
// {
// type: 'active-region', cfg: {
// start: [{ trigger: 'interval:mousemove', action: 'active-region:show' }],
// end: [{ trigger: 'interval:mouseleave', action: 'active-region:hide' }]
// }
// }
]
}
// size
let
customAttr
=
{}
if
(
chart
.
customAttr
)
{
customAttr
=
JSON
.
parse
(
chart
.
customAttr
)
if
(
customAttr
.
size
)
{
const
s
=
JSON
.
parse
(
JSON
.
stringify
(
customAttr
.
size
))
if
(
s
.
barDefault
)
{
delete
options
.
marginRatio
}
else
{
options
.
marginRatio
=
s
.
barGap
}
}
}
// 开始渲染
if
(
plot
)
{
plot
.
destroy
()
}
plot
=
new
Waterfall
(
container
,
options
)
return
plot
}
frontend/src/views/chart/components/ChartComponentG2.vue
浏览文件 @
1abfbef7
...
...
@@ -22,6 +22,7 @@ import { baseGaugeOptionAntV } from '@/views/chart/chart/gauge/gauge_antv'
import
{
baseFunnelOptionAntV
}
from
'@/views/chart/chart/funnel/funnel_antv'
import
{
baseTreemapOptionAntV
}
from
'@/views/chart/chart/treemap/treemap_antv'
import
{
baseRadarOptionAntV
}
from
'@/views/chart/chart/radar/radar_antv'
import
{
baseWaterfallOptionAntV
}
from
'@/views/chart/chart/waterfall/waterfall'
export
default
{
name
:
'ChartComponentG2'
,
...
...
@@ -158,6 +159,8 @@ export default {
this
.
myChart
=
baseTreemapOptionAntV
(
this
.
myChart
,
this
.
chartId
,
chart
,
this
.
antVAction
)
}
else
if
(
chart
.
type
===
'liquid'
)
{
this
.
myChart
=
baseLiquid
(
this
.
myChart
,
this
.
chartId
,
chart
)
}
else
if
(
chart
.
type
===
'waterfall'
)
{
this
.
myChart
=
baseWaterfallOptionAntV
(
this
.
myChart
,
this
.
chartId
,
chart
,
this
.
antVAction
)
}
else
{
if
(
this
.
myChart
)
{
this
.
antVRenderStatus
=
false
...
...
frontend/src/views/chart/components/shape-attr/SizeSelectorAntV.vue
浏览文件 @
1abfbef7
<
template
>
<div
style=
"width: 100%"
>
<el-col>
<el-form
v-show=
"chart.type &&
chart.type.includes('bar
')"
ref=
"sizeFormBar"
:disabled=
"param && !hasDataPermission('manage',param.privileges)"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
<el-form
v-show=
"chart.type &&
(chart.type.includes('bar') || chart.type === 'waterfall
')"
ref=
"sizeFormBar"
:disabled=
"param && !hasDataPermission('manage',param.privileges)"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
<el-form-item
:label=
"$t('chart.adapt')"
class=
"form-item"
>
<el-checkbox
v-model=
"sizeForm.barDefault"
@
change=
"changeBarSizeCase"
>
{{
$t
(
'chart.adapt'
)
}}
</el-checkbox>
</el-form-item>
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
1abfbef7
...
...
@@ -157,7 +157,7 @@
<el-row
v-if=
"view.type !=='text' && view.type !== 'gauge' && view.type !== 'liquid'"
class=
"padding-lr"
>
<span
style=
"width: 80px;text-align: right;"
>
<span
v-if=
"view.type && view.type.includes('table')"
>
{{
$t
(
'chart.drag_block_table_data_column'
)
}}
</span>
<span
v-else-if=
"view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'chart-mix')"
>
{{
$t
(
'chart.drag_block_type_axis'
)
}}
</span>
<span
v-else-if=
"view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'chart-mix'
|| view.type === 'waterfall'
)"
>
{{
$t
(
'chart.drag_block_type_axis'
)
}}
</span>
<span
v-else-if=
"view.type && view.type.includes('pie')"
>
{{
$t
(
'chart.drag_block_pie_label'
)
}}
</span>
<span
v-else-if=
"view.type && view.type.includes('funnel')"
>
{{
$t
(
'chart.drag_block_funnel_split'
)
}}
</span>
<span
v-else-if=
"view.type && view.type.includes('radar')"
>
{{
$t
(
'chart.drag_block_radar_label'
)
}}
</span>
...
...
@@ -188,7 +188,7 @@
<el-row
v-if=
"view.type !=='table-info'"
class=
"padding-lr"
style=
"margin-top: 6px;"
>
<span
style=
"width: 80px;text-align: right;"
>
<span
v-if=
"view.type && view.type.includes('table')"
>
{{
$t
(
'chart.drag_block_table_data_column'
)
}}
</span>
<span
v-else-if=
"view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter'))"
>
{{
$t
(
'chart.drag_block_value_axis'
)
}}
</span>
<span
v-else-if=
"view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter')
|| view.type === 'waterfall'
)"
>
{{
$t
(
'chart.drag_block_value_axis'
)
}}
</span>
<span
v-else-if=
"view.type && view.type.includes('pie')"
>
{{
$t
(
'chart.drag_block_pie_angel'
)
}}
</span>
<span
v-else-if=
"view.type && view.type.includes('funnel')"
>
{{
$t
(
'chart.drag_block_funnel_width'
)
}}
</span>
<span
v-else-if=
"view.type && view.type.includes('radar')"
>
{{
$t
(
'chart.drag_block_radar_length'
)
}}
</span>
...
...
@@ -321,7 +321,7 @@
<span
class=
"drag-placeholder-style-span"
>
{{
$t
(
'chart.placeholder_field'
)
}}
</span>
</div>
</el-row>
<el-row
v-if=
"view.type && !view.type.includes('table') && !view.type.includes('text') && !view.type.includes('gauge') && view.type !== 'liquid'"
class=
"padding-lr"
style=
"margin-top: 6px;"
>
<el-row
v-if=
"view.type && !view.type.includes('table') && !view.type.includes('text') && !view.type.includes('gauge') && view.type !== 'liquid'
&& view.type !== 'waterfall'
"
class=
"padding-lr"
style=
"margin-top: 6px;"
>
<span
style=
"width: 80px;text-align: right;"
>
<span>
{{
$t
(
'chart.drill'
)
}}
</span>
/
...
...
@@ -405,7 +405,7 @@
<title-selector
v-if=
"view.render && view.render === 'echarts'"
:param=
"param"
class=
"attr-selector"
:chart=
"chart"
@
onTextChange=
"onTextChange"
/>
<title-selector-ant-v
v-else-if=
"view.render && view.render === 'antv'"
:param=
"param"
class=
"attr-selector"
:chart=
"chart"
@
onTextChange=
"onTextChange"
/>
</el-collapse-item>
<el-collapse-item
v-show=
"view.type && view.type !== 'map' && !view.type.includes('table') && !view.type.includes('text') && (chart.type !== 'treemap' || chart.render === 'antv') && view.type !== 'liquid'"
name=
"legend"
:title=
"$t('chart.legend')"
>
<el-collapse-item
v-show=
"view.type && view.type !== 'map' && !view.type.includes('table') && !view.type.includes('text') && (chart.type !== 'treemap' || chart.render === 'antv') && view.type !== 'liquid'
&& view.type !== 'waterfall'
"
name=
"legend"
:title=
"$t('chart.legend')"
>
<legend-selector
v-if=
"view.render && view.render === 'echarts'"
:param=
"param"
class=
"attr-selector"
:chart=
"chart"
@
onLegendChange=
"onLegendChange"
/>
<legend-selector-ant-v
v-else-if=
"view.render && view.render === 'antv'"
:param=
"param"
class=
"attr-selector"
:chart=
"chart"
@
onLegendChange=
"onLegendChange"
/>
</el-collapse-item>
...
...
@@ -1339,7 +1339,7 @@ export default {
this
.
save
(
true
)
},
addYaxis
(
e
)
{
if
(
this
.
view
.
type
===
'map'
&&
this
.
view
.
yaxis
.
length
>
1
)
{
if
(
(
this
.
view
.
type
===
'map'
||
this
.
view
.
type
===
'waterfall'
)
&&
this
.
view
.
yaxis
.
length
>
1
)
{
this
.
view
.
yaxis
=
[
this
.
view
.
yaxis
[
0
]]
}
this
.
dragCheckType
(
this
.
view
.
yaxis
,
'q'
)
...
...
frontend/src/views/chart/view/ChartType.vue
浏览文件 @
1abfbef7
...
...
@@ -66,6 +66,11 @@
<!--
<svg-icon
icon-class=
"map"
class=
"chart-icon"
/>
-->
<!--
</span>
-->
<!--
</el-radio>
-->
<el-radio
value=
"waterfall"
label=
"waterfall"
>
<span
:title=
"$t('chart.chart_waterfall')"
>
<svg-icon
icon-class=
"waterfall"
class=
"chart-icon"
/>
</span>
</el-radio>
<el-radio
value=
"radar"
label=
"radar"
>
<span
:title=
"$t('chart.chart_radar')"
>
<svg-icon
icon-class=
"radar"
class=
"chart-icon"
/>
...
...
@@ -86,13 +91,13 @@
<svg-icon
icon-class=
"pie-rose"
class=
"chart-icon"
/>
</span>
</el-radio>
</div>
<div
style=
"width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;"
>
<el-radio
value=
"funnel"
label=
"funnel"
>
<span
:title=
"$t('chart.chart_funnel')"
>
<svg-icon
icon-class=
"funnel"
class=
"chart-icon"
/>
</span>
</el-radio>
</div>
<div
style=
"width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;"
>
<el-radio
value=
"treemap"
label=
"treemap"
>
<span
:title=
"$t('chart.chart_treemap')"
>
<svg-icon
icon-class=
"treemap"
class=
"chart-icon"
/>
...
...
@@ -105,7 +110,6 @@
</el-radio>
<el-radio
value=
""
label=
""
disabled
class=
"disabled-none-cursor"
><svg-icon
icon-class=
""
class=
"chart-icon"
/></el-radio>
<el-radio
value=
""
label=
""
disabled
class=
"disabled-none-cursor"
><svg-icon
icon-class=
""
class=
"chart-icon"
/></el-radio>
<el-radio
value=
""
label=
""
disabled
class=
"disabled-none-cursor"
><svg-icon
icon-class=
""
class=
"chart-icon"
/></el-radio>
</div>
</div>
<div
v-else-if=
"chart.render && chart.render === 'echarts'"
>
...
...
frontend/src/views/dataset/data/FieldEdit.vue
浏览文件 @
1abfbef7
...
...
@@ -310,7 +310,7 @@ export default {
const
that
=
this
setTimeout
(
function
()
{
const
currentHeight
=
document
.
documentElement
.
clientHeight
that
.
maxHeight
=
(
currentHeight
-
56
-
30
-
35
-
26
-
10
)
+
'px'
that
.
maxHeight
=
(
currentHeight
-
56
-
30
-
35
-
26
-
10
-
10
)
+
'px'
},
10
)
},
initField
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论