I can have all 12 months on the screen at once, that will be my year
view.  Or I can do the month[number] thing to refence one month. I'm
tyring to put as much data into a single xml file as I can, and the just
hook the dataprovider up to sub sections of it. E4x's xpath like sytnax
allows me to do this (very nice).

Here is the code for moving through months.  The component simply throws
up an additional menu that lets the user choose from different chart
types (using the same data set).  I have to use the menu until I can
figure out how to enable horizontal access labels to be clicked upon
(allowing me to catch the event and the go to the charts for that
month). After I get v 1 out the door I can probably make the component
even more generic so that it will work for any time period from year
down to hour.

Yes, my first little Flexlet ;)

<?xml version="1.0" encoding="utf-8"?> 
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
         layout="absolute" xmlns:ns1="Components.*"  > 
          
<mx:Script> 
        <![CDATA[ 
         import mx.events.MenuEvent; 
         public function changeChartType(event:MenuEvent):void 
         { 
                 var itemLabel:String = [EMAIL PROTECTED]; 
                 switch( itemLabel) 
                 { 
                         case "January": 
                         monthComponent.categoryFieldString =
"day_name"; 
                         monthComponent.categoryAxisTitleString =
"January"; 
                         monthComponent.month_number = "1"; 
                         break; 
                        [....]
                 } 
         } 
        ]]> 
</mx:Script> 
          
 <mx:ApplicationControlBar width="100%" dock="true" > 
   <mx:MenuBar id="monthSelector" labelField="@label" 
            itemClick="changeMonth(event)" > 
             <mx:XMLList> 
                <menuitem label="Choose Month"> 
                <menuitem label="January" /> 
                <menuitem label="February" /> 
                [....]                                      
                </menuitem> 
             </mx:XMLList> 
   </mx:MenuBar> 
 </mx:ApplicationControlBar>   
  
<ns1:LOBs_By_Month id="monthComponent" categoryFieldString="day_name" 
                  categoryAxisTitleString="January" month_number="1"  />

</mx:Application>

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Tom Chiverton
Sent: Wednesday, February 06, 2008 9:58 AM
To: [email protected]
Subject: Re: [flexcoders] Adding Event to Object that doesnt have one


On Wednesday 06 Feb 2008, Brad Bueche wrote:
> <mx:HTTPService id="chartXML" url="http://path/createXML.php";
...
> Data provider for the chart looks like this" 
> dataProvider="{chartXML.lastResult.month[02].day}"
> That would the feb component.  There are 4 charts in here.  I change 
> charts by changing state. Charts are changed by using a combo box and 
> a case statement. For each state I use activate to call 
> "chartXML.send()".

My first thought was why the remote end sends back the month, so I guess
you 
have all 12 months on screen at once ?

If, as you say further down, it's an '02'/'2' thing, just change either
the 
Flex or the remote end so it does what you want.

-- 
Tom Chiverton
Helping to seamlessly expedite user-centric functionalities
on: http://thefalken.livejournal.com

****************************************************

This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England
and Wales under registered number OC307980 whose registered office
address is at Halliwells LLP, 3 Hardman Square, Spinningfields,
Manchester, M3 3EB.  A list of members is available for inspection at
the registered office. Any reference to a partner in relation to
Halliwells LLP means a member of Halliwells LLP.  Regulated by The
Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and
may be confidential or legally privileged.  If you are not the addressee
you must not read it and must not use any information contained in nor
copy it nor inform any person other than Halliwells LLP or the addressee
of its existence or contents.  If you have received this email in error
please delete it and notify Halliwells LLP IT Department on 0870 365
2500.

For more information about Halliwells LLP visit www.halliwells.com.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links




Reply via email to