[flexcoders] Dynamic bar colors within same series for 100% BarChart?

2007-01-11 Thread j_sevlie
I have a 100% BarChart that will have two bars, each with two peices:

Bar #1: Target sales goal for the year.  
Chunk 1: Based on today's date, where SHOULD the store be for
sales.
Chunk 2: Based on today's date, how much SHOULD they have left
to sell.


Bar #2: Actual sales for the year.
Chunk 1: Sales the store has actually accumulated.
Chunk 2: Sales remaining to meet their goal.



So, let's say the following facts:

1. The store has a $100,000 sales goal for the year.  
2. The fiscal year runs from Jan-Dec.
3. It is currently July (for the sake of example).
4. So far, the store has had $40,000 in sales.

My bars should have the following data:

Target: 
1st chunk: $50,000 ($100,000/12months * 6)  (bar color: blue)
2nd chunk: $50,000 ($100,000 - 1st peice)   (bar color: gray)

Actual:
1st chunk: $40,000  (bar color: SEE BELOW)
2nd chunk: $60,000  (bar color: always gray)


Now, what I want to change dynamically on this chart is the bar color
of the 1st peice from "Actual".  For example, if the store is 20%
below where they should be for sales, I want the bar to be red.  If
they are within 5%, make it yellow.  Anything else and it's green.

However, the kicker here is that I want to leave the Target bar colors
alone.  The only thing that I want to change is the Actual bar, 1st chunk.

So, the question is:  Within the same 100% bar chart, can you change
the color of a single chunk within a bar while leaving the rest alone?

Sorry for the long winded setup, but I hope that makes sense what I'm
trying to accomplish.

Thanks,
Jake













[flexcoders] Re: Datagrid: Setting verticalscrollposition to where selectedIndex is

2006-09-08 Thread j_sevlie
I appreciate the response.

However, what happens when grid1 is sorted differently than grid2?

