Added option to calculate percentages relative to parents rather than entire dataset

The previous calculation only allowed for percentages relative to the overall count. In some cases this is confusing when interpreting the visualisation.