Have shapes color match single data field.

K

Ken

I currently have a pie chart that can render each half a color; linked to
data in a database. blue/blue, red/blue, white/red, etc. In order to get the
shapes to match proper color I am useing two half circles each tied to a pair
of fields. I would like to use a single circle tied to a single field. Can
I use a split number such as 1/1 or 1.1 to control the color.
 
D

David Parker

You can split a decimal value into the Integer part with a formula like:
=INT(Prop.Row_1)
and get the decimal part with something like:
=(Prop.Row_1-INT(Prop.Row_1))*10

Then you could use these integer values to get the index in a color list,
eg:
FillForegnd=GUARD(INDEX(INT(Prop.Row_1),"RGB(255,0,0);RGB(0,255,0);RGB(0,0,255);...."))
FillBkgnd=GUARD(INDEX(((Prop.Row_1-INT(Prop.Row_1))*10),"RGB(255,0,0);RGB(0,255,0);RGB(0,0,255);...."))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top