RE: [flexcoders] Controlling Pie Chart Colors

2005-05-19 Thread Battershall, Jeff
Ely,

Thanks. So how do you drill down to the correct style object?  If try to
give my PieSeries an id, the compiler says, Nested object properties
cannot have IDs.  Setting the fills style for the PieChart.series
object seems to have no effect whatsoever.

Jeff

Code Sample:

mx:PieChart  
dataProvider={fundModel.assetAllocationByFund} 
id=assetPieChart
width=200 
height=140 
showDataTips=true 
creationComplete=setFills()
borderStyle=solid
mx:series
mx:Array
mx:PieSeries
field=percent 
nameField=className   
labelPosition=callout 
labelFunction=displayType 
calloutGap=0/
/mx:Array
/mx:series
/mx:PieChart

function setFills()
{
var arr =
[0xFFCC66,0x69AFD3,0xC0D9EC,0xB9BDBF,0x005C7C,0x6D6F71];
assetPieChart.series.setStyle(fills,arr);
}

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ely Greenfield
Sent: Wednesday, May 18, 2005 2:33 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Controlling Pie Chart Colors





Hi Jeff. You should absolutely be able to set the fills array at
runtime. Something like:


mySeries.setStyle(fills, [0xFF,0x00FF00,0xFF]);

should work.  Can you send me a snippet of sample code?

Incidentally ,if you want to make sure it pulls the same colors without
having to change the fills style on the fly, you could insert 0 values
for the missing classifications. Probably not the answer you're looking
for, though, since they would then end up in the legend, which might be
a bad thing.

Ely.


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Wednesday, May 18, 2005 11:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Controlling Pie Chart Colors
Importance: High

I've got a situation where certain pie charts may or may not have
certain classifications won't be represented if there are no values
available in the data provider. The colors are not consistent from chart
to chart - its just pulling the next color from the fill array. So say
on one chart cash might appear blue and for another dataprovider it
might appear green. 

I'd like to be able to make a certain section of a pie chart ALWAYS have
a certain color.  This is easy to do with area charts but I'm finding it
not as easy with pie charts.  If I alter the fill array programmatically
that would be good, but in my limited testing I couldn't seem to be able
to do that at runtime.

I tried manually creating a nest array of PieSeries and mapping each one
to a different field and color, but that did not seem to work either. 

Jeff Battershall
Application Architect
Dow Jones Indexes
[EMAIL PROTECTED]
(609) 520-5637 (p)
(484) 477-9900 (c)


 
Yahoo! Groups Links



 




 
Yahoo! Groups Links



 





 
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/
 




RE: [flexcoders] Controlling Pie Chart Colors

2005-05-19 Thread Ely Greenfield



Yes, ids are not supported on faceless objects in Flex 1.5.

Try:

assetPieChart.series[0].setStyle(...);

Ely.


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Thursday, May 19, 2005 6:53 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Controlling Pie Chart Colors
Importance: High

Ely,

Thanks. So how do you drill down to the correct style object?  If try to
give my PieSeries an id, the compiler says, Nested object properties
cannot have IDs.  Setting the fills style for the PieChart.series
object seems to have no effect whatsoever.

Jeff

Code Sample:

mx:PieChart  
dataProvider={fundModel.assetAllocationByFund} 
id=assetPieChart
width=200 
height=140 
showDataTips=true 
creationComplete=setFills()
borderStyle=solid
mx:series
mx:Array
mx:PieSeries
field=percent 
nameField=className   
labelPosition=callout 
labelFunction=displayType 
calloutGap=0/
/mx:Array
/mx:series
/mx:PieChart

function setFills()
{
var arr =
[0xFFCC66,0x69AFD3,0xC0D9EC,0xB9BDBF,0x005C7C,0x6D6F71];
assetPieChart.series.setStyle(fills,arr);
}

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ely Greenfield
Sent: Wednesday, May 18, 2005 2:33 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Controlling Pie Chart Colors





Hi Jeff. You should absolutely be able to set the fills array at
runtime. Something like:


mySeries.setStyle(fills, [0xFF,0x00FF00,0xFF]);

should work.  Can you send me a snippet of sample code?

Incidentally ,if you want to make sure it pulls the same colors without
having to change the fills style on the fly, you could insert 0 values
for the missing classifications. Probably not the answer you're looking
for, though, since they would then end up in the legend, which might be
a bad thing.

Ely.


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Wednesday, May 18, 2005 11:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Controlling Pie Chart Colors
Importance: High

