I'm trying to create a legend for my pie chart which includes the category and the %. I want it to look like something below
ABC 5%
ABDE 10%
CJDJD 85%
What I've attempted to try is by using a fixed length amount, i.e. 15 then I minus it from the length of the category. This figure is then used to add the required number of spaces before the percentages are added.
This however hasn't helped and the percentages are still out of alignment as each character length isn't the same. For example, you can have two words with the same amount of characters, but one word will take up more space than the other.
Does anyone know how I can workout around this.