Aspose chart Align axis x values to the left

i am trying to align the x-axis values to the right, but i can’t find any property that allows me to align them, whenever the graph is created they are always centered. How can I align these values ?

image.png (2.3 KB)

@Tati2895,

Thank you for providing the screenshot.

Could you please zip and attach your sample files, including the input Excel file (if any), the current output Excel file generated by Aspose.Cells, and the expected output Excel file that you may create manually in MS Excel? Also, please share the sample (runnable) code that you are using. We will review your issue soon.

hello, attached I share the expected excel, the output generated by aspose and the code.

I remain attentive. thank you very much
AsposeCells.zip (23.0 KB)

@Tati2895,

Thank you for providing the sample files and code snippet.

I am currently evaluating your issue/requirements. However, could you please open the file “outputAsposeCells.xlsx” in MS Excel and adjust the axis labels to align them as per your desired alignment for the x-axis labels? After making the adjustments, please resave the file and provide it to us again. Additionally, please specify and provide details on the “Format Axis” and “Alignment” attributes or properties that you manually set for the chart in MS Excel to achieve your desired alignment for the x-axis values/labels. This information will assist us in evaluating and addressing your requirements using Aspose.Cells APIs. I attempted to use various chart options in MS Excel manually, but I was unable to achieve the desired alignment for the x-axis values/labels.

what I did manually was that I selected the axis area and in the excel ribbon options in the alignment area I selected align left.
image.png (53.4 KB)
outputAsposeCells.zip (10.8 KB)

@Tati2895,

Thanks for the sample file and screenshot.

I tried a bit but I could not accomplish the task using Aspose.Cells APIs. Apparently, I could not find relevant APIs to align chart category axis (x-axis) labels to left as per your desired output chart.

We need to evaluate your issue/requirements in details. We have opened the following new ticket(s) in our internal issue tracking system and will give you (updated) code snippet or deliver a fix/supported version according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-55137

Once we have an update on it, we will let you know here.

@Tati2895
Thanks for your help!
We have supported this feature with Chart.CategoryAxis.TickLabels.AlignmentType property and will release it in the next version 24.3.

1 Like

The issues you have found earlier (filed as CELLSNET-55137) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi