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

Free Support Forum - aspose.com

Secondary Axis turned on in Chart

I am testing Aspose.Slides versin Previously I was using version

I have some slides with embedded Excel data and chart.
I use “smart markers” to inject data into the embedded excel worksheet.

It appears that version automatically sets the Secondary Axis to “Custom” even though I have “None” selected in my template file. The end result is that Aspose always creates a chart with a line (the secondary x-axis) near the top of the chart which can run across labels and legends.

I do not have this problem with version

I am not sure if this problem resides in Apose.slides or Aspose.Cells.

Attached is a ppt slide showing the secondary axis turned on.

NOTE: I am using office 2003.

Hi Kam,

Thanks for your interest in Aspose.Slides.

I have observed the generated presentation file shared by you. But I need to reproduce the issue on my end, before creating an issue in our issue tracking system. For that, I request you to share the source excel file, whereby chart has been imported as an OLE Object. I appreciate your cooperation in advance.

Thanks and Regards,

Attached is the template file I use. Double click on the chart and you will get the excel worksheet embedded in the power point slide. Thanks for looking into it.

Hi Kam,

I have extracted the chart shared by you from PPT shared by you. I have been successfully able to add the chart using Aspose.Slides for .NET 4.1.1 and 3.1.7 as OLE object in PPT presentations. Fortunatley, I have not been able to observe any issue in the charts of generated PPT files. For your kind reference, I have shared the generated PPT files as well.

Thanks and Regards,

The ppt files included in your zip file stills contains the "Smart Markers" in the excel worksheet (Sheet2). That means you have not injected data (using Aspose.Cells API) into the excel Sheet2. So you have to create a .net DataTable and name it bmk, bmkA with the columns 1Year, 3Year, . . .

The template also includes two arrays of data, Test1 and Test2.

Once the data is injected into the worksheet, you will see a chart with real data and the secondary axis might show up. The point is that you must Aspose Smart Markers to inject data into it in order to fully test it. Thanks.

Hi Kam,

Can you please share the code snippet used by you for the creation of chart using Aspose.Cells for .NET ? This way, I shall be able to identify the cause of problem quickly. I thank you in advance for your cooperation.

Thanks and Regards,

I wrote two methods below. TestAsposeNewVersion() will call updateChart(…).
You will need to update the path where you have your Template.ppt.
This test creates an output.ppt in a folder named “…/…/Template”.
You will see a secondary axis show up near the top of the chart.

Is there a way to turn this secondary off? Why does it show up even though I set the pattern to None?

Try this:

Private Sub updateChart(ByVal sh As Aspose.Slides.Shape)
Console.WriteLine(“Updating Chart”)
Dim dtBMK As DataTable = New DataTable
dtBMK.TableName = “bmk”
dtBMK.Columns.Add(“1Year”, GetType(System.Double))
dtBMK.Columns.Add(“3Year”, GetType(System.Double))
dtBMK.Columns.Add(“5Year”, GetType(System.Double))
dtBMK.Columns.Add(“10Year”, GetType(System.Double))
dtBMK.Columns.Add(“SI”, GetType(System.Double))

Dim dtBMK_A As DataTable = New DataTable
dtBMK_A.TableName = “bmkA”
dtBMK_A.Columns.Add(“1Year”, GetType(System.Double))
dtBMK_A.Columns.Add(“3Year”, GetType(System.Double))
dtBMK_A.Columns.Add(“5Year”, GetType(System.Double))
dtBMK_A.Columns.Add(“10Year”, GetType(System.Double))
dtBMK_A.Columns.Add(“SI”, GetType(System.Double))

'create some dummy data for dtBMK
Dim newRow As DataRow = dtBMK.NewRow()
newRow.Item(“1Year”) = 0.15
newRow.Item(“3Year”) = 0.2
newRow.Item(“5Year”) = 0.17
newRow.Item(“10Year”) = 0.18
newRow.Item(“SI”) = 0.13

