added -t option for chart type