Property Name For Resize Data Label Shape To Fit Text of Clustered Bar DataLabels

Hi Team,

My clustered bar datalabels are getting overlapped with bar.

When I checked in excel for the respective property then I have seen " Resize Shape To Fit Text " under Size & Properties tab of data label properties.

I want to use this property through code.

Can you tell me the method name that can be used for this.

Please find the attached images for this issue.

Regards,
Sanjeev

Hi Sanjeev,


Thank you for contacting Aspose support.

Please try using the ChartFrame.setAutomaticSize method, and pass true as parameter. In case you still face any difficulty, please share the spreadsheet containing the problematic chart so we could investigate the matter to assist you further in this regard.

Hi,

I have used the below lines of code as per your suggestion bu there is no change.

ChartFrame chartArea = sheet.getCharts().get(chartCount).getChartArea();
ChartFrame plotArea = sheet.getCharts().get(chartCount).getPlotArea();
chartArea.setAutomaticSize(true);
plotArea.setAutomaticSize(true);
dataLabels = sheet.getCharts().get(chartCount).getNSeries().get(seriesCount).getDataLabels();
dataLabels.setAutomaticSize(true);


Please find the attached excel sample for your reference.

Regards,
Sanjeev

Hi Sanjeev,


Thank you for providing the sample spreadsheet.

I have discussed this matter with the concerned member of the product team, and got to know that your required feature “Resize Shape To Fit Text” is currently not available for Chart’s DataLabels. In order to further analyze this request and to provide the implementation for this feature, I have logged a ticket with Id CELLSJAVA-41672 in our database. Please spare us little time for preliminary feasibility analysis. In the meanwhile, we will keep you posted with updates in this regard.

Hi,

Thanks for using Aspose.Cells.

This is to inform you that we have fixed your issue CELLSJAVA-41672 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

Hi,

Thanks for using Aspose.Cells.

We have provided a new method DataLabels.setResizeShapeToFitText(true) for your needs.

Please download and try the latest version:
Aspose.Cells for Java 8.7.0 and let us know your feedback.

The issues you have found earlier (filed as CELLSJAVA-41672) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.