Created
October 10, 2021 03:39
-
-
Save zchking/5aa6f6dc9475d27bde0089abcf1be7c7 to your computer and use it in GitHub Desktop.
better echats funnel chart options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '新疆' } | |
] | |
} | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
效果图如下