LightningWebChartJS
LightningWebChartJS copied to clipboard
Is this possible to configure ChartJS to work like Google Charts to display both absolute values and percentage of total and they display the value outside the pie so that it is more visible?
I was considering using Google Chart API for a pie chart since they provide an option to display both absolute values and percentage of total and they display the value outside the pie. Is this possible to configure ChartJS to work like Google Charts to display both absolute values and percentage of total and they display the value outside the pie so that it is more visible?
Does it require development or it is possible to achieve with configuration only?
I guess I could try to use tooltip callback to display percentage https://stackoverflow.com/questions/61953064/laravel-how-to-display-both-count-and-percentage-in-chartjs-pie-chart but how to display the value outside of the pie so it becomes visually distinguishable?
Hi @Patlatus !
Yep you nailed it, you will have to calculate them on your own, ChartJs will not does that for you. As explained in the link you found, you'll need to use the tooltip label callback.
We are exposing this callback so you can use LWCC to do that