add support for use in xml layouts.

Not quite satisfied with the LineGraphView constructor.