[HOW TO] Dynamic Positioning of Objects in Xcelsius / Dashboards (In 2 easy steps!)
One of the most common questions regarding Dashboard Design concerns the ability to change an object’s position dynamically. This opens up a new realm of possibilities with dynamic labels in charts, dials and sliders which move, dragging & dropping objects, and so on.
Instead of answering these questions over and over, I’ve decided to put my answer into a neat little package. Now I can just link you here whenever you ask!
These steps look a lot more complicated than they really are, because we’ll be manually editing the raw XML files in Notepad. Be brave, and I’ll try to guide you closely.
1. Add the object you want to move dynamically
First, we add 3 objects to the dashboard:
- Icon Component: this is the object we’ll be moving. This could be anything you want, but I’ll use the Icon because it’s a clear and big green dot. Set the following properties:
- Dynamic Visibility Status: B1
- Dynamic Visibility Key: B2
These bindings are just done for future convenience. In the next step, we’ll manually edit the text file and bind the ‘x-position’ to B1 and the ‘y-position’ to B2.
2. Two Value Components: these will control the ‘x’ and ‘y’ position of the object. Give them the following properties:
- Minimum value: 0
- Maximum value: 1000
- 1st Value component: Data = B1
- 2nd Value component: Data = B2
2. Edit the raw Xcelsius file (This is where the magic happens)
Now follow these steps closely:
- Save and exit your dashboard. Save it as ‘dashboard.xlf’ on your desktop.
- Rename the .xlf file into .zip (e.g., dashboard.xlf –> dashboard.zip)
- Open the .zip file; you’ll find a file called “document.xml”.
4. Copy ‘document.xml’ onto your desktop, then right-click and go to Edit. It will open with Notepad.
Yes, this file looks like a complicated mess, so bear with me. The file is just a big list of properties for all the objects on my spreadsheet. There are 3 main blocks of text: one for the Icon component and 2 for the Value components. If you’re curious, read through it for a few minutes and it will begin to make sense. If you’re not curious, just follow these steps blindly to continue:
5. Search for the word “displayStatus” and replace it with “x”
6. Search for the word “displayKey” and replace it with “y”
7. Now save and exit ‘document.xml’, and copy it back into the dashboard.zip file.
8. Close the zip folder, and rename ‘dashboard.zip’ to ‘dashboard.xlf’
9. Open ‘dashboard.xlf’ with Xcelsius.
You’re done!
Just put values in your two Value boxes and see the Icon button move around.
So what did we just do?
This all went a bit quickly, so here’s what happened:
1. In Step 1, we bound the dynamic visibility of the Icon component to cells B1 and B2. By doing this, Xcelsius added a few lines of code to document.xml that we’ll use in Step 2.
2. When we edited document.xml, we changed this binding: now, instead of binding the dynamic visibility to B1 and B2, we bound the position of the object to B1 and B2.
3. Since the two Value box components are bound to B1 and B2, you can use them to move the Icon component around at your leisure.
What else can we use this for?
This general principle can be used to move any component dynamically. Over the next few months, I’ll write a few additional blog posts and technical documents describing some of the more exciting possibilities, such as Bubble Charts with dynamically moving labels, the ability to drag & drop components in the dashboard, or expanding / shrinking menus.
Nice trick Alex:)
Nice article!! Really liked it 🙂
Superb
thumbs up =]
not supported by the editing interface at all --> error-prone
typo or when mistakenly editing the wrong line --> your dasboard is corrupted forever --> dangerous
maintanence very hard to do, if possible at all
so, all in all, NOT recommended
I would argue that this is no more error-prone or difficult to maintain than programming a php or aspx interface between Xcelsius and your database, or than programming your own dashboard using Javascript, or even than hand-coding the HTML page in which your swf file sits, all of which are extremely common.
Of course, it would be better if it were supported by the interface, but that's up to SAP.
Hi Alex,
can not find displayStatus & displayValue in documet.xml file.
Hi Harshil,
If displayStatus and displayValue are not in document.xml, it means that you did not bind the Dynamic Visibility of the Icon Component to the spreadsheet. See step 1-1.
Succeed. Thanks Alex.
What a Magic.......:-)
Good Trick.
Good one alex...
Cheers...!
Congratulations for the post. Helped in a new feature for our project.
Nice article!! 🙂
good one,
but read in "What's new in BI 4.1". that SAP is going to provide this functionality to many components.
True, there is a screenshot of that functionality in following presentation:
SAP BusinessObjects BI 4.1 What's New L2
It seems to work the exact same way as Alex discovered and described in a nice way here.
Nice article Alex Yale
Hi,
Thanks for this trick,
Unfortunately it's not working on my side the .xlf is not transfer into zip. after renaming it. I tried to send it to and then compressed file and nothing (no xml file) in the .zip. Any ideas?
Regards,
Steve
make sure you enabled show file extension option before you change the extension.
http://support.microsoft.com/kb/865219
Thanks for your reply, that solves my problem.
Regards.
Nice trick Alex. 🙂