WIP: Added comments
Multiple changes:

Added comments
Collected dimensions by the data declaration
Used the width in the first range setting
Reused the x, chart & bar variables instead of new
Added & used text_offset