PieChart.Resources resources) {
super(container, data);
// We want our wrapping container to size to the contents.
getElement().getStyle().setProperty("display", "inline-block");
this.resources = resources;
canvas = new Canvas(CANVAS_COORD_SIZE, CANVAS_COORD_SIZE);
getElement().appendChild(canvas.getElement());
canvas.getElement().setClassName(resources.pieChartCss().pieChart());
canvas.setStrokeStyle(Color.MIDNIGHT_BLUE);
canvas.setLineWidth(1.0);