Namaste Bivek,
My solution was to Serialize the Data from a List and then pass it in the ViewBag to the View of the MVC. It works. Thank you for your time and your consideration.
Jon
Hi Bivek,
I have an update. I am passing the string and then pushing it into a value array in JS. Here is the value of the array in JS:
["{ x: new Date(2017,06,13), y: 490 }" , "{ x: new Date(2017,06,14), y: 403 }"]
This still throws an exception, “Unable to get property ‘getTime’ of undefined or null reference”. The format looks correct to me. The only thing I notice is that when I look in the debugger, array is surrounded by double quotes. Can you please help me again??
Thank you. To give you a better idea of what is happening, the chart is rendered in the V part of an ASP.NET MVC. I am looking at the Object returned from the controller which is a C# string containing all the data. So my code looks like this:
var dataString = "@Model";
The problem is that the variable is a string so when the value is passed it has the quotes around it. Please look at this fiddle for me?? Thank you very much!
https://jsfiddle.net/gq7ucw53/3/