diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js index 53142e5580..3a0e91698e 100644 --- a/frontend/src/views/chart/chart/chart.js +++ b/frontend/src/views/chart/chart/chart.js @@ -94,7 +94,7 @@ export const BASE_FUNNEL = { { name: '', type: 'funnel', - left: '10%', + left: 'center', top: 60, bottom: 60, width: '80%', diff --git a/frontend/src/views/chart/chart/funnel/funnel.js b/frontend/src/views/chart/chart/funnel/funnel.js index 639f58c36a..96bbcf9a96 100644 --- a/frontend/src/views/chart/chart/funnel/funnel.js +++ b/frontend/src/views/chart/chart/funnel/funnel.js @@ -15,6 +15,7 @@ export function baseFunnelOption(chart_option, chart) { if (chart.data.series.length > 0) { chart_option.series[0].name = chart.data.series[0].name const valueArr = chart.data.series[0].data + chart_option.series[0].max = Math.max.apply(Math, valueArr) for (let i = 0; i < valueArr.length; i++) { const y = { name: chart.data.x[i], diff --git a/frontend/src/views/chart/components/ChartComponent.vue b/frontend/src/views/chart/components/ChartComponent.vue index 8af9544824..fe4e9fffd8 100644 --- a/frontend/src/views/chart/components/ChartComponent.vue +++ b/frontend/src/views/chart/components/ChartComponent.vue @@ -53,7 +53,7 @@ export default { } else if (chart.type === 'funnel') { chart_option = baseFunnelOption(JSON.parse(JSON.stringify(BASE_FUNNEL)), chart) } - // console.log(chart_option); + console.log(chart_option) this.myEcharts(chart_option) }, myEcharts(option) {