feat(视图): 漏斗图配置调整

This commit is contained in:
junjie 2021-03-18 17:55:28 +08:00
parent f891dc5aca
commit a83864e13d
3 changed files with 3 additions and 2 deletions

View File

@ -94,7 +94,7 @@ export const BASE_FUNNEL = {
{
name: '',
type: 'funnel',
left: '10%',
left: 'center',
top: 60,
bottom: 60,
width: '80%',

View File

@ -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],

View File

@ -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) {