title: Adding HTML label to Highcharts
body: <p>I've seen the <a href="http://api.highcharts.com/highcharts#labels.items.html" rel="nofollow noreferrer">HighCharts Docs</a>, and have also <a href="https://stackoverflow.com/a/14842123/3191820">read this answer</a>, but I don't know how to add HTML to the labels. I am trying to create a donut chart with the sum of the values in the middle.</p>
  <p>For some reason, this works (<strong>Example A</strong>):</p>
  <pre><code>var text = this.name + '&lt;br&gt;' + this.y ;
  var chart = this.series.chart;
  if (!chart.lbl) {
      chart.lbl = chart.renderer.label(text, 140, 110)
          .css({
              fontSize: '22pt',
              textAlign: 'center'
          })
          .add();
  } else {
      chart.lbl.attr({
          text: text
      });
  }
  </code></pre>
  <p>But this does not (<strong>Example B</strong>):</p>
  <pre><code>var text = '&lt;div&gt;&lt;h2&gt;' + this.name + '&lt;/h2&gt;&lt;p&gt;' + this.y + '&lt;/p&gt;&lt;/div&gt;';
  var chart = this.series.chart;
  if (!chart.lbl) {
      chart.lbl = chart.renderer.label(text, 140, 110)
          .css({
              fontSize: '22pt',
              textAlign: 'center'
          })
          .add();
  } else {
      chart.lbl.attr({
          text: text
      });
  }
  </code></pre>
  <p>I've tried setting <code>useHTML</code> to true:</p>
  <pre><code>var chartOptions = {
      chart: { ... },
      labels: {
          useHTML: true,
      }
      ...
  }
  </code></pre>
  <p>But to no avail. Also, the reason <strong>Example A</strong> &quot;works&quot; is that it's creating multiple <code>&lt;tspan&gt;</code> elements. Here's the inspect-element on the result from <strong>Example A</strong>:</p>
  <pre><code>&lt;tspan&gt;Pie 2&lt;/tspan&gt;
  &lt;tspan&gt;100&lt;/tspan&gt;
  </code></pre>
  <p>I'd really prefer to get this to use HTML if possible, since that's just easier to style for me, but I <em>also</em> need this to be part of the chart, since I need it to interact and change with the chart.</p>
  <h3>EDIT:</h3>
  <p><a href="http://jsfiddle.net/8g9L5e3q/2/" rel="nofollow noreferrer">Here's the fiddle</a>. Click on any of the pie slices to see the effect I'm trying to achieve.</p>