I've got a situation where certain pie charts may or may not have
certain classifications won't be represented if there are no values
available in the data provider. The colors are not consistent from chart
to chart - its just pulling the next color from the fill array. So say
on one chart cash might appear blue and for another dataprovider it
might appear green. 

I'd like to be able to make a certain section of a pie chart ALWAYS have
a certain color.  This is easy to do with area charts but I'm finding it
not as easy with pie charts.  If I alter the fill array programmatically
that would be good, but in my limited testing I couldn't seem to be able
to do that at runtime.

I tried manually creating a nest array of PieSeries and mapping each one
to a different field and color, but that did not seem to work either. 

Jeff Battershall
Application Architect
Dow Jones Indexes
[EMAIL PROTECTED]
(609) 520-5637 (p)
(484) 477-9900 (c)


 
Yahoo! Groups Links



 




 
Yahoo! Groups Links



 





 
Yahoo! Groups Links



 




 
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/
 




RE: [flexcoders] Controlling Pie Chart Colors

2005-05-19 Thread Battershall, Jeff
Ely,

THAT WORKS, thank you! This needs some better documentation! 

Jeff

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ely Greenfield
Sent: Thursday, May 19, 2005 12:28 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Controlling Pie Chart Colors





Yes, ids are not supported on faceless objects in Flex 1.5.

Try:

assetPieChart.series[0].setStyle(...);

Ely.


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Thursday, May 19, 2005 6:53 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Controlling Pie Chart Colors
Importance: High

Ely,

Thanks. So how do you drill down to the correct style object?  If try to
give my PieSeries an id, the compiler says, Nested object properties
cannot have IDs.  Setting the fills style for the PieChart.series
object seems to have no effect whatsoever.

Jeff

Code Sample:

mx:PieChart  
dataProvider={fundModel.assetAllocationByFund} 
id=assetPieChart
width=200 
height=140 
showDataTips=true 
creationComplete=setFills()
borderStyle=solid
mx:series
mx:Array
mx:PieSeries
field=percent 
nameField=className   
labelPosition=callout 
labelFunction=displayType 
calloutGap=0/
/mx:Array
/mx:series
/mx:PieChart

function setFills()
{
var arr =
[0xFFCC66,0x69AFD3,0xC0D9EC,0xB9BDBF,0x005C7C,0x6D6F71];
assetPieChart.series.setStyle(fills,arr);
}

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ely Greenfield
Sent: Wednesday, May 18, 2005 2:33 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Controlling Pie Chart Colors





Hi Jeff. You should absolutely be able to set the fills array at
runtime. Something like:


mySeries.setStyle(fills, [0xFF,0x00FF00,0xFF]);

should work.  Can you send me a snippet of sample code?

Incidentally ,if you want to make sure it pulls the same colors without
having to change the fills style on the fly, you could insert 0 values
for the missing classifications. Probably not the answer you're looking
for, though, since they would then end up in the legend, which might be
a bad thing.

Ely.


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Wednesday, May 18, 2005 11:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Controlling Pie Chart Colors
Importance: High

I've got a situation where certain pie charts may or may not have
certain classifications won't be represented if there are no values
available in the data provider. The colors are not consistent from chart
to chart - its just pulling the next color from the fill array. So say
on one chart cash might appear blue and for another dataprovider it
might appear green. 

I'd like to be able to make a certain section of a pie chart ALWAYS have
a certain color.  This is easy to do with area charts but I'm finding it
not as easy with pie charts.  If I alter the fill array programmatically
that would be good, but in my limited testing I couldn't seem to be able
to do that at runtime.

I tried manually creating a nest array of PieSeries and mapping each one
to a different field and color, but that did not seem to work either. 

Jeff Battershall
Application Architect
Dow Jones Indexes
[EMAIL PROTECTED]
(609) 520-5637 (p)
(484) 477-9900 (c)


 
Yahoo! Groups Links



 




 
Yahoo! Groups Links



 





 
Yahoo! Groups Links



 




 
Yahoo! Groups Links



 





 
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/
 




RE: [flexcoders] Controlling Pie Chart Colors

2005-05-19 Thread Battershall, Jeff
As a contribution to the group knowledge as to one way to address this
matter - create an array of hex colors and bind the fills property of
your PieSeries to this, then programmatically alter this array depending
on data provider contents - that way you don't need to worry about
drilling into the series array. 

Jeff

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Thursday, May 19, 2005 12:45 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Controlling Pie Chart Colors


Ely,

