title: Positioning labels on a donut-chart
body: <p>I have the following code which attempts to add a datalabel to a point in a combined donut/pie-chart:</p>
  
  <pre><code>    For Each co In .ChartObjects
          With co.Chart.FullSeriesCollection("Grøn pil").Points(2)
              .HasDataLabel = True
              With .DataLabel
                  .Position = xlLabelPositionOutsideEnd
                  .Format.AutoShapeType = msoShapeRectangle
                  .Format.Line.Visible = msoTrue
              End With
          End With
      Next co
  </code></pre>
  
  <p>However, the code aborts on the line <code>.Position = xlLabelPositionOutsideEnd</code> with the error message "Run-time error 2147467259 (80004005)". Method 'Position' of object 'DataLabel' failed".</p>
  
  <p>Looking at the chart, the label has been added, but it is still positioned inside the chart.</p>
  
  <p><a href="https://i.stack.imgur.com/wkArg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wkArg.png" alt="enter image description here"></a></p>
  
  <p>As you can see I've already positioned a label outside the chart for a different series, which is represented as a pie chart. While the series I am trying to add the label to is represented as a donut-chart.</p>
  
  <p>Can't I have both the labels for the donut- and pie-chart on the outside? Isn't <code>xlLabelPositionOutsideEnd</code> a valid position for labels of a donut-chart? Or is the problem something else which eludes me?</p>
  
  <p>Any help would be greatly appreciated!</p>