feat(graph.graph-builder) recalculate stats when data-state changes
test (graph-builder data.selection) adding tests for stats-recalculation
refactor(graph.graph component.legend) moving event-handling and updateDerivations to optimize