Skip to content

Instantly share code, notes, and snippets.

@zchking
Created October 10, 2021 03:39
Show Gist options
  • Save zchking/5aa6f6dc9475d27bde0089abcf1be7c7 to your computer and use it in GitHub Desktop.
Save zchking/5aa6f6dc9475d27bde0089abcf1be7c7 to your computer and use it in GitHub Desktop.
better echats funnel chart options
option = {
title: {
text: '受访者省份分布',
left: 'left',
top: 'bottom'
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c}%'
},
toolbox: {
show: true,
orient: 'vertical',
top: 'center',
feature: {
dataView: { readOnly: false },
restore: {},
saveAsImage: {}
}
},
series: [
{
name: ' Province',
type: 'funnel',
width: '80%',
sort: 'ascending',
left: '10%',
width: '75%',
min: 0,
max: 100,
minSize: '0%',
maxSize: '100%',
sort: 'descending',
label: {
formatter: '{b}: {c}人'
},
gap: 2,
data: [
{ value: 2793, name: '广东' },
{ value: 178, name: '北京' },
{ value: 75, name: '湖北' },
{ value: 55, name: '湖南' },
{ value: 27, name: '辽宁' },
{ value: 25, name: '江苏' },
{ value: 18, name: '山西' },
{ value: 18, name: '上海' },
{ value: 17, name: '山东' },
{ value: 16, name: '黑龙江' },
{ value: 15, name: '河南' },
{ value: 13, name: '陕西' },
{ value: 12, name: '安徽' },
{ value: 12, name: '福建' },
{ value: 11, name: '广西' },
{ value: 11, name: '四川' },
{ value: 11, name: '浙江' },
{ value: 10, name: '河北' },
{ value: 10, name: '天津' },
{ value: 6, name: '贵州' },
{ value: 5, name: '吉林' },
{ value: 5, name: '内蒙古' },
{ value: 3, name: '海南' },
{ value: 3, name: '江西' },
{ value: 3, name: '香港' },
{ value: 3, name: '云南' },
{ value: 3, name: '重庆' },
{ value: 1, name: '澳门' },
{ value: 1, name: '海外' },
{ value: 1, name: '其他' },
{ value: 1, name: '新疆' }
]
}
]
};
@zchking
Copy link
Author

zchking commented Oct 10, 2021

效果图如下

funnel-align

@zchking
Copy link
Author

zchking commented Oct 10, 2021

效果图2

受访者省份分布 (2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment