added method for setting options, labels and drawing chart