Updated for simple chart.

@kbajey : we can remove print statement