fix (graphs.graph-builder) destroys the legend
fix (graph-builder.spec) adds tests for legend and stats