Improved colour transition for pie chart
Fixes JS component for #1