THAT WORKS, thank you! This needs some better documentation! 

Jeff

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ely Greenfield
Sent: Thursday, May 19, 2005 12:28 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Controlling Pie Chart Colors





Yes, ids are not supported on faceless objects in Flex 1.5.

Try:

assetPieChart.series[0].setStyle(...);

Ely.


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Thursday, May 19, 2005 6:53 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Controlling Pie Chart Colors
Importance: High

Ely,

Thanks. So how do you drill down to the correct style object?  If try to
give my PieSeries an id, the compiler says, Nested object properties
cannot have IDs.  Setting the fills style for the PieChart.series
object seems to have no effect whatsoever.

Jeff

Code Sample:

mx:PieChart  
dataProvider={fundModel.assetAllocationByFund} 
id=assetPieChart
width=200 
height=140 
showDataTips=true 
creationComplete=setFills()
borderStyle=solid
mx:series
mx:Array
mx:PieSeries
field=percent 
nameField=className   
labelPosition=callout 
labelFunction=displayType 
calloutGap=0/
/mx:Array
/mx:series
/mx:PieChart

function setFills()
{
var arr =
[0xFFCC66,0x69AFD3,0xC0D9EC,0xB9BDBF,0x005C7C,0x6D6F71];
assetPieChart.series.setStyle(fills,arr);
}

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ely Greenfield
Sent: Wednesday, May 18, 2005 2:33 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Controlling Pie Chart Colors





Hi Jeff. You should absolutely be able to set the fills array at
runtime. Something like:


mySeries.setStyle(fills, [0xFF,0x00FF00,0xFF]);

should work.  Can you send me a snippet of sample code?

Incidentally ,if you want to make sure it pulls the same colors without
having to change the fills style on the fly, you could insert 0 values
for the missing classifications. Probably not the answer you're looking
for, though, since they would then end up in the legend, which might be
a bad thing.

Ely.


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Wednesday, May 18, 2005 11:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Controlling Pie Chart Colors
Importance: High

I've got a situation where certain pie charts may or may not have
certain classifications won't be represented if there are no values
available in the data provider. The colors are not consistent from chart
to chart - its just pulling the next color from the fill array. So say
on one chart cash might appear blue and for another dataprovider it
might appear green. 

I'd like to be able to make a certain section of a pie chart ALWAYS have
a certain color.  This is easy to do with area charts but I'm finding it
not as easy with pie charts.  If I alter the fill array programmatically
that would be good, but in my limited testing I couldn't seem to be able
to do that at runtime.

I tried manually creating a nest array of PieSeries and mapping each one
to a different field and color, but that did not seem to work either. 

Jeff Battershall
Application Architect
Dow Jones Indexes
[EMAIL PROTECTED]
(609) 520-5637 (p)
(484) 477-9900 (c)


 
Yahoo! Groups Links



 




 
Yahoo! Groups Links



 





 
Yahoo! Groups Links



 




 
Yahoo! Groups Links



 





 
Yahoo! Groups Links



 





 
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/
 




RE: [flexcoders] Controlling Pie Chart Colors

2005-05-18 Thread Ely Greenfield



Hi Jeff. You should absolutely be able to set the fills array at runtime.
Something like:


mySeries.setStyle(fills, [0xFF,0x00FF00,0xFF]);

should work.  Can you send me a snippet of sample code?

Incidentally ,if you want to make sure it pulls the same colors without
having to change the fills style on the fly, you could insert 0 values for
the missing classifications. Probably not the answer you're looking for,
though, since they would then end up in the legend, which might be a bad
thing.

Ely.


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Wednesday, May 18, 2005 11:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Controlling Pie Chart Colors
Importance: High

I've got a situation where certain pie charts may or may not have
certain classifications won't be represented if there are no values
available in the data provider. The colors are not consistent from chart
to chart - its just pulling the next color from the fill array. So say
on one chart cash might appear blue and for another dataprovider it
might appear green. 

I'd like to be able to make a certain section of a pie chart ALWAYS have
a certain color.  This is easy to do with area charts but I'm finding it
not as easy with pie charts.  If I alter the fill array programmatically
that would be good, but in my limited testing I couldn't seem to be able
to do that at runtime.

I tried manually creating a nest array of PieSeries and mapping each one
to a different field and color, but that did not seem to work either. 

Jeff Battershall
Application Architect
Dow Jones Indexes
[EMAIL PROTECTED]
(609) 520-5637 (p)
(484) 477-9900 (c)


 
Yahoo! Groups Links



 




 
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/