Use text-anchor to position labels, calculate viewbox differently basesd on graph type.