[IMP]Improved widget for graph,added doc string in all method,improved code as par tde suggestion.