Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Legend alignment on sum over time chart

So I've got a run-of-the-mill accumulative sum-over-time chart pictured below, and my challenge is to get the legend to display like that. Specifically: left-aligned labels and right-aligned totals. There are two ways that I know of to get close, but not quite what I want.

1. In chart's properties, for the expressions' labels put something like this

= 'Gifts' & Sum( {<[Gifts Type Code] = {g, b, y}>} [Gifts Amount] )

The problem with this is that it puts the total right after "Gifts." What I want is the total to be right aligned and the label, Gifts, to be left aligned like it is in the picture, and on other charts that aren't time-based where it automatically generates the totals in the legend.

2. Make a separate Text Box object with just the totals in them and put it right next to the legend. This is what I did to generate this image, and I thought it solved the problem initially. Then I realized that if the users copy it as an image or print it, it won't have the values that are in the text box.

Is there another way I'm not aware of to do this? From this thread http://tinyurl.com/29uqs8w I've learned that you can't control the horizontal alignment inside the legend, but what I'm trying to do is just have a legend that's like the default legends for say, a pie chart. Anybody know how I could pull this off? Thanks very much for any input.

*NOTE* Yes, those totals are very erroneous.

error loading image

1 Solution

Accepted Solutions
pover
Luminary Alumni
Luminary Alumni

No perfect solution here, but a couple things to try.

First, have you tried adding Text in Chart from the Presentation tab?

Also, if you use a monospaced font, a little modification to you label expression will work alright. In this case a number can be up to 25 characters long.

= 'Gifts' & repeat(' ', 25 - len(Sum( {<[Gifts Type Code] = {g, b, y}>} [Gifts Amount]))) & Sum( {<[Gifts Type Code] = {g, b, y}>} [Gifts Amount] )

Regards.

View solution in original post

2 Replies
pover
Luminary Alumni
Luminary Alumni

No perfect solution here, but a couple things to try.

First, have you tried adding Text in Chart from the Presentation tab?

Also, if you use a monospaced font, a little modification to you label expression will work alright. In this case a number can be up to 25 characters long.

= 'Gifts' & repeat(' ', 25 - len(Sum( {<[Gifts Type Code] = {g, b, y}>} [Gifts Amount]))) & Sum( {<[Gifts Type Code] = {g, b, y}>} [Gifts Amount] )

Regards.

Not applicable
Author

Thanks a lot Karl, I somehow hadn't seen that adding text section of the presentation tab. I think that's probably the route I'll go, though when I print the chart the text box doesn't line up quite right. I think I'll just have to suggest that the users use the "copy to image" button and paste it into a word/excel doc before printing. Thanks again.