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?
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)