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. Image for the cookie policy date
close icon

Type is failing on conversion

 @(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. 

1 Reply

JA Jayavigneshwaran Syncfusion Team February 23, 2015 06:39 AM UTC

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



Loader.
Live Chat Icon For mobile
Up arrow icon