Implemented ChartWidget, which allows to dynamically choose the function to draw