swimlane / ngx-charts

:bar_chart: Declarative Charting Framework for Angular
https://swimlane.github.io/ngx-charts/
MIT License
4.3k stars 1.15k forks source link

Possibility to hide bars with value set to 0 #1084

Open dnbo opened 5 years ago

dnbo commented 5 years ago

I'm submitting a ...

Current behavior When using a grouped vertical bar chart, there is alot of empty space when some groups have values set to 0. It should be possible to hide bars that have 0-values, like the composed image below. Note that the "Guerney" and "Oman" group are missing the purple bar since they are 0. In reality they would just show an empty blank space.

ngxchartsnestedgroups

Expected behavior Possibility to hide bars with 0-values.

Reproduction of the problem

What is the motivation / use case for changing the behavior? Get rid of large blank areas in chart.

zhangxin511 commented 5 years ago

I just opend a PR for this at https://github.com/swimlane/ngx-charts/pull/1086