Why does legend not appear when the first bar value is zero?
I would check the results you'd get by using either of these special settings in the SVG Graph library:


Use the (boolean) force_associate option.
Set the axis_min_v option to something like -1.


If none of these options help, you might have discovered "some issue" (bug?) in the SVG Graph library.

A possible work around might also be that you can think of a way to replace the "zero or null" with "NULL".