modularize the linegraph to support small multiples