'create some dummy data for dtBMK_A
newRow = dtBMK_A.NewRow()
newRow.Item(“1Year”) = 0.14
newRow.Item(“3Year”) = 0.13
newRow.Item(“5Year”) = 0.16
newRow.Item(“10Year”) = 0.13
newRow.Item(“SI”) = 0.12

Dim Test1(5) As Object
Test1(0) = 0.075
Test1(1) = 0.01
Test1(2) = 0.095
Test1(3) = 0.11
Test1(4) = 0.13

Dim Test2(5) As Object
Test2(0) = 0.045
Test2(1) = 0.05
Test2(2) = 0.065
Test2(3) = 0.14
Test2(4) = 0.17

Dim oof As OleObjectFrame = CType(sh, OleObjectFrame)
Dim mstream As MemoryStream = New MemoryStream(oof.ObjectData)
Dim designer As Aspose.Cells.WorkbookDesigner = New Aspose.Cells.WorkbookDesigner()
designer.SetDataSource(“Test1”, Test1)
designer.SetDataSource(“Test2”, Test1)
oof.ObjectData = designer.Workbook.SaveToStream().ToArray()
End Sub

Public Sub TestAsposeNewVersion()
Dim pptFile As String = “…/…/Template/template.ppt”
Dim srcPres As Aspose.Slides.Presentation = New Presentation(pptFile)
If srcPres Is Nothing Then
Console.WriteLine(“Error: failed to open " & pptFile)
End If
Dim Sl As Slide = srcPres.Slides(0)
For Each sh As Aspose.Slides.Shape In Sl.Shapes
Select Case sh.AlternativeText
Case “ComparisonWithBenchmarkChart”
End Select

srcPres.Save(”…/…/Template/output.ppt", Export.SaveFormat.Ppt)
End Sub

Hi Kam,

I have used the code snippet provided by you with Aspose.Slides for .NET 4.1.1 and Aspose.Cell for .NET 4.8.2. I have generated the chart that is rendered fine. Fortunatley. I have not been able to observe the line on the top of the generated chart.For your kind reference, I have shared the generated PPT from your temple.ppt file.

Thanks and Regards,

Would you please try using Aspose.Cells version That is the version I am using. I suspect the issue lies in Aspose.Cells not Aspose.Slides.

I see that Aspose just released Aspose.Cells version 4.9.1 on May 7. I am not sure if version 4.9.1 still has this problem.

Hi Kam,

I have used Aspose.Cells for .NET 4.9.1 and have been able to observe the horizontal axis line on the of the top of the generated chart and it seems to be an issue with Aspose.Cells for .NET 4.9.1. For your reference, I have also attached the generated PPT file as well.

Now, I will request the Aspose.Cells team to help you further from here in resolving your issue.

Thanks and Regards,

I am glad you can finally see what I see. The output.ppt you attached still cannot be downloaded but that is OK since I know what it looks like. Thanks for your help.


We found the issue and will fix it soon.

Your issue has already been logged with an id: 16589.

Thank you.


Please try the version v4.9.1.2 attached in your other thread:

Thank you.

I tried the Aspose.Cells version but I still see the secondary axis show up. Would you please double check on your side?


Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the feedback.

We will further investigate the issue and get back to you soon.

Thank You & Best Regards,

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please try the attached latest version of Aspose.Cells. We have fixed your mentioned issue.

Thank You & Best Regards,

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

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

While trying to keep the API as straightforward and clear as possible, we have decided to recognize and honor the common development practices of the platform; we have re-arranged API Structure/ Namespaces.

With this release, we have reorganized the API classes for Aspose.Cells component. This change has some major aspects that we follow. We have added new namespaces. The entire API (classes, interfaces, enumerations, structures etc.) were previously located in the Aspose.Cells namespace. Now, certain sets of API have been moved to their relative namespaces, which make the relationship of classes (with their members) and namespaces clear and simplified. It is to be noted here, we have not renamed existing API (classes, enumerations etc.) but, I am afraid you still need to make certain adjustments in your existing projects accordingly.

For complete reference, please see the product's API Reference.