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

Free Support Forum - aspose.com

Overlapping of dual Bar Charts

Hi Aspose Team,

I am trying to plot a DualAxisVerticalBarChart in an excel but when I am trying that 2 bars are overlapping

Expected : Dual-Bar Expected.png

Actual (what I am getting): Dual-Bar with overlapping issue.png

can you please advice me how to achieve expected chat.


We could not find your screenshots or attachments. Please provide the following to evaluate your issue precisely on our end:

  1. Sample code (runnable) that you are currently using using Aspose.Cells API
  2. Any input Excel file if you are using.
  3. Output Excel file generated by Aspose.Cells.
  4. A sample Excel file having your expected chart in it, you may create your desired chart using MS Excel manually and save the file.

PS. please zip the Excel files prior attaching here.

Sorry forgot to attach.

Dual-Bar with overlapping issue.PNG (5.7 KB)
Dual-Bar Expected.PNG (5.9 KB)


Please see the sttached Zip file which has the Sample bar chart created in the excel manually.
below is the data I am using to plot the bar charts
input excel the data is there in the excel that I attached.

Excel.zip (10.5 KB)

Please share your sample runnable console application (as requested by @Amjad_Sahi also) that can be used to generate the Excel file having the issue as shown in image “Dual-Bar with overlapping issue.png” above. We will reproduce the issue here and share our feedback accordingly.

Also, share your environment details like the operating system, Java version etc. You may ensure that you are using the latest version Aspose.Cells for Java 20.10 in your testing as we rectify issues in the latest versions only.


Please try to use Series.setGapWidth() and Series.setOverlap() methods to set the gap accordingly especially for the second series. See the sample code for your reference, so you may accommodate or update your code accordingly:
Sample code:

//Plot the second series on second axis line.
Integer obj1 = 150;
short value = obj1.shortValue();
Integer obj2 = 0;
short value1 = obj2.shortValue();

Hope, this helps a bit.