fix division by zero errors in all graph types

these happened when data series were empty or contained only zero values