extjs4.1

How to show label with line and display label outside in piechart in extjs4.1

二次信任 提交于 2019-12-08 04:04:25
can anybody tell How to show label with line and display label outside in extjs4.1.I want to display label outside of pie and show line to map the label eg / \ \ test test1 test2 You've got the display option of the label config , that you can set to 'outside'. As for the lines, you'll have to draw them yourself... Which would be a quite involved hack IMO. If you're interested in trying, that takes place in Ext.chart.Label#renderLabels() , and uses Ext.chart.series.Pie 's onCreateLabel() and onPlaceLabel() methods. Don't forget to take your trigonometry with you before diving in there! 来源:

ExtJs - Get element by div class?

二次信任 提交于 2019-12-06 22:56:53
问题 How do I get the ExtJs component object of a Div by class name? Say my div is: <div class="abc"></div> How do I get the ExtJs object of this Div to perform e.g. getWidth() Note: There is no id given. What I tried: Ext.select(".abc") Ext.query(".abc") Edit: Error: Object has no method 'getWidth' <div id="main"> <div class="abc"></div> </div> var d = Ext.get( "main" ); d.query('.abc').getWidth(); 回答1: Use var dom = Ext.dom.Query.select('.abc'); var el = Ext.get(dom[0]); This will return an Ext

Extjs File upload using json service?

青春壹個敷衍的年華 提交于 2019-12-06 12:41:34
问题 I am using json service(.net RIA service) to push data to server from Extjs. Currently I have a requirement to upload document to server. I saw some examples using form submit to php files. Is this possible through json service? or Is it necessery to create some server logic where i can accept form submits? Is it possible to read some binary data from client side and push as json data to server? 回答1: In Extjs, File uploads are not performed using normal 'Ajax' techniques, that is they are not

extjs 4.1 page scrolls to top of grid in internet explorer on row update

99封情书 提交于 2019-12-06 11:31:24
问题 On my grid i'm using rowediting. if using Internet explorer 10 ( probably the other versions too ) and the page has scrollbars When i edit a row and click "update" the page scrolls up to the start of the grid. This issue is quite well documented on ( though not specifically on 4.1 ). I've seen fixed that override rowModel like this Ext.override(Ext.selection.RowModel, { onRowMouseDown: function(view, record, item, index, e) { // view.el.focus(); this.selectWithEvent(record, e); } }); I've

How to skip over particular cells when tabbing through an Ext grid?

吃可爱长大的小学妹 提交于 2019-12-06 09:31:51
I have a grid panel where some cells are editable, and others aren't. I'd like to make it so that when you tab through the grid with your keyboard, the non-editable cells are skipped over i.e. never get selected. Here's my simple grid so far: var store = Ext.create('Ext.data.Store', { fields:['name', 'age', 'country'], data:[ {name:'Lisa', age:13, country: 'USA'}, {name:'Bart', age:75, country: 'France'}, {name:'Homer', age:32, country: 'Germany'}, {name:'Marge', age:56, country: 'Australia'} ] }); var grid = Ext.create('Ext.grid.Panel', { title: 'People', store: store, columns: [ {header:

Correct JSON and Model with TreeStore and TreePanel

我只是一个虾纸丫 提交于 2019-12-06 08:05:12
问题 I have a JSON String comes from the server side: {"success":"true","total":"6","list": [{"id":"1","name":"folder1","parentid":"null","type":"0"}, {"id":"2","name":"r1","parentid":"1","type":"1"}, {"id":"3","name":"folder2","parentid":"1","type":"0"}, {"id":"4","name":"r2","parentid":"3","type":"1"}, {"id":"5","name":"r3","parentid":"null","type":"1"}, {"id":"6","name":"folder3","parentid":"null","type":"0"}]} How do I turn that into a tree? Can anyone suggest me how to get the elements in the

How to add total row in grid footer in extjs

心已入冬 提交于 2019-12-06 04:53:16
问题 I want to add total row in grid footer. I have total row that record is available in store. In grid the user selects descending order, total row appears as the first row. Can anybody tell me how to avoid this? I will explain my full problem: eg I have grid view like Target Target1 Target2 are getting from webservice Month Target Target1 Target2 Target(2-1) Target% jan 500 1000 1001 1 0.99 feb 600 2000 2001 1 0.99 **total 1100 3000 3002 2 2*3002/100** need to calculate total% like this I am

ExtJS 4.1 MVC: How to apply LoadMask to viewport while loading?

拈花ヽ惹草 提交于 2019-12-06 02:16:10
问题 How to apply a LoadMask for a standard ExtJS MVC application's viewport while it is loading the required files? An example of such MVC application is the following snippet for app.js : Ext.Loader.setConfig({enabled:true}); Ext.application({ requires: [ 'Ext.container.Viewport', ], name: 'APP', appFolder: 'app', controllers: [ 'Main' ], launch: function() { Ext.create('Ext.container.Viewport', { layout: 'fit', items: [ { xtype: 'main' } ] }); } }); where main above is an xtype for an MVC view,

How to set html to a element in extjs

拜拜、爱过 提交于 2019-12-05 22:26:14
问题 1) How to set HTML to already created panel or any other Element? I am a beginner. I tried the below to set some content inside the HTML var clickedElement = Ext.getCmp('id').el.child('>'); clickedElement.setHTML("hello"); The above is working fine but the problem is that as the panel has many div's inside it.. the above approach is erasing those inside html (i.e div's) and replacing it with the above content. I saw through Chrome that the panel has three nested div's. So, if I want to add

ExtJS 4.1 : How to combine local data with ajax loaded data in a single store?

寵の児 提交于 2019-12-05 21:21:14
I'm looking for a way to combine local data with ajax loaded data in a single store. It's difficult for me to explain this in english, I hope this piece of code will be more explicit : var store = Ext.create('Ext.data.Store', { autoLoad: true, fields: ['id', 'name'], proxy: { type: 'ajax', api: { read: '/read' } }, data: [{ id: 1, name: 'John' }] }); Json returned by "/read" : [{ id: 2, name: 'Jack' }] . Desired behaviour : store.count() // 2 You can use .load({addRecords: true} to add loaded records to existing records. Of course if you load again with the addRecords: true option enabled it