BusinessObjects Board

Custom mouse-over labels for chart

So, I’ve been working on this project the last week, and I feel the need to share.

My customer really doesn’t like the information contained in the mouse-over labels by default. Because customers have to be difficult. It’s in the bylaws or something.

I found this blog post, which was my starting point. Very simply, take advantage of the mouse-over insertion capability of the chart to trigger the appearance and content of the label.

But I had another problem. I could have a different number of bars depending on my filter conditions. How can I make the labels match up? I noticed that labels have properties for X and Y coordinates, and those can read from cells in the data model. So, we do some measuring to figure out the width of the chart, divide that by the number of columns plus one (you always have one more space than dividers), figure out which number bar we’re on (easy if you are pushing Position with your insertion), do a little multiplication, and voila! (If you have an older version of Xcelsius, Alex Yale tells you how to hack it to do the same thing here.)

Great. Now I have a label that will line up with my bars. Using some basic spreadsheet magic, I can put whatever information I want into it. Unfortunately, the HTML available within a label is pretty limited. If I want to duplicate, say, a grid of values, it won’t really support that. A bulleted list is about as close as you can get.

So, the next step is to look at other components that I can control the same way. There aren’t many. Rectangles and images are the big ones (which, as an aside, has me wanting to build a variable width column chart using a number of rectangle objects). But then I notice two that do work, and the heavens opened up. Canvas container. Tab set.

That’s right, boys and girls. You can turn a tab set into a hover over from a chart. How crazy is that? :crazy_face:

I’m sure it’s a total resource hog. But I really want to play with the possibilities now.


Lugh (BOB member since 2009-07-16)

Nice find… pretty wild stuff and fun to play with. Who would have thought zip would unpackage a XLF. Might have an immediate use for this. Found that MS XML Notepad keeps things structured and easier to edit / search… especially when looking through an XML doc from a very large XLF.

Thanks for sharing Lugh…


datawizard (BOB member since 2015-01-20)

Intersting Lugh, will you be able to share an example?

I’d be wary of this non-standard xml code packaged in the xlf file though, any future patches could wipe out any changes.

(I’m making a big assumption there will be more patches/updates… :x )


cdavies :uk: (BOB member since 2005-01-28)

I’m working on putting together an example. The client, weirdly enough, decided that they didn’t like the labels moving about. So they scrapped that whole line of effort.

Fortunately, that whole bit with the XML is not necessary if you have Dashboards. It’s baked in to the controls now.


Lugh (BOB member since 2009-07-16)

I would love to see the example, if you don’t mind.


NycPriya (BOB member since 2010-11-04)