Added option to calculate percentages relative to parent count

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