Home forums Using CanvasJS Cannot pass dataPoints.push() from string Reply To: Cannot pass dataPoints.push() from string

#15337

jhair01
Member

Hi Bivek,

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/

  • This reply was modified 2 months ago by  jhair01. Reason: more info to help mod determine
  • This reply was modified 2 months ago by  jhair01. Reason: typo