Refactored code to use properties function to minimise duplicate code.
Refactored code. Need to work on reuseable charts.
Fixed shifting bars logic. D3 is so smahrt.
Oh D3...