We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Mixed Series Types on the Secondary Axis XLSIO

Thread ID:

Created:

Updated:

Platform:

Replies:

91574 Nov 24,2009 11:57 AM UTC Dec 2,2009 09:38 AM UTC WinForms 12
loading
Tags: XlsIO
Jason Cohen
Asked On November 24, 2009 11:57 AM UTC


I have a chart that I would like to export to Excel using Syncfusion.

It has a single Line Series on the Primary Axis and two series on the Secondary Axis, one of which is of Series Type Line Series the other ColumnStacked.

Attempting to configure the chart object using Syncfusion I consistently get the following error is there a solution for this?:

System.ArgumentException occurred
Message="Item has already been added. Key in dictionary: 'Line' Key being added: 'Line'"
Source="mscorlib"
StackTrace:
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at Syncfusion.XlsIO.Implementation.Charts.ChartSeriesCollection.FindOrderByType(ExcelChartType type)
at Syncfusion.XlsIO.Implementation.Charts.ChartSerieImpl.ChangeCombinationType(ExcelChartType type)
at Syncfusion.XlsIO.Implementation.Charts.ChartSerieImpl.OnSerieTypeChange(ExcelChartType type, Boolean isSeriesCreation)
at Syncfusion.XlsIO.Implementation.Charts.ChartSerieImpl.ChangeSeriesType(ExcelChartType seriesType, Boolean isSeriesCreation)
at Syncfusion.XlsIO.Implementation.Charts.ChartSerieImpl.set_SerieType(ExcelChartType value)
at Paragon.PDV.IO.ExcelFileCreator.AddSeries(SeriesData series) in D:\Local Repositories\Paragon DotNet\Operations\Projects\PDV\trunk\PDV\IO\ExcelFileCreator.cs:line 697
InnerException:


It seems that the Secondary Axis will only support multiple series of the same SeriesType?

Jason Cohen
Replied On November 24, 2009 02:02 PM UTC

I should have mentioned I'm using Syncfusion XLSIO version 6.3.0.30 and viewing the result using Office 2003

Balamurugan R [Syncfusion]
Replied On November 25, 2009 08:28 AM UTC

Hi Jason,

Thank you for using syncfusion product.
I am unable to reproduce the issue. I have attached the sample as per your requirements.
Please.let us know if you have any queries.

Regards,
Balamurugan.



Forum Id 91574_876fcbdf.zip

Jason Cohen
Replied On November 25, 2009 09:50 AM UTC

Hi,

thanks for the sample, I'm preparing a sample project to demonstrate the issue.

Regards,

Jason,

Balamurugan R [Syncfusion]
Replied On November 25, 2009 10:10 AM UTC

Hi Jason,

Thank you for using Essential XlsIO.
Please,let us know if you have any queries.

Regards,
Balamurugan.

Jason Cohen
Replied On November 25, 2009 10:39 AM UTC



Please find the attached example.

Note I've included the chart as I would have expected it to be created.



SecondarySeriesSample_cce2ce4d.zip

Balamurugan R [Syncfusion]
Replied On November 25, 2009 01:09 PM UTC

Hi Jason,

Thank you for using Syncfusion Products.

I have analysied your problem.It is possible based on the chart type.You have to initialized various chart type in primary series.Then you can use it in the secondary series.I have attached the sample for your reference.

Please,let us know if you have any queries.

Regards,
Balamurugan.



Forum1 Id 91574_bee22dc0.zip

Jason Cohen
Replied On November 25, 2009 03:37 PM UTC

Hi thanks for your response, however the source code you have provided throws the following exception when setting the secondarySeries2 to use the Secondary Axis:

System.ApplicationException was unhandled
Message="Can't set current serie to secondary axis"
Source="Syncfusion.XlsIO.Base"
StackTrace:
at Syncfusion.XlsIO.Implementation.Charts.ChartSerieImpl.ChangeAxis(Boolean bToPrimary)
at Syncfusion.XlsIO.Implementation.Charts.ChartSerieImpl.set_UsePrimaryAxis(Boolean value)
at ConsoleApplication2.Program.Main(String[] args) in C:\Documents and Settings\jason.cohen\My Documents\Downloads\Forum1 Id 91574_bee22dc0\Forum1 Id 91574\ConsoleApplication2\Program.cs:line 93
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:


Balamurugan R [Syncfusion]
Replied On November 26, 2009 11:28 AM UTC

Hi Jason,

I have understand your problem.let us use two primary series and one secondary series to over ride your problem.

Regards,
Balamurugan




Forum2 Id 91574_d14a7a3b.zip

Jason Cohen
Replied On November 27, 2009 03:21 PM UTC

Hi Balamurugan

thanks for your code, although in your latest example there is only one secondary axis series?

We have a case where there is mixed series types on both the primary and mixed series types on the Secondary, where the series on the primary ranges differ greatly to those on the secondary.

It is possible to configure the chart in question directly within Excel.

Thanks for your help so far.


Balamurugan R [Syncfusion]
Replied On December 1, 2009 03:56 AM UTC

Hi Jason,
Thank you for your interest.
It is possible to draw a chart directly with excel.

Regards,
Balamurugan.

Jason Cohen
Replied On December 1, 2009 09:57 AM UTC

Hi Balamurugan,

I think you misread my previous post, to paraphrase:-

We need to create a chart with series on both the Primary & Secondary Axis where there is more that one series type on the secondary Axis.

Syncfusion XLSIO version 6.3.0.30 throws exceptions when you try to do this.

The aforementioned chart can be created directly within Excel so why is there an issue trying to do it through Syncfusion?

Regards,

Jason.

Balamurugan R [Syncfusion]
Replied On December 2, 2009 09:38 AM UTC

Hi Jason,

Thank you for interest in syncfusion products.
I was able to analysis your problem.We cannot provide more details through the public forum so please open an direct trac incident so that we can provide the necessary informations.

Regards,
Balamurugan.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;