title: Extension for chart.js 2.X
body: <p>I have used the chart.js 1.0.2 without knowing that a version 2+ arrived. Now I need fuctionallity only available in 2+
  Meanwhile i have written several extensions to the chart.js 1.0.2 that i would like to convert to version 2+.</p>
  
  <pre><code>Chart.types.Doughnut.extend(
    {
      name: "DoughnutWithText",
  
      draw: function() {
        Chart.types.Doughnut.prototype.draw.apply(this, arguments);
  
        width = this.chart.width,
        height = this.chart.height;
  
        var fontSize = (height / this.options.textScale).toFixed(2);
        this.chart.ctx.font = fontSize + "em Lato";
        this.chart.ctx.textBaseline = "middle";
        this.chart.ctx.fillStyle="#000";
  
        textX = Math.round((width - this.chart.ctx.measureText(this.options.doughnutText).width) / 2),
        textY = height / 2;
        this.chart.ctx.fillText(this.options.doughnutText, textX, textY);
      }
    });
  </code></pre>
  
  <p>How do I do do this in version 2+?</p>
  
  <p><a href="https://jsfiddle.net/64106xh8/1/" rel="nofollow">https://jsfiddle.net/64106xh8/1/</a></p>