canvas tag based pie chart class for Javascript