COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: psrpsrpsr on 28 Oct 2016 01:42:32 PM

Title: How do you position chart legend to flow/break in order to look like Excel?
Post by: psrpsrpsr on 28 Oct 2016 01:42:32 PM
Hi folks, I'm having a hard time formatting the legend of a chart. I want the series names to be displayed fully and in a visually pleasing way (center aligned and no truncation), but I cannot seem to get them to display as such.

I know a little bit about HTML and the general page layout and flow of Cognos documents. I assume that I need to change the position/overflow properties of the legend, but nothing I've tried is working.

Here's what I've tried so far: (Also, side note, I've looked at the 10.2.2 documentation and it is not very clear in its instructions for many tasks. Property descriptions are different and not where the documentation says they should be, and it's quite frustrating to basically be looking at documentation that is supposed to apply to me but in reality is only tangentially related to the task it tries to achieve.)

1.) Reducing the size of the text: no good, the text is still truncating.
2.) Setting the Text Truncation setting of the Legend to 200 characters: no good, still truncating.
3.) Setting the position of the legend via Combination Chart > Chart Annotation > Legend property to Advanced, and experimenting with different settings. This enlarges that actual charted area and I can't seem to set the chart area along subsequent to the legend change.

Any thoughts on how I can get the PDF output in the picture below (top image) to look like the Excel output (bottom image)? Thanks!


(http://i1305.photobucket.com/albums/s557/PSRNHME/Chart%20legend%20properties_zpsqlmpix05.jpg) (http://s1305.photobucket.com/user/PSRNHME/media/Chart%20legend%20properties_zpsqlmpix05.jpg.html)
Title: Re: How do you position chart legend to flow/break in order to look like Excel?
Post by: stan.parker on 28 Oct 2016 02:26:10 PM
Hide the default legend in the chart and create your own legend with a table.
Title: Re: How do you position chart legend to flow/break in order to look like Excel?
Post by: psrpsrpsr on 28 Oct 2016 03:28:31 PM
Hi Stan, I tried dragging a table into my chart, both with lock enabled and disabled, and got the following error message: "Unable to insert an object of type "Table" in the selected location."

Can you elaborate a bit on how to use a table as the legend, and how to position it at the bottom of a chart?

Thanks
Title: Re: How do you position chart legend to flow/break in order to look like Excel?
Post by: stan.parker on 28 Oct 2016 04:42:39 PM
Don't drag it into the chart. Rather, add the it to a two-column or two-row table and add the legend to the cell that doesn't contain the chart.
Title: Re: How do you position chart legend to flow/break in order to look like Excel?
Post by: stan.parker on 28 Oct 2016 04:44:36 PM
Quote from: stan.parker on 28 Oct 2016 04:42:39 PM
Don't drag it into the chart. Rather, add the it to a two-column or two-row table and add the legend to the cell that doesn't contain the chart.