Merge pull request #994 from dataease/pr@dev@feat_waterfall

feat:瀑布图
This commit is contained in:
XiaJunjie2020 2021-10-21 11:37:33 +08:00 committed by GitHub
commit bf32ef6174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -16,9 +16,14 @@ export function baseWaterfallOptionAntV(plot, container, chart, action) {
const label = getLabel(chart)
const tooltip = getTooltip(chart)
// style
const legend = getLegend(chart)
// const legend = getLegend(chart)
const xAxis = getXAxis(chart)
const yAxis = getYAxis(chart)
// fix yAxis
yAxis.min = yAxis.minLimit
yAxis.max = yAxis.maxLimit
delete yAxis.minLimit
delete yAxis.maxLimit
// data
const data = chart.data.datas
// total
@ -67,7 +72,7 @@ export function baseWaterfallOptionAntV(plot, container, chart, action) {
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' }],

View File

@ -385,11 +385,11 @@
<el-row>
<span class="padding-lr">{{ $t('chart.module_style') }}</span>
<el-collapse v-model="styleActiveNames" class="style-collapse">
<el-collapse-item v-show="view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'chart-mix')" name="xAxis" :title="$t('chart.xAxis')">
<el-collapse-item v-show="view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'chart-mix' || view.type === 'waterfall')" name="xAxis" :title="$t('chart.xAxis')">
<x-axis-selector v-if="view.render && view.render === 'echarts'" :param="param" class="attr-selector" :chart="chart" @onChangeXAxisForm="onChangeXAxisForm" />
<x-axis-selector-ant-v v-else-if="view.render && view.render === 'antv'" :param="param" class="attr-selector" :chart="chart" @onChangeXAxisForm="onChangeXAxisForm" />
</el-collapse-item>
<el-collapse-item v-show="view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'chart-mix')" name="yAxis" :title="view.type === 'chart-mix' ? $t('chart.yAxis_main') : $t('chart.yAxis')">
<el-collapse-item v-show="view.type && (view.type.includes('bar') || view.type.includes('line') || view.type.includes('scatter') || view.type === 'chart-mix' || view.type === 'waterfall')" name="yAxis" :title="view.type === 'chart-mix' ? $t('chart.yAxis_main') : $t('chart.yAxis')">
<y-axis-selector v-if="view.render && view.render === 'echarts'" :param="param" class="attr-selector" :chart="chart" @onChangeYAxisForm="onChangeYAxisForm" />
<y-axis-selector-ant-v v-else-if="view.render && view.render === 'antv'" :param="param" class="attr-selector" :chart="chart" @onChangeYAxisForm="onChangeYAxisForm" />
</el-collapse-item>