Anju Raman
Anju Raman

Reputation: 13

Getting error when binding data to highcharts object

I am trying to create a basic chart through highchart in ASP.NET MVC. I am referring to Highsoft.Web.Mvc.Charts.

@Html.Highsoft().Highcharts(new Highcharts
           {
               Chart = new Highsoft.Web.Mvc.Charts.Chart
               {
                   Width = 1087,
                   Height = 400,
                   Type = ChartType.Area
               },
               Series = new List<Series>
               {
                    new AreaSeries { Name = "USA", Data = usaData },
                    new AreaSeries { Name = "USSR/Russia", Data = russiaData }
               },
               Title = new Title
               {
                   Text = "Monthly Average Rainfall"
               },
               Subtitle = new Subtitle
               {
                   Text = "WorldClimate.com"
               }
           }, "XYComponentNew");

I'm getting this error :

Value cannot be null.
Parameter name: source

Is there any source parameter to be specified here to configure highcharts?

I am trying to create a new chart using highcharts latest version.

Upvotes: 0

Views: 39

Answers (0)

Related Questions