For example, an item (let's call it "A") might exist at the top of
grid1, but in grid2, "A" exists at the bottom (because the user has
sorted the columns differently.

In this case, setting the verticalScrollPositions the same won't help,
because that'll put it at the top of grid2, which is wrong.  It should
be at the bottom.

I basically want to do this: "Set the scroll position in a grid so
that the currently selected item is visible."

Thoughts?

-Jacob




--- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
> 
> Hi Jacob,
> 
> This should do the trick; without using a loop:
> 
> public function keepSelected(event:ListEvent):void {
>  if (grid1.selectedIndex >= 0)
>  {
>   grid2.selectedItem = grid1.selectedItem;
>   grid2.verticalScrollPosition = grid1.verticalScrollPosition;
>  }
> }
> 
> -TH
> 
> --- In flexcoders@yahoogroups.com, "j_sevlie"  wrote:
> >
> > Hello all, I have a question about our favorite topic -- datagrids!
> >
> > This is with Flex 2.
> >
> > Let's say that I have 2 identical datagrids, both with the same
> > dataprovider. What I want to accomplish is when a user selects
> > something in datagrid1, I want that same item to be selected in
> > datagrid2, INCLUDING scrolling down to where that item exists.
> >
> > Here's the code:
> >
> > 
> > http://www.adobe.com/2006/mxml";
> > layout="absolute">
> >
> > 
> > 
> > 
> >
> > 
> >  > parts="15" accessories="10" />
> >  > parts="10" accessories="15" />
> >  > parts="10" accessories="10" />
> >  > parts="15" accessories="5" />
> >  > usedsales="25" parts="15" accessories="10" />
> >  > usedsales="35" parts="10" accessories="15" />
> >  > usedsales="15" parts="10" accessories="10" />
> >  > usedsales="20" parts="15" accessories="5" />
> >  > usedsales="25" parts="15" accessories="10" />
> >  > usedsales="35" parts="10" accessories="15" />
> >  > usedsales="15" parts="10" accessories="10" />
> >  > usedsales="20" parts="15" accessories="5" />
> > 
> >
> >
> >  > itemClick="keepSelected(event)" height="199" dataProvider="{myData}">
> > 
> >  > dataField="region"/>
> >  > dataField="newsales"/>
> >  > dataField="usedsales"/>
> > 
> > 
> >
> >  > dataProvider="{myData}">
> > 
> >  > dataField="region"/>
> >  > dataField="newsales"/>
> >  > dataField="usedsales"/>
> > 
> > 
> >
> > 
> >
> > ---
> >
> > Any ideas? I just want to scroll the user down to the place where the
> > selectedItem is displayed. Is this even possible?
> >
> > Thanks,
> > Jacob
> >
>







--
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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Datagrid: Setting verticalscrollposition to where selectedIndex is

2006-09-07 Thread j_sevlie
Hello all, I have a question about our favorite topic -- datagrids!

This is with Flex 2.

Let's say that I have 2 identical datagrids, both with the same
dataprovider.  What I want to accomplish is when a user selects
something in datagrid1, I want that same item to be selected in
datagrid2, INCLUDING scrolling down to where that item exists.

Here's the code:


http://www.adobe.com/2006/mxml";
layout="absolute">

  
   
  

  
   
   
   
   
   
   
   
   
   
   
   
   
  


  
   



   
  

  
   



   
  



---

Any ideas?  I just want to scroll the user down to the place where the
selectedItem is displayed.   Is this even possible?

Thanks,
Jacob








 Yahoo! Groups Sponsor ~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/WktRrD/lOaOAA/yQLSAA/nhFolB/TM
~-> 

--
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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Customizing datatip function for 100% bar chart

2006-09-01 Thread j_sevlie
Oh, and another thing -- my next logical question is:

How do you access the PERCENTAGE that Flex calculates for you
automatically in a 100% bar chart?  Normally with the default
renderer, Flex will show both the series name, the value of that block
in the bar, and what percentage that block is of the total bar.

However, when I'm making my custom datatips, I want to have access to
that generated percentage.  Anybody know how to get it?

Thanks!
Jacob






--- In flexcoders@yahoogroups.com, "Matt Horn" <[EMAIL PROTECTED]> wrote:
>
> > return Series(e.item.element).displayName;
> 
> This didn't work for me, but this did:
> 
>   return BarSeries(e.element).displayName; 
> 
> hth,
> 
> m
> 
> > -Original Message-
> > From: flexcoders@yahoogroups.com 
> > [mailto:[EMAIL PROTECTED] On Behalf Of Ely Greenfield
> > Sent: Thursday, August 31, 2006 1:27 PM
> > To: flexcoders@yahoogroups.com
> > Subject: RE: [flexcoders] Customizing datatip function for 
> > 100% bar chart
> > 
> >  
> >  
> >  
> > return Series(e.item.element).displayName;
> >  
> > Ely.
> >  
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> > [mailto:[EMAIL PROTECTED] On Behalf Of j_sevlie
> > Sent: Thursday, August 31, 2006 9:17 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Customizing datatip function for 100% bar chart
> > 
> > 
> > 
> > Using Flex 2.
> > 
> > I have a 100% bar chart that I need help figuring out how to 
> > get access to some of the series data for display in a data 
> > tip. Here's the scenario:
> > 
> > There are 4 regions in the country, each of them gets their 
> > own bar in the chart..
> > 
> > - North Region
> > - South Region
> > - West Region
> > - East Region
> > 
> > Each bar has 4 individual peices to it, which together sum to 100%:
> > 
> > - Used Sales
> > - New Sales
> > - Parts
> > - Accessories
> > 
> > What I need is a way to display the name of the grouping 
> > (Used Sales, New Sales, etc) inside my datatip. I cannot for 
> > the life of me figure out how to do this.
> > 
> > Here's the code that I'm working with:
> > 
> > -
> > 
> > 
> > 
> > 
> >  > id="barchartDealers" type="100%" showDataTips="true"
> > dataTipFunction="dataTipsBarChart">
> > 
> > 
> >  > accessories="10" />
> >  > accessories="15" />
> >  > accessories="10" />
> >  > accessories="5" />
> > 
> > 
> > 
> >  
> >> minimum="0" maximum="100"/>   
> >  > xField="newsales">   > color="0x009900"/>> displayName="Used Sales" yField="region"
> > xField="usedsales">
> > 
> > 
> > 
> > 
> >  > xField="parts">   
> >> displayName="Accessories" yField="region"
> > xField="accessories">
> > 
> > 
> > 
> > 
> > 
> > 
> >  > width="522" height="31" fontSize="9" id="barchartDealersLegend"/>
> > -
> > 
> > Any help with this would be greatly appreciated!
> > 
> > I hope that my example was clear enough, it should run on 
> > it's own if you cut/paste it into a blank Flex app.
> > 
> > 
> > 
> >  
> >
>







--
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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Customizing datatip function for 100% bar chart

2006-09-01 Thread j_sevlie
Wow, MANY thanks for the help!  This is a life saver for me.  Again,
another example of something that I don't think I would have ever
figured out (seems to be a lot of those cases with Flex).  

-Jacob


--- In flexcoders@yahoogroups.com, "Matt Horn" <[EMAIL PROTECTED]> wrote:
>
> > return Series(e.item.element).displayName;
> 
> This didn't work for me, but this did:
> 
>   return BarSeries(e.element).displayName; 
> 
> hth,
> 
> m
> 
> > -Original Message-
> > From: flexcoders@yahoogroups.com 
> > [mailto:[EMAIL PROTECTED] On Behalf Of Ely Greenfield
> > Sent: Thursday, August 31, 2006 1:27 PM
> > To: flexcoders@yahoogroups.com
> > Subject: RE: [flexcoders] Customizing datatip function for 
> > 100% bar chart
> > 
> >  
> >  
> >  
> > return Series(e.item.element).displayName;
> >  
> > Ely.
> >  
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> > [mailto:[EMAIL PROTECTED] On Behalf Of j_sevlie
> > Sent: Thursday, August 31, 2006 9:17 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Customizing datatip function for 100% bar chart
> > 
> > 
> > 
> > Using Flex 2.
> > 
> > I have a 100% bar chart that I need help figuring out how to 
> > get access to some of the series data for display in a data 
> > tip. Here's the scenario:
> > 
> > There are 4 regions in the country, each of them gets their 
> > own bar in the chart..
> > 
> > - North Region
> > - South Region
> > - West Region
> > - East Region
> > 
> > Each bar has 4 individual peices to it, which together sum to 100%:
> > 
> > - Used Sales
> > - New Sales
> > - Parts
> > - Accessories
> > 
> > What I need is a way to display the name of the grouping 
> > (Used Sales, New Sales, etc) inside my datatip. I cannot for 
> > the life of me figure out how to do this.
> > 
> > Here's the code that I'm working with:
> > 
> > -
> > 
> > 
> > 
> > 
> >  > id="barchartDealers" type="100%" showDataTips="true"
> > dataTipFunction="dataTipsBarChart">
> > 
> > 
> >  > accessories="10" />
> >  > accessories="15" />
> >  > accessories="10" />
> >  > accessories="5" />
> > 
> > 
> > 
> >  
> >> minimum="0" maximum="100"/>   
> >  > xField="newsales">   > color="0x009900"/>> displayName="Used Sales" yField="region"
> > xField="usedsales">
> > 
> > 
> > 
> > 
> >  > xField="parts">   
> >> displayName="Accessories" yField="region"
> > xField="accessories">
> > 
> > 
> > 
> > 
> > 
> > 
> >  > width="522" height="31" fontSize="9" id="barchartDealersLegend"/>
> > -
> > 
> > Any help with this would be greatly appreciated!
> > 
> > I hope that my example was clear enough, it should run on 
> > it's own if you cut/paste it into a blank Flex app.
> > 
> > 
> > 
> >  
> >
>






--
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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Customizing datatip function for 100% bar chart

2006-08-31 Thread j_sevlie
Using Flex 2.

I have a 100% bar chart that I need help figuring out how to get
access to some of the series data for display in a data tip.  Here's
the scenario:

There are 4 regions in the country, each of them gets their own bar in
the chart.

- North Region
- South Region
- West Region
- East Region

Each bar has 4 individual peices to it, which together sum to 100%:

- Used Sales 
- New Sales
- Parts
- Accessories

What I need is a way to display the name of the grouping (Used Sales,
New Sales, etc) inside my datatip.  I cannot for the life of me figure
out how to do this.

Here's the code that I'm working with:


-











































-

Any help with this would be greatly appreciated!

I hope that my example was clear enough, it should run on it's own if
you cut/paste it into a blank Flex app.








--
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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Specifying LineSeries itemRenderer with Actionscript

2006-08-29 Thread j_sevlie
Thank you very much!  That worked as I had hoped.  How are people like
us supposed to ever figure that out on our own?  I would have never
thought to create a new ClassFactory... 

--- In flexcoders@yahoogroups.com, "Ely Greenfield" <[EMAIL PROTECTED]> wrote:
>
>  
>  
> on charts, itemRenderers are styles, of type IFactory.  so you want to
> do this:
>  
> import mx.charts.renderers.DiamondItemRenderer;
>  
> ...
> columnSeries.setStyle("itemRenderer",new
ClassFactory(DiamondItemRenderer));
>  
> Ely.
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of j_sevlie
> Sent: Friday, August 25, 2006 1:00 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Specifying LineSeries itemRenderer with
> Actionscript
> 
> 
> 
> I have some LineSeries charts that are generated all through
> ActionScript (because the number of lines I need is not know until
> run-time).
> 
> --- CODE START ---
> var seriesArray:Array = new Array();
> var i:int;
> var marketShareData:ArrayCollection = new ArrayCollection;
> 
> marketShareData = wsData.getMarketShare.lastResult;
> 
> for(i=0; i // Line for brand-specific data
> var columnSeries:ColumnSeries = new ColumnSeries();
> columnSeries.xField = "fiscalyear";
> columnSeries.yField = "sharepercentage";
> columnSeries.dataProvider = marketShareData.getItemAt(i);
> columnSeries.displayName =
> marketShareData.getItemAt(i).getItemAt(0).series; 
> seriesArray.push(columnSeries);
> }
> columnchartMarketShare.dataProvider = marketShareData;
> columnchartMarketShare.series = seriesArray;
> --- CODE END ---
> 
> My question is: How in the world do I specify a custom itemRenderer
> through Actionscript? With MXML you can do it like this:
> 
>  itemRenderer="mx.charts.renderers.DiamondItemRenderer"/>
> 
> But I'm not defining my LineSeries that way. I saw the demo of the
> charting stuff over at QuietlyScheming.com
> (http://demo.quietlyscheming.com/ChartSampler/app.html
> <http://demo.quietlyscheming.com/ChartSampler/app.html> ) but he's also
> defining the series at design-time.
> 
> Any thoughts? 
> 
> Thanks in advance for any help that somebody can provide.
> 
> Cheers,
> Jacob
>






--
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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Flex Builder 2, getting slower as code grows

2006-08-29 Thread j_sevlie
Is there some kind of coding limitation on how much Flex Builder can
handle before it gets completely unusable?

I'm currently working on a rather complicated project that's sitting
at about 1,700 lines of code, and the code editor in Flex Builder is
getting painfully slow to work with.  If I just start typing anything
I can watch my CPU spike to 100% and sit there until I'm done typing.

I still need to use Design mode because it's *awesome* for lining
everything up.  Is this a case where I'm just going to have to find a
way to break everything up into smaller components?  About 70% of the
1,700 lines is all Actionscript.

I've got a P4 with 2 GB of RAM and Flex Builder will routinely consume
400-600MB of memory while I'm working.

Thanks, Jacob







--
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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Specifying LineSeries itemRenderer with Actionscript

2006-08-25 Thread j_sevlie
I have some LineSeries charts that are generated all through
ActionScript (because the number of lines I need is not know until
run-time).

--- CODE START ---
var seriesArray:Array = new Array();
var i:int;
var marketShareData:ArrayCollection = new ArrayCollection;

marketShareData = wsData.getMarketShare.lastResult;

for(i=0; i

But I'm not defining my LineSeries that way.  I saw the demo of the
charting stuff over at QuietlyScheming.com
(http://demo.quietlyscheming.com/ChartSampler/app.html) but he's also
defining the series at design-time.

Any thoughts?  

Thanks in advance for any help that somebody can provide.

Cheers,
Jacob







--
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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/