[flexcoders] firstVisibleItem with AdvancedDataGrid, potential bug?

2008-01-04 Thread picklzzz
Hello,

Has anyone attempted to programatically set the firstVisibleItem
property of AdvancedDataGrid and got it to work. I have a plotChart
and an associated ADG populated with a superset of the data used for
the plotChart. I want a click on an item from the plotChart to change
the firstVisibleItem so that the individual's full record is visible
in the first row of the ADG.

At present, I have a function:

private function scatterChartSelect(e:ChartItemEvent):void {
myADG.firstVisibleItem =  
scatterChart.selectedChartItem;
  }

That is triggered using itemClick in the plotChart. When a dot is
clicked, the ADG scrolls to the bottom of the entries, which seems
peculiar. 



[flexcoders] Re: fillfunction on third variable with plotChart

2008-01-03 Thread picklzzz
Thank you for the suggestion,

I'm a newbie to Flex, and put together the following before I
saw your suggestion:

private function myWriteFillFunction(element:ChartItem,
index:Number):IFill {
var c:SolidColor = new SolidColor(0x88);
var item:Object = new Object();   
var wperlev:int = mySchoolData[index].wps07;

if (wperlev == 1) 
return c;
if (wperlev == 2) 
c.color = 0x00;
if (wperlev == 3) 
c.color = 0x00FF00;
if (wperlev == 4) 
c.color = 0xFF;
return c;
}

This correctly colors the dots of the plotChart in one of four
different colors depending upon the value of the field wps07. 
Your example seems to avoid all the stuff with the index, which
caused me a lot of problems. My dataProvider to my series has
values that are null. When filterData is set to true (which it is
by default for the plotSeries) the data passed to the plotChart
excludes the null values (which is good), but then when the index
is used to color the points, it is off because is includes the null
values. 

I find working with data in Flex to be extremely cumbersome compared
to what I've experienced working with statistical analysis software
(e.g., R) Hopefully, I just need to learn more about the manner in
which one manipulates data in Flex/Actionscript.

Thank you for your help 

--- In flexcoders@yahoogroups.com, Christophe Jolif [EMAIL PROTECTED] wrote:

 Hi,
 
 Not tested at all, but I would in my fill function:
 
 1/ get the original item:
 
 var data:Object = item.item;
 
 2/ get the value in the  field I'm interested in:
 
 var value:Object = data.myfield;
 
 3/ do whatever coloring I want to do with it.
 
 Is that what you are doing and is failing?
 -- 
 Christophe
 ILOG Elixir
 http://flex.ilog.com
 
 picklzzz wrote:
  Hello,
  
  I'm attempting to write a fillFunction for use with a plotChart that
  color codes dots based upon the value on a third field.
  
  For example, a plot chart of individual's heights (xField) verus
  weight (yField) color coded by ethnicity. 
  
  The examples provided in the Flex documentation use values of the
  xField or yField to control color selection. How does one use the
  value of a third variable to control color selection?
  
  I have created something that kind of works, but I have an
  AdvancedDataGrid displaying the data and when I sort in the
  AdvancedDataGrid, it messes up the index I use to color the dots.
  
  If anyone else has worked through this, I'd appreciate any insights
  you can offer.
  
  
  
  --
  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
  
  
  
  
 





[flexcoders] Per Item Strokes, is it possible

2008-01-03 Thread picklzzz
Has anyone developed code to display per item strokes? I have a plot
chart with dots color coded by ethnicity. I'd like to create pink and
blue strokes around the dots conditional upon the gender of the
individual. 

Thanks to all for this great resource,





[flexcoders] fillfunction on third variable with plotChart

2008-01-01 Thread picklzzz
Hello,

I'm attempting to write a fillFunction for use with a plotChart that
color codes dots based upon the value on a third field.

For example, a plot chart of individual's heights (xField) verus
weight (yField) color coded by ethnicity. 

The examples provided in the Flex documentation use values of the
xField or yField to control color selection. How does one use the
value of a third variable to control color selection?

I have created something that kind of works, but I have an
AdvancedDataGrid displaying the data and when I sort in the
AdvancedDataGrid, it messes up the index I use to color the dots.

If anyone else has worked through this, I'd appreciate any insights
you can offer.



[flexcoders] Bubbleplot with area instead of linear axis

2007-11-05 Thread picklzzz
I'd like to change the default bubbleplot setting with the radiusAxis
set to linear to a much more defensible area relationship.

My first attempt was to simply transform my radiusField using the
Math.sqrt function and continue using the default LinearAxis for
radiusAxis. However, I couldn't figure out (in a simple fashion) how
to take the square root of the entries in the field.

Next, I thought I would change the radiusAxis to perform the square
root tranformation, but that didn't appear to be simple.

I could, of course, accomplish this by pre-transforming the
radiusField in my data using the square root, but that is not elegant.

Any help on this would be greatly appreciated,







[flexcoders] List change event to BubbleChart

2007-10-28 Thread picklzzz
I'm a newbie and have, what I think is, a simple task:

I have a BubbleChart populated from an ArrayCollection consisting
of fields name, x, y, and size. I populate an adjoining List
with the name field. I would like to be able to select on, possibly
multiple, names in the List and have the bubble in the bubblechart get
highlighted (perhaps by glowing or having the other bubbles alpha value
increase so they aren't as prominent)

I can't figure out whether a filter is necessary (I already have another
filter for my arraycollection) or there's another way.

Any help would be greatly appreciated.