12 Replies Latest reply: Oct 18, 2013 7:47 AM by Peter Schulz

# Partial coloring of bars in a chart?

Hi,

I have a simple bar chart.

Dimension is OrderID, and expression is only(LT). Values for LT(=LeadTime) are like 100, 150,54... days.

Assume the normal color of the bar is blue. I was wondering if it is possible to add a 2nd color.via Background Color

So that the part from 50 - 150 is colored green(). Is this possible? With every condition I tried I was only able to change the color of the whole bar.

I know how to do this with a stacked bars , but this is not what I want.

Peter

PS: Is it possible, in a grouped bar chart, to define the "padding" between the groups without a separate expression?  In std. layout the bars are very close.

• ###### Re: Partial coloring of bars in a chart?

Yes it is possible.

See the sample

• ###### Re: Partial coloring of bars in a chart?

just On EXPRESSION tab click on the + sign of expression then on Background option i have written the if condition to judge and apply different color based on Sum(SALES) value.

• ###### Re: Partial coloring of bars in a chart?

Hi

In expression , You can able to see '+' sign, click that, you can able to see background color, in that give expression according to your requirement.

Hope tat helps

• ###### Re: Partial coloring of bars in a chart?

You can use background colour which is merged in expression name

• ###### Re: Partial coloring of bars in a chart?

Raj,

Visual cues in Bar Chart??

Is it possible?

• ###### Re: Partial coloring of bars in a chart?

sorry sujeet maaf karo i thought Pivot or straight table.

• ###### Re: Partial coloring of bars in a chart?

Not sure what you want, but as you are using Only I believe it is only one value.

Try using Bar Offset

Using Bar Offset you can start from any point on the Y Axis that if if the scale is 100 and offset is 30 the bar will be plotted above 30. If the value is 40 it will start from 30 and will go upto 70.

Thanks...

• ###### Re: Partial coloring of bars in a chart?

Hi again,

thank you all for the comments, but I think its not clear what I meant.

I know about background colors, offset...etc.

I think it is not possible that way, without stacking. I thought there would possibly be some "interval magic" to define multiple background colors for a single bar.

It should look like this(no stacked bars...):

Is it then possible to make some kind of a grouped and stacked bar chart?

- PS -

• ###### Re: Partial coloring of bars in a chart?

Hi

I am pretty sure you can't do it without Stacked Bars.

...unless you wish to write yourself a cunning extension, but that will take you lot, lot longer than biting the bullet and using Stacked Bars.

Best Regards,     Bill

• ###### Re: Partial coloring of bars in a chart?

Hi Bill,

I have to struggle enough with "plain qlikview", so an extension has to be postponed a bit.

I already suspected that in my last question.

• ###### Re: Partial coloring of bars in a chart?

Hi

Can you explain why you not preferring stacked  bar?

• ###### Re: Partial coloring of bars in a chart?

Ok..I'll try

I try to show the lead time of orders.

In script I calculate from a suborders table the total lead time (LT) (for every order) and some partial values (LTA,LTP...)

So i have fields in my order table like LT=100  LTA=40, LTP=60 this looks in my chart like this picture(using offset):

Ok. I think its clear and quite easy so far. In real life the lead time is further devided in value added and wasted time.

I wanted to use some expression to calculate the wasted time and show it inside the corresponding bar.

On Problem is that I have to calculate the LT with a start and a enddate, because as you can see, not every order has all subsegments available. But every Order definetly has a start and an end. So that I can show at least the full LT even if some segments are missing.

When I use stacked, I see no way to show the full LT and the 3 segments at the same time for every order...I would have to use groups or something.

Perhaps I missed something.. I appreciate, if you or somebody has an idea how to show the wasted time inside thos segments.

Is it possible to use color gradient as background for bar chart? Perhaps there is a way to trick around with it?