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

Issue turning on legend on a bar chart

Hi all,

When coloring by expression a stacked bar chart, the legend options stop being displayed. Does anyone have any idea why? I must provide the user with legend and I'm not being able to do it.

Thank you!

1.png

1 Solution

Accepted Solutions
jheasley
Luminary Alumni
Luminary Alumni

First you would create the Dimension (in your case it will be "InventoryFrozenWrapPeriod"):

Capture.JPG

then click  "add dimension" then "Done"

Then Edit the Dimension:

Capture.JPG

now you can set colors by each dimensional value. 

View solution in original post

5 Replies
jheasley
Luminary Alumni
Luminary Alumni

When using an expression to apply color, there is no longer a legend.  A great solution to this is to create a Master Dimension an apply the color in the master item.  same principle works if you're coloring by measure.  The trick is to create the measure/dimension then re-edit the item to have the ability to adjust the color.

Anonymous
Not applicable
Author

Thank you Joe. I can color measures in master items... but not dimensions. How do you would you do it?

Actually, i've tried to create a dimension on master items with this expression

=if(InventoryFrozenWrapPeriod='', rgb(208,120,87),

if(InventoryFrozenWrapPeriod='>12_MONTH',rgb(221,157,131),

    if(InventoryFrozenWrapPeriod='6-12_MONTH',rgb(236,201,187),

        if(InventoryFrozenWrapPeriod='2-6_MONTH',rgb(166,133,83),

            if(InventoryFrozenWrapPeriod='1-2_MONTH',rgb(196,173,138),

                if(InventoryFrozenWrapPeriod='0-1_MONTH',rgb(219,205,185))))))) 

but it doesn't work...

Instead of using a chart with 1 measure and 2 dimension, i could use 1 dimension and x measures (defined on master items where I can color them), but that would take me too much time...

jheasley
Luminary Alumni
Luminary Alumni

First you would create the Dimension (in your case it will be "InventoryFrozenWrapPeriod"):

Capture.JPG

then click  "add dimension" then "Done"

Then Edit the Dimension:

Capture.JPG

now you can set colors by each dimensional value. 

Anonymous
Not applicable
Author

Thank you Joe! That's probably and earlier version than the one I'm using... Thank you.

jheasley
Luminary Alumni
Luminary Alumni

no worries!! please mark as correct if it solved your issues!