Skip to Content
Author's profile photo Former Member

WebI Tricks: Butterfly Charts

My recent WebI Tricks: Bars embedded into rows showed how to create a visual representation of bars inside the rows of a table. It received quite a few views and a few questions. While I created the document containing this visualization with Web Intelligence Rich Client, I’ve confirmed that you can also view the same content with the dHTML option (i.e. over the web, not just as a local webi file). The bars look the same.

Some readers posted messages asking why they couldn’t get the same “bar” look and feel (for some reason, adding the character called “Full bar” wasn’t working). While I’ve explained how to do this in the comments section of that post, you can also substitute a right bracket or a “vertical bar” (unicode 006C) for the “full bar”. It looks pretty nice too. And the same visual benefits are there as with the “full bar” character. See below.

image

 

Once you get the right look, let’s consider a few other visual displays that this “trick” enables. First, butterfly charts are a commonly used visual display for the distribution of two values around a dimension. I used the same variables as described in the post linked above, but simply applied to some values of male/female employees for different age ranges in a fictitious company. Then I did a bit of formatting to get the left hand column’s “bars” to build towards the left from the cells’ right edge.

 image

The only real “trick” above is to keep the right and left cells proportional to the largest value in the table from either measure (# of Female & Male employees). This ensures that the cells’ widths enable a consistent visual comparison of Female to Male employees.

You can also display the actual value in the cell, along with the bar itself. This is done by simply appending the measure to the formula as below where [Female] is the actual measure value to display alongside the variables for proportionally drawing the width of the bar. (The “ “ is just used to put some space between the value and the bar.)

=[Female]+ ” “+ [Female Bars: Display Lefthand]

image 

Have fun!

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo David Lai
      David Lai
      Hi,
      To get the full bar what I do is go into Microsoft Word and then

      1. Insert -> Symbol

      2. Make sure you are on normal text; select code 2258 and "unicode"

      3. copy and paste that and there you go 🙂

      Author's profile photo Arijit Das
      Arijit Das

      Char(9608) also gives a filled box character that can be used to get the full bar.