forked from github/dataease
feat(视图): 漏斗图配置调整
This commit is contained in:
parent
f891dc5aca
commit
a83864e13d
@ -94,7 +94,7 @@ export const BASE_FUNNEL = {
|
||||
{
|
||||
name: '',
|
||||
type: 'funnel',
|
||||
left: '10%',
|
||||
left: 'center',
|
||||
top: 60,
|
||||
bottom: 60,
|
||||
width: '80%',
|
||||
|
@ -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],
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user