We have a business need to have a scatter chart exported to excel with data labels attached to each point that can have up to 80 characters in them. These labels cannot wrap in any way, and must remain aligned perfectly with their data point marker (a colored diamond in this case). Can you please provide help for me to accomplish this?
I have attempted replacing the data labels with text boxes may work. So far I have not had much success as multiple charts vary in size and number of data points, so each chart's formatting is off at least slightly.
Is there is no way to unwrap the data labels programmatically, even in Excel 2013 and with the latest Aspose.Cells version? Or possibly get the coordinates on the chart of the data point marker so that I can attach the text boxes to them?
I have tested your scenario and I am afraid, it is MS Excel's behavior for Charts, it will wrap the Series' data labels accordingly and automatically if the text is long. Aspose.Cells follows MS Excel standards. If you still think this is possible in MS Excel to not to wrap the data labels, please create your chart manually in MS Excel with data labels not wrapped, save the file and post it here, we will check your issue soon.
Sorry I do not have an Excel file that I can post as my company will not allow me to upload files from my work laptop to this forum.
However, if you quickly create a scatter chart in Excel 2013 with data labels attached to the data point markers, you will see that they are still wrapped at about 32 characters. But the interesting part about Excel 2013 is that unlike 2010, if you right-click on a data label and go to “Format Data Labels” >> “Size & Properties” >> “Alignment”, you will see that the option of “Wrap text in shape” is NOT grayed out (disabeled) in 2013 (it was in 2010). If it is unchecked, the data label then unwraps! If i could get at that option programmatically from the Aspose.cells API, it should solve my issue.
Another idea that I am not sure how to accomplish, or if it is even possible, would be to get the data label coordinates (x, y) on the chart. Is that a possibility? I know we can not get the data point marker coordinates but the data label coordinates would be the next best thing. If that is possible please let me know.
Well, you may create a sample chart in MS Excel 2013 with your dummy data and provide us here for reference, it will help us to analyze your issue more accurately. Moreover, you may provide some screen shots for reference taken in MS Excel 2013 if you can for further assistance.
Also, I have evaluated your scenario/case a bit in MS Excel 2007/2010 for sample Radar chart and the wrapping option (Alignment) is checked but disabled. Aspose.Cells mostly supports and follows MS Excel 2007/2010 standards and their features at the moment. We may log a ticket for your requested feature after getting all the details to further investigate it on our end, so it can be supported in the product.
Regarding obtaining x,y coordinates for labels or markers, I think it would be difficult to accurately get the coordinates or positions of the data labels.