Jump to content
JChartFX Community
  • 0

Unable to get value of the property 'call'


Hsakarp

Question

I have just started with Jchatfx and trying to create on sample page.I amgoing through http://support.softwarefx.com/jChartFX/article/2501235#2d0978a4-8c87-e211-84a5-0019b9e6b500 and i have created a view(trying to avhieve it in MVC3).While running the application am getting error saying

SCRIPT5007: Unable to get value of the property 'call': object is null or undefined
jchartfx.coreBasic.js, line 398 character 194

here is my html

@{

ViewBag.Title =

"Index";


Layout =

"~/Views/Shared/_Layout.cshtml";


}

<!

DOCTYPE html>


<

link href="../../ChartCss/jchartfx.css" rel="stylesheet" />


<

script src="../../ChartScripts/jchartfx.system.js"></script>


<

script src="../../ChartScripts/jchartfx.coreBasic.js"></script>


<

h2>Charts Demo</h2>



<

div id="ChartDiv" style="width: 600px; height: 400px; display: inline-block"></div>



<

script type="text/javascript">


$(document).ready(

function () {


loadChart();

});

var chart1;


function loadChart() {



chart1 =

new cfx.Chart();



chart1.getData().setSeries(2);

chart1.getAxisY().setMin(500);

chart1.getAxisY().setMax(2000);

var series1 = chart1.getSeries().getItem(0);



var series2 = chart1.getSeries().getItem(1);



series1.setGallery(cfx.Gallery.Lines);

series2.setGallery(cfx.Gallery.Bar);

var data = [



{

"Month": "Jan", "Bikes": 1800, "Parts": 1300 },




{

"Month": "Feb", "Bikes": 1760, "Parts": 900 },



{

"Month": "Mar", "Bikes": 1740, "Parts": 970 },



{

"Month": "Apr", "Bikes": 1750, "Parts": 1010 },



{

"Month": "May", "Bikes": 1810, "Parts": 1070 },



{

"Month": "Jun", "Bikes": 1920, "Parts": 1180 }



];

chart1.setDataSource(data);

var divHolder = document.getElementById('ChartDiv');



chart1.create(divHolder);

}

</

script>

 Is that anything i am missing to give reference?.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Can you try removing the @{...} tag at the beginning of the page? or moving it? I have seen IE9 will render a page in quirks move if the page does not start with <!DOCTYPE html>. If you use the developer mode you can also check if IE is using standards mode or quirks mode to render your page.

I also noticed that you are using $(document).ready(... but did not see jQuery in the includes but maybe you were cleaning up the page before posting it here. 

Regards,

JuanC 

Link to comment
Share on other sites

  • 0

Thanks JuanC.I have tried the same by removing @{..} code.But still its throwing the same error.

A smal update from my side. I have try running the same HTML outside visual studio(as Independent file).It works fine.Then inside VS i have try adding the Meta tags

<meta content="IE=9" http-equiv="X-UA-Compatible" />

<meta name="viewport" content="width=device-width" />.


Then it works fine.But even that code doesnt make the MVC app to work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...