Xcelsius Dynamic Color Binding

April 6, 2010 by: David Lai

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.

Comments

23 Responses to “Xcelsius Dynamic Color Binding”
  1. Dwayne Harris says:

    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.

  2. David Lai says:

    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!

  3. Fred says:

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

    • David Lai says:

      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.

  4. Prem says:

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

    • David Lai says:

      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.

  5. Shamith says:

    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

    • David Lai says:

      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

  6. Sagar says:

    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

    • David Lai says:

      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

  7. PT_Curious says:

    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

    • David Lai says:

      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

  8. PT_Curious says:

    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

    • David Lai says:

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

  9. PT_Curious says:

    Thank you David!

    I hope SAP corrects it soon.

    PT_Curious.

  10. Sagar Reddy says:

    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

  11. Janek says:

    Not working in 2008 SP4

  12. gopi77 says:

    Hi,
    pie chart have 4 part, onc I click a part of the pie, i am getting a drill coloum graph, Now I need the coloum graph to be 4 different colour, the 4 colour has to be constant for each part of the pie.

    Help me.

  13. gopi77 says:

    have a drill down pie chart, once i click i am gettign the data change in coloum chart, now i need different colour for the colum chart, it has to be consistenty . Help me

  14. David Lai says:

    Hi Gopi,
    You’ll need to do some dynamic logic in your excel that is dependant on your pie selection to accomplish this.

  15. lisa wallace says:

    Hi!

    I am also working with a pie chart with 4 parts and using a bar chart to display what is on the pie chart. How can I get the bars on the bar chart to match the colors on the pie chart?

    Thanks!
    Lisa

    • David Lai says:

      Hi Lisa,
      You can use a cell to control the color on the bar chart.
      That cell will take whatever color is coming from the pie chart.

      Hope that helps!
      David

Leave a Reply


− 2 = six