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.
Unfortunately, activation email could not send to your email. Please try again.

Type is failing on conversion

Thread ID:

Created:

Updated:

Platform:

Replies:

118290 Feb 20,2015 09:46 AM Feb 23,2015 01:39 AM ASP.NET MVC 1
loading
Tags: Chart
Marcos Romero
Asked On February 20, 2015 09:46 AM

 @(Html.EJ().Chart("chartOutages")
                .Series(sr =>
            {
                sr.DataSource((System.Collections.IEnumerable)ViewBag.datasource)

                 .XName("Month")

                 .YName("Outages")

                 .Type(SeriesType.Column).Add();
            })
        .Render())

On the type line, I'm getting these errors:

Argument 1: cannot convert from 'Syncfusion.Mvc.ChartAdv.SeriesType' to 'Syncfusion.JavaScript.DataVisualization.SeriesType'
The best overloaded method match for 'Syncfusion.JavaScript.DataVisualization.SeriesBuilder.Type(Syncfusion.JavaScript.DataVisualization.SeriesType)' has some invalid arguments

Not sure what I'm missing. 

Thanks. 

Jayavigneshwaran [Syncfusion]
Replied On February 23, 2015 01:39 AM

Hi Marcos,

Thanks for using Syncfusion product.

We have analyzed this and replicated the scenario shown in the code snippet. But we are not able to reproduce the reported issue.

But from your error message, we can able to get that you have referred dll’s of required to render both classic and non classic chart control.

Both has an enum named “SeriesType”. So it got conflict and confusing on choosing the appropriate one to it.

To render a non classic MVC chart control, you need to refer the below mentioned dll’s is enough

·         Syncfusion.EJ

·         Syncfusion.EJ.MVC

To avoid this you can remove other dll reference from the project, except the above or you can specify like this

[CSHTML]

   @(Html.EJ().Chart("container")

        .Series(sr =>

            {

                                        

              sr.Type(Syncfusion.JavaScript.DataVisualization.SeriesType.Column).Add();

               

            })

        )

We have also made a sample for your reference. Find it from the below location
MvcApplication47.zip
 

If you still face any concern kindly revert back us by modifying the sample to reproduce the issue. This will help us to fix the issue sooner.

Please let us know if you have any concern.

Thanks,

Jayavigneshwaran



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.

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.

;