Slightly more coherent table structure... svg elements still don't render correctly but *ought* to be embedded in the table.
Fix for output of legend data