Published in : 2022-02-27
I am using the PrimeNg library to show statistics for my client's application data.
Let's say, I have 3 entities (legends) to show on the pie chart. I can give fix color codes in hex like ('#3366CC', '#DC3912', '#FF9900'), so it will render 3 colors for different percentages of the pie portion.
I am trying to show number of records with different colors, with respective percentage of portion dynamically, so let's say - I have 4 or 8 or 15 number of legends to show, How do I manage colors?
Issue: It takes same color that I gave in the color format. For more legends, it should show different colors?
How do I fix this issue to show a pie chart with multiple colors?
Join our community and get the chance to solve your code issues & share your opinion with usSign up Now