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

1k Views Asked by At

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

2

There are 2 best solutions below

2
Abdel Raoof Olakara On BEST ANSWER

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.

0
heta shah On

It's been year but I faced this problem today and would like to share a solution.

Yes, you are missing the example-data.js file which is to be referenced from the HTML page. This .js file creates the data that is populated in the chart.

example-data.js can be found under extjs/examples/example-data.js. Note: extjs is the unzipped folder which you downloaded from sencha.com.