We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Format leader line distance from plot area is not looking good

Hi.
On chart Goughnut, we need the label outside the chart area.
The format leader line (the line that connect the label with the plot Area)
change on a very bad way when change the data of the chart.
And on extreme data input on the chart, it look really bad the label and the line.
On the document we need to show the data label and the leader line on a good view way.
There is some code on Aspose Java for this or exist a way for doing this?
We use Aspose Word Linq Java.
Thx

Chart.docx (52.9 KB)

@caiupi,
Please note that Aspose.Words mimics the behavior of MS Word. The format of leader lines will look the same on the same chart, created manually in MS Word. As a rude workaround you can change the size of a chart to values, where width is bigger then height:

Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
shape.setWidth(600);
shape.setHeight(200);

If it possible in your case, you can also change the position of data labels manually by dragging it further from chart using MS Word.

@sergey.lobanov The data for the chart is comming from Java using engine.buildReport. The template of the document is a Word+Linq mix. It will be an automated word and we need a good quality looking for Leader Line. The idea is if i can access the Goughtnut chart and move the label using java.
Something
like this https://docs.aspose.com/cells/java/creating-pie-chart-with-leader-lines/
but in Word.
You think that is possible to do? Maybe exist some documentation for doing without rude workaround?

Thank You on advance

@caiupi,
Unfortunately, Aspose.Words does not support the requested feature of changing data label’s position at the moment. This feature request is already logged as WORDSNET-18974 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

We have the cell license too. Is there any way to implement the function?
Thx

@caiupi Aspose.Words and Aspose.Cells are different products.
Could you please attach your template here for testing? We will check the issue once again and provide you more information. I think in your case, to keep good look of data labels, it would be better to keep automatic data labels position and let MS Word decide where to show data label. In the document you have attached data labels have manually adjusted positions.