actionscript 3 - Flash Builder 4.6 | Pie Chart not able to refresh -


i’m having trouble getting pie chart in flash builder 4.6 | halo theme | mx:application update properly. i’m working between 2 states.

states

  • state 1 - has datagrid , comboboxes filter datagrid. current datagrid view i’m storing 6 category totals variables
  • state 2 - have pie chart bound arraycollection

setup

  • i have global bindable arraycollection
  • the pie chart bound global arraycollection
  • i have function creates arraycollection items (which include category variables), assigns global arraycollection.

problem

  • when state 2 loads, pie chart pulls in correct data. when go state 1, adjust filters update category totals, go state 2 pie chart keeping original data , need refresh.

what i’ve noted/tested

  • i display category total in other areas within state 2, know totals updating
  • i placed pie chart in state 1 (which has filters) , whenever adjusted filters, pie graph updated correctly
  • i’ve tired placing button in state 2 refresh arraycollection & refresh dataprovider of chart

here's of code tied pie chart. in advance!

[the charthandler via creationcomplete]

[bindable] public var chartdataglobal:arraycollection = new arraycollection([]);          protected function charthandler():void         {             // todo auto-generated method stub             var chartdata:arraycollection = new arraycollection( [                 { category: "clinical", total: clinicaltotal},                 { category: "rehab", total:  rehabtotal},                 { category: "healthcare", total: healthcaretotal },                 { category: "textiles", total: textilestotal },                 { category: "foodservice", total: foodservicetotal },                 { category: "environmental", total: environmentaltotal }]);              chartdataglobal=chartdata;          }  <mx:piechart id="chart" includein="summary" x="-8" y="22" width="357" height="378"  paddingleft="5" paddingright="5" showdatatips="true" x.start="39" y.start="42"                          height.summary="386" dataprovider="{chartdataglobal}">                           <mx:series>                     <mx:pieseries id="pieseries" namefield="category" field="total">                                             <mx:filters>                             <mx:dropshadowfilter />                         </mx:filters>                     </mx:pieseries>                 </mx:series>             </mx:piechart> 

i had pie chart nested inside sgroup, hbox. after removing chart , placing on stage, started pulling in updated totals. i'm not sure why mattered, it's working.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -