# How to visualize hierarchical data with negative values?

I would like to visualize the allocation of a financial portfolio by asset type and asset, where an asset or asset type could have a negative allocation. For example, we could have something like:

Asset type, Asset, Allocation

Equity, GOOG.OQ, 80%

Equity,HSBC.L, 40%

Fixed Income, US Treasury, -25%

What types of charts are best to visualize the allocation by both asset type and asset in a single chart?

What about a Cleveland dot plot?

The points can take positive or negative values, each line can be labeled with the asset name, and you can group the assets by type (and label the groups). If you need to quickly see or show which values are positive or negative, you could use relevant colors for the points, or add a vertical line representing 0. In addition, you can sort the lines by the percentage values or by alphabetical order, depending on what you need.

Here is a quick-and-dirty example (no formatting, no color, and no sorting), using the data from your question augmented with completely fictional data, to get a better idea of what it looks like with a few more information:

• This is a good approach, +1, but I can't help thinking that the question occurs in a special context where the sums of the allocations are always 100%. (Your example violates that, btw.) I believe that's what motivated the post: how can that constraint be exploited to develop an even better visualization of the allocation?
– whuber
Commented Jan 12 at 13:58
• @whuber Ah, it didn't even cross my mind! I'm curious to know if someone else will come up with a better solution, for the moment I don't have one. Commented Jan 12 at 14:15
• A version of stacked bar charts comes to mind. The negative allocations could be visualized as overlapping a stack of values that sums to 100%. Although that's hard to see, exploding the bars in an orthogonal dimension would resolve that difficulty.
– whuber
Commented Jan 12 at 14:18