Added legend to graph. Support numeric legends.