Compilation errors when drawing a piechart using d3.js and TypeScript
问题 I am attempting to draw a pie chart using the d3.js library and TypeScript. I have the following code: "use strict"; module Chart { export class chart { private chart: d3.Selection<string>; private width: number; private height: number; private radius: number; private donutWidth: number; private dataset: { label: string, count: number }[]; private color: d3.scale.Ordinal<string, string>; constructor(container: any) { this.width = 360; this.height = 360; this.radius = Math.min(this.width, this