Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Include EXTJS 5 library in web application

I have got extjs 5 which contains many folders (.sencha, build, cmd, examples, licences, overrides, packages, plugins, src, and welcome). I want to use charts in a web application, so what I did is that I copy/paste ext-all-debug.js file that was in the build folder. This gave me the possibility to display a panel, but there was no css. So I copy/paste the css files that I found in \ext-5.1.0\build\packages\ext-theme-neptune\build\resources. So the panel is displaying fine with css.

Then I want to use charts, but, for a reason I don't understand, charts are not included in ext-all-debug.js file. So I copy/paste "ext-charts-debug.js". And now I'm able to display simple cartesian charts (others do not work), but their behaviour is not normal (wrong axis, legend always in bottom when it locked it right or left, etc.). The code I wrote to display the chart has been tested on sencha fiddle and is working perfectly.

So my question is: What should I inlcude in my web application lib folder to let me use EVERY sencha components (with css). Thanks a lot !

PS: Here is my current web application lib folder: web application lib folder

like image 563
JkSuf Avatar asked Dec 29 '25 21:12

JkSuf


1 Answers

For ExtJS 5 you really should read the documentation on Sencha Command, it's by far the easiest way to get your project running.

If you really want to manually add the files, copy the build folder from the ExtJS Framework to your project's folder and then add this to your index.html:

<link rel="stylesheet" href="build/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all.css" />
<link rel="stylesheet" href="build/packages/sencha-charts/build/crisp/resources/sencha-charts-all.css" />
<script src="build/ext-all-debug.js"></script>
<script src="build/packages/sencha-charts/build/sencha-charts.js"></script>

Your Sencha Charts are not being displayed correctly because you forgot to add the css for your sencha charts theme.

PS: Really, really read the docs on Sencha Command.

like image 145
Guilherme Lopes Avatar answered Jan 02 '26 02:01

Guilherme Lopes