Broken graphs (division by zero)

Anonymous
2011-07-21
2013-04-24

  • Anonymous
    2011-07-21

    Without digging too deep into the graphing logic (graph.php) it became apparent that charts containing maximum bandwidth values lower than a certain amount cause $YMax to = 0. When this happens and the chart parameters are calculated, a division by $YMax occurs which causes the obvious division by zero exception.

    Once I added the following line (around line 168) it not only fixed the broken graph problem, but displayed reasonable graphs for my addresses with low bandwidth consumption. I suggest getting this into the next release.

    $YMax = ($YMax==0) ? 1 : $YMax;

    -Ryan