分组柱状图同时设置maxColumnWidth和dodgePadding,柱子会重叠 #3645
Unanswered
whale-jung
asked this question in
Q&A
Replies: 1 comment 2 replies
-
![]() |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://riddle.alibaba-inc.com/riddles/new?code=%7B%22jsx%22%3A%22import%20%7B%20Column%20%7D%20from%20'%40antv%2Fg2plot'%3B%5Cn%5Cnconst%20data%20%3D%20%5B%5Cn%20%20%20%20%7B%5Cn%20%20%20%20%20%20%20%20%5C%22type%5C%22%3A%20%5C%22%E6%80%BB%E5%88%86%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%5C%22score%5C%22%3A%2076.76%2C%5Cn%20%20%20%20%20%20%20%20%5C%22model%5C%22%3A%20%5C%22type1%5C%22%5Cn%20%20%20%20%7D%2C%5Cn%20%20%20%20%7B%5Cn%20%20%20%20%20%20%20%20%5C%22type%5C%22%3A%20%5C%22%E5%88%86%E7%B1%BB%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%5C%22score%5C%22%3A%2062.93%2C%5Cn%20%20%20%20%20%20%20%20%5C%22model%5C%22%3A%20%5C%22type1%5C%22%5Cn%20%20%20%20%7D%2C%5Cn%20%20%20%20%7B%5Cn%20%20%20%20%20%20%20%20%5C%22type%5C%22%3A%20%5C%22%E6%80%BB%E5%88%86%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%5C%22score%5C%22%3A%2075.69%2C%5Cn%20%20%20%20%20%20%20%20%5C%22model%5C%22%3A%20%5C%22type2%5C%22%5Cn%20%20%20%20%7D%2C%5Cn%20%20%20%20%7B%5Cn%20%20%20%20%20%20%20%20%5C%22type%5C%22%3A%20%5C%22%E5%88%86%E7%B1%BB%5C%22%2C%5Cn%20%20%20%20%20%20%20%20%5C%22score%5C%22%3A%2065.75%2C%5Cn%20%20%20%20%20%20%20%20%5C%22model%5C%22%3A%20%5C%22type2%5C%22%5Cn%20%20%20%20%7D%2C%5Cn%5D%3B%5Cn%5Cnconst%20stackedColumnPlot%20%3D%20new%20Column('container'%2C%20%7B%5Cn%20%20data%2C%5Cn%20%20isGroup%3A%20true%2C%5Cn%20%20%20%20%20%20xField%3A%20'type'%2C%5Cn%20%20%20%20%20%20yField%3A%20'score'%2C%5Cn%20%20%20%20%20%20seriesField%3A%20'model'%2C%5Cn%20%20%20%20%20%20maxColumnWidth%3A%2060%2C%5Cn%20%20%20%20%20%20dodgePadding%3A%200%2C%5Cn%20%20%20%20%20%20tooltip%3A%20%7B%5Cn%20%20%20%20%20%20%20%20customItems%3A%20(val)%20%3D%3E%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20const%20itemList%20%3D%20val.sort((a%2C%20b)%20%3D%3E%20Number(b.value)%20-%20Number(a.value))%3B%5Cn%5Cn%20%20%20%20%20%20%20%20%20%20return%20itemList%3B%5Cn%20%20%20%20%20%20%20%20%7D%5Cn%20%20%20%20%20%20%7D%2C%5Cn%20%20%20%20%20%20legend%3A%20%7B%5Cn%20%20%20%20%20%20%20%20position%3A%20'top'%2C%5Cn%20%20%20%20%20%20%20%20flipPage%3A%20false%5Cn%20%20%20%20%20%20%7D%2C%5Cn%20%20%20%20%20%20theme%3A%20%7B%5Cn%20%20%20%20%20%20%20%20styleSheet%3A%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20backgroundColor%3A%20'%23fff'%5Cn%20%20%20%20%20%20%20%20%7D%5Cn%20%20%20%20%20%20%7D%2C%5Cn%20%20%20%20%20%20padding%3A%20%5B64%2C%208%2C%2032%2C%2032%5D%5Cn%7D)%3B%5Cn%5CnstackedColumnPlot.render()%3B%5Cn%22%2C%22css%22%3A%22%2F*%20%E6%AD%A4%E5%A4%84%E4%B9%A6%E5%86%99%E6%A0%B7%E5%BC%8F%E4%BB%A3%E7%A0%81%EF%BC%8C%E6%94%AF%E6%8C%81%20less%20css%20*%2F%5Cn%2F*%20%40import%20'antd%2Fdist%2Fantd.css'%3B%20*%2F%5Cn%22%2C%22html%22%3A%22%3Cdiv%20id%3D%5C%22container%5C%22%20%2F%3E%22%2C%22json%22%3A%22%7B%5C%22dependencies%5C%22%3A%7B%5C%22%40antv%2Fg2plot%5C%22%3A%5C%22latest%5C%22%7D%2C%5C%22devDependencies%5C%22%3A%7B%5C%22typescript%5C%22%3A%5C%22latest%5C%22%7D%7D%22%7D
Beta Was this translation helpful? Give feedback.
All reactions