extract the rendering code in ChartView

We need it for the IOpenGLRenderer interface.

Change-Id: Ic9f425b44c0efdd30956eba13ef03ba7179d35a4