Tuesday, April 6th, 2010

Xcelsius Dynamic Color Binding

Dynamic Color Binding is a great new feature in Xcelsius SP3 that allows developers to dynamically bind colors. This gives developers total flexibility on dynamically customizing their coloring schema during run time.

I’ve attached a video which shows a couple examples on using dynamic color binding.

If you have any additional examples that you would like to share, please post them on the comments section.


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

16 Responses

April 20, 2010
Dwayne Harris

David

I saw what you did but I guess what I am trying to do was not covered. I want to be able to show in a calendar alets for a specific day if there are ticket activity. Am I to follow the same procedures are demostrated in your presentation.


April 21, 2010
David Lai

Yes,
Watch the video and it will tell you how to bind cell colors to a certain property.
In your calendar object you would go to appearance, then choose the appropriate color section (ie: the month background), then click the binding button and select the appropriate cell (ie: E2 which can have a formula like “IF(A1=5,”red”,”black”)”)

Let me know if that helps!


August 18, 2010
Fred

How about binding colors to a specific column in a chart ?


August 18, 2010
David Lai

Hi Fred,
Yes you can. You will need to go to the alerts tab on the chart properties to do this. You will notice that you have full control of the coloring there if you uncheck “enable auto colors”.

Another note is that you cannot control individual column colors if you are using a stacked bar chart.


April 17, 2011
Prem

Hi-
I want to color individual dates on the calendar component to indicate types of activities on the particular date. Is this possible?


April 24, 2011
David Lai

Hi!
Unfortunately for any component (whether it be calendar, chart, selector, etc), you can only control the colors for any color fields on the “Appearance” icon. If you look at the calendar component, you will see that you cannot control the color of cells for multiple dates.
You could however somewhat emulate how a calendar looks using the grid component. However you wont be able to perform the same click interactions. Basically it would be a read only calendar that doesn’t allow you to click on a date cell.


May 11, 2011
Shamith

Hi, I’m I saw your video and some of the blogs which are great…I’m trying to find out if the following is possible with Excelsius.
I need to have two 2-dimensional graphs.
Graph 1- Plots Region/Client(X-axis) against no. of Projects (Y-axis). The client names can be say – A, B, C, D, & E.

Graph 2 – Plots Region/Client(X-axis) against no. of Late Projects (Y-axis). The client names can be say – A, B, C, D, & E.

Question – Can I always bind client A to say green, client B to say blue and so on..on both graphs..Basically I want the same colour for the same client on both graphs…Can this be achieved? If so how?
I would greatly appreciate your kind advice.
Tks


May 23, 2011
David Lai

Hi Shamith,
Yes you can emulate that.

You can dynamically bind your series colors. If you go to the series tab on the appearance section, you can set the colors appropriately. Each client will have to be it’s own series.
For example you will have 5 series in your case (A, B, C, D, & E)

Is this what you are trying to achieve?

Thanks
David


August 10, 2011
Sagar

Hi Folks,

I am having a problem with the Dynamic Binding. I am getting data dynamically,used vlookup condition to look for a particular name and displays a color based on the name on a graph.it is working fine with the static data. But whenever i am getting data from the database that colors are not showing and showing the graph with Black Colors. Could You please help on this?

Regards,
Sagar Reddy


August 11, 2011
PT_Curious

Hi! Excelent Post!

I’m having a problem with something like this that seems to me that is a xcelsius bug.
I have combination chart where I have three column series that change the metric through clicking a button, and I want them to change color too. I’ve done this binding the colors to conditioned cells. But the truth is that the colors on the series stay the way they are by default, it never changes with the click of the button. What can I be doing wrong?

Thanks in advance!
Pt_Curious


August 11, 2011
David Lai

Hi Sagar,
Try to use a spreadsheet table component to check that the color selected is correct. If not, the graph will show black.

Spreadsheet table is a great way to debug if you are having these color issues because most likely the cell that you are binding to is not correct.

Hope that helps
David


August 11, 2011
David Lai

Hi,
The best strategy to use here to make sure that the dynamic color cell that you are binding the series color to is working. To do this, create a spreadsheet component and then watch it during runtime to see if the cell is working as expected. For example it should say “Green” when you want green and “Red” when you want red.

Hope that helps!
David


August 12, 2011
PT_Curious

Hello,

I tried to bind the three same cells to three distinct background objects, and there the colors work well.
But I talked with a colleague who already used this en the past, and it worked well just the way I did, but today when he created nem charts with this, it doesn’t work. The old ones work, but the news don’t. The only explanation we found, is that it may be becausa of the Xcelsius version now installed. We already have SP4, but when it worked for him, he had an older version.

Can you confirm if it works for you in SP4?

Thank you very much,
PT_Curious


August 12, 2011
David Lai

@PT_Curious:
Hi,
You are right. There’s a bug on SP4 causing this issue.
Here’s the error message that my debugger gives me when you try to bind the chart object to a cell
Error: Invalid chain (expecting ArrayChainAccessor) or Invalid styleName (expecting styleName for Array)!
at xcelsius.binding.chain::ChainWalker$/styleWalkAndSet()

I’ll write a post to make sure SAP sees this and gets it fixed.

Thanks for your find!


August 12, 2011
PT_Curious

Thank you David!

I hope SAP corrects it soon.

PT_Curious.


September 27, 2011
Sagar Reddy

Hi Folks,

Dynamic color binding is working perfectly in SP3 version,but not in SP4. Thanks for all who helped me in this issue.

Regards,
Sagar Reddy



  • five + = 12