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

Labels not shown in pie chart #619

Closed pantonis closed 7 years ago

pantonis commented 7 years ago

I'm submitting a ... (check one with "x")

[X ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior When having ten values but some of them are really smaller than the higher ones labels are not being drawn. Chartjs functionality here is the best. Is this supported in ngx-charts where you click on an item on the legend and only selected are drawn? https://plnkr.co/edit/6VDMMAOtLQQgfZJtEx8Z?p=preview

Expected behavior Labels should be shown or chart should be redrawed

Reproduction of the problem https://plnkr.co/edit/sP4wDsbeBriSRpz2rynI?p=preview

What is the motivation / use case for changing the behavior? BUG

Please tell us about your environment:

WIndows 10, Vs Code. npm, angular-cli

marjan-georgiev commented 7 years ago

Yes, this is by design. Items below a certain threshold do not have labels in order to prevent label overlap.

We do not currently have filtering items based on legend clicking built into the charts. You could probably do this outside of the chart by building a custom legend and modifying the data input.