Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to apply seriesStyles to piechart in ExtJs dynamically
    primarykey
    data
    text
    <p>Am trying to set 'seriesstyles' to piechart dynamically from the JSON data. When the 'oneWeekStore' loads the JSON data, I wish to iterate through the 'color' of each record and setSeriesStyles dynamically to PieChart. Below is the snippet.</p> <pre><code>var oneWeekStore = new Ext.data.JsonStore({ id:'jsonStore', fields: ['appCount','appName'], autoLoad: true, root: 'rows', proxy:storeProxy, baseParams:{ 'interval':'oneWeek', 'fromDate':frmDt.getValue() }, listeners: {load: { fn:function(store,records,options) { /*I wish iterate through each record,fetch 'color' and setSeriesStyles. I tried passing sample arrays as paramater to setSeriesStyles like **colors= new Array('0x08E3FE','0x448991','0x054D56'); Ext.getCmp('test12').setSeriesStyles(colors)** But FF throws error "this.swf is undefined". Could you please let me know the right format to pass as parameter. */ } }); var panel = new Ext.Panel{ id: '1week', title:'1 week', items : [ { id:'test12', xtype : 'piechart', store : oneWeekStore, dataField : 'appCount', categoryField : 'appName', extraStyle : { legend:{ display : 'right', padding : 5, spacing: 2, font :color:0x000000,family: 'Arial', size:9}, border:{size :1,color :0x999999}, background:{color: 0xd6e1cc} } } } ] } </code></pre> <p>My JSON data looks below:</p> <pre><code>{"success":true,"rows":[{"appCount":"9693814","appName":"GED","color":"0xFB5D0D"},{"appCount":"5731","appName":"SGEF"","color":"0xFFFF6B"}]} </code></pre> <p>Your guidance is highly appreciated</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload