It seems you are experiencing an issue with the visibility of data labels in your TreeMap chart. To address this, you may want to ensure that the data labels are properly formatted and enabled for the data points in your chart.
In Aspose, you can format the data points of a TreeMap chart using specific classes and methods. Here are some steps you can follow to troubleshoot and potentially resolve the issue:
Access Data Points: Use the IChartDataPointLevelsManager to access the data points of your TreeMap chart. This manager allows you to work with multi-level categories.
Format Data Labels: Each data point can be formatted using the IChartDataPointLevel class. You can access the data label settings through the getDataLabel method of this class. Make sure that the data labels are set to be visible.
Set Data Label Text: You can define what text should be displayed for each data label. For example, you might want to display the series name or the category name.
Check Visibility Settings: Ensure that the visibility settings for the data labels are enabled. Sometimes, data labels may be hidden due to specific chart settings.
Here is a sample code snippet that demonstrates how to set the data label for a data point in a TreeMap chart:
// Assuming you have a reference to your chart
IChartDataPointLevelsManager levelsManager = chart.getChartDataPointLevelsManager();
IChartDataPointLevel dataPointLevel = levelsManager.getDataPointLevel(0); // Access the first level
// Set the data label for the data point
dataPointLevel.getDataLabel().setShowValue(true); // Ensure the value is shown
dataPointLevel.getDataLabel().setText("Your Custom Text"); // Set custom text if needed
Make sure to replace "Your Custom Text" with the appropriate text you want to display.
If you continue to face issues, please check the attached zip file for any specific configurations or settings that might be affecting the visibility of the data labels.
If you need further assistance, feel free to provide more details or share specific code snippets that you are using.
I used your code completely, only added a line of code provided by John, and the output file is as follows. Output.zip (10.3 KB)
Please open this xlsx file to check, excluding the different display caused by different Excel versions. Also, please confirm the version of Aspose.Cells you using. I am using Aspose.Cells version 25.2. Thank you.
@sanjeevkumar.v
By testing with sample code on the latest version v25.2, we can reproduce the issue. Data labels are not displayed properly when converting chart to image.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-57834
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@sanjeevkumar.v
Please allow us some time to evaluate and analyze it in detail. In normal support here, we deal with issues on a first come, first served basis. We believe this is the fairest and most appropriate way to meet the needs of our customers. If it is not complex, we should be able to fix it soon, and the fix may be included in our upcoming release (Aspose.Cells v25.3 - planned for publication in the second week of March next month). If the issue is complex, it may take a few more weeks or even a month to resolve.
Additionally, if you purchase paid support, we will prioritize your issue so that it can be resolved earlier.
The issues you have found earlier (filed as CELLSNET-57834) have been fixed in this update. This message was posted using Bugs notification tool by leoluo
“Hi,
I am using Aspose.PDF version 25.7.0 , but I still have the label issue — the percentage value is being hidden. Why is this happening?” image.png (19.1 KB)
I tested the following sample code using Aspose.Cells for .NET v25.7 and it works fine. The labels are shown properly with percentage values in the output image and Excel spreadsheet.
e.g Sample code:
I tried the code you provided, but it’s not working for some specific arrays.
Please try applying the following values to your code — it will reproduce the issue: Values.docx (11.2 KB)
@sanjeevkumar.v
If the chart (area) is not wide, the data labels should be wrapped.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-58799
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.