Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Echarts 中堆叠柱状图,只显示总数的解决方法,仅供参考 #2

Open
qiuwww opened this issue May 27, 2017 · 2 comments

Comments

@qiuwww
Copy link
Owner

qiuwww commented May 27, 2017

基本思路

  1. 添加一组总数数据,总数需要自己计算好,然后设置显示柱状图的显示颜色为图表的背景色,显示位置是在"insideBottomLeft", 字体颜色为白色#e4e4e4;
  2. 检测到点击legend事件之后重新计算总数,设置坐标系最大值,代码部分被压缩过,看着有些麻烦。
    代码地址:https://github.com/qiuwww/blog/blob/c19e48c6b2bba53ed2d285c5f605c15cf37047c0/16.具体场景解决方案/html示例demo/Echarts-demo/moreBarTotleNumber.html
    _20170527152243
    _20170527152307
    预览页面:
    http://htmlpreview.github.io/?https://github.com/qiuwww/blog/blob/c19e48c6b2bba53ed2d285c5f605c15cf37047c0/16.具体场景解决方案/html示例demo/Echarts-demo/moreBarTotleNumber.html
@WeLinkOn
Copy link

very helpful, thank you.

@panhow
Copy link

panhow commented Jan 3, 2020

其他柱子会被压的很小..这个解决了么

@github-staff github-staff deleted a comment from rokityeob May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants