Customize legend format in WebI

One thing I really dislike in BO XI 3.1 is the flexibility of the charting objects. Or better the lack of it. In this post I’ll explain how you can take control of the legends from all kinds of graphs in WebI.

We have the following issue:

Resizing the object, or changing font size doesn’t make it any better:

What I’m going to do is to disable the legend in the object, and instead make my own with a vertical table. There are some drawbacks to this approach;

  • It takes more time
  • The legend will not show properly in pdf format.
  • This will not work with an unlimited legend items
  • The code in this example uses the default color pallete

 

  1. Make a copy of your object (graph)
  2. Right click the copied object and turn it into a vertical table
  3. Now we have:
  4. Remove the measure(s)
  5. Remove borders and color:
    and
    You will probably have to choose another color first in order to get white.
  6. Then insert a column to the left and enter the following formula. I’m using the default colors here, if you use a different palette check the notes at the end of this post.
    ="<a href=\"#\" title=\"\" target=\"_blank\" nav=\"doc\" style=\"text-decoration:none; border:1px solid black; background-color: #"+(
    If (RunningSum(1)=1) Then "266490" ElseIf
    (RunningSum(1)=2) Then "FF9C49" ElseIf
    (RunningSum(1)=3) Then "00936C" ElseIf
    (RunningSum(1)=4) Then "F44D00" ElseIf
    (RunningSum(1)=5) Then "B72557" ElseIf
    (RunningSum(1)=6) Then "FFCC58" ElseIf
    (RunningSum(1)=7) Then "007484" Else "EF6755")
    +"; color:#"+(
    If (RunningSum(1)=1) Then "266490" ElseIf
    (RunningSum(1)=2) Then "FF9C49" ElseIf
    (RunningSum(1)=3) Then "00936C" ElseIf
    (RunningSum(1)=4) Then "F44D00" ElseIf
    (RunningSum(1)=5) Then "B72557" ElseIf
    (RunningSum(1)=6) Then "FFCC58" ElseIf
    (RunningSum(1)=7) Then "007484" Else "EF6755")
    +";\" >__</a>"
  7. Make the content of the cell ‘read as hyperlink’
  8. Now upload the report and the result in WebI is:

 

Additional notes:

Excuse me for using a pie, a better visualization would be a bar.

The color pallete can be found in the properties tab:

To get the hexadecimal codes for the code use a colorpicker, I used this one.

In a pdf view the legend looks like this 🙁

Linkedin Twitter Facebook Stumbleupon Tumblr Email

One thought on “Customize legend format in WebI

  1. Bella

    Here are quick ways to keep your Android phone free of malware.
    For our scenario here, we will be clicking the Customize button, which will take us to the settings of our application. This
    Android download manager allows you to download virtually any file from the Internet to your SD card.

    Reply

Leave a Reply

Your email address will not be published.