fix division by zero errors in all graph types

these happened when data series were empty or contained only zero values
Merge pull request #7 from nonicknamewasleftforme/master

fix division by zero errors in all graph types