Search code examples
extjsextjs4sencha-charts

running example"source code" from sencha website, causes error


I'm trying to modify an example in this website. I run this example on GoogleChrome, But the compiler or whatever it is, gives me the following error

"Uncaught ReferenceError: store1 is not defined".

in my browser, I type the following: localhost/helloext/index.html and I expected to see the result is, RadarFillExample as in the above mentioned website.

index.html Contains the following:

<html>
<head>
<title>Hello Ext</title>
   <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
   <script type="text/javascript" src="extjs/ext-debug.js"></script>
   <script type="text/javascript" src="app2.js"></script>
</head>
<body></body>
</html>

app2.js Contains the sourceCode available in the above mentioned website.

And the files(index.html, app2.js and extjs directory) are located inside D:\xampp\htdocs\helloext\

Can anyone tell me how to fix this error, so that i can modify the code?

your help is appreciated


Solution

  • From the error message, its clear that your store named store1 is not defined.

    The data store for the example comes from another file namely: example-data.js. Your application should have access to this file or you should define a store with proper data for plotting the graph.