Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ingoniclas
Creator II
Creator II

Not sufficient colours for line graphs available in QV?

I have sales values for 650 different products loaded in QV. My problem: Sometimes, when I select couple of products to compare sales over time in a chart with line graphs QV doesn't seem to have sufficient colours to draw from, i.e. different graphs (= expression sum(sales)) are shown in the same colour (see below e.g. products = O - X and O - T seem to have the same colour). This doesn't always happen, but sometimes it does and it's very annoying. How can I make sure that when I select couple of products they all get assigned different colours? Thanks for any idea!

Line_chart_colour_problem.JPG.jpg

1 Solution

Accepted Solutions
giakoum
Partner - Master II
Partner - Master II

not the first 18 visible but the first 18 in general. If no filtering is applied, you have 650 lines. Colors are repeated every 18 lines, shown or not. You need to uncheck Persistent colors.

View solution in original post

9 Replies
giakoum
Partner - Master II
Partner - Master II

have you Persistent Colors checked? try this option.

sudeepkm
Specialist III
Specialist III

I thought it should display the first 18 data points as 18 different colors.

T117014.png

Can you please create a new line chart and see if this happening?

giakoum
Partner - Master II
Partner - Master II

not the first 18 visible but the first 18 in general. If no filtering is applied, you have 650 lines. Colors are repeated every 18 lines, shown or not. You need to uncheck Persistent colors.

maxgro
MVP
MVP

from online help

colors are just repeated in succession from 1 to 18

if you want to have different color you have to use the background color in expression

- you can look at this post http://community.qlik.com/blogs/qlikviewdesignblog/2012/12/04/colors-in-charts

- or you can use some math to generate different rgb for every dimension value

Anonymous
Not applicable

if you need multiple colors then you need to change those color accordingly in colors tab in chart properties

Clever_Anjos
Employee
Employee

If you want 650 different colors, I recomend you creating a table into your datamodel to acomodate all colors.

LOAD * INLINE [

    Product, R, G, B

    A, 253, 152, 150

    B, 230, 160, 80

    C, 234, 160, 90

    D, 200, 160, 120

];

and use this as background color of your expression RGB(R,G,B)

QlikView supports 18 colors,

Remember that human eyes does not recognize too much variety of colors (8 or 9 usually)

Anonymous
Not applicable

Clever Anjos wrote:

...

Remember that human eyes does not recognize too much variety of colors (8 or 9 usually)

That's the key point.

So, if you have different color for each product, and the number of products is large, the colors are not helpful.  But if the purpose is to have all colors different when you select a limited number of products, unchecking "Persistent colors", as Ioannis Giakoumakis advises, solves the problem

ingoniclas
Creator II
Creator II
Author

Thanks for the contribution. But the post you refer to explains how to hard code colours. Hard coding is not an option for me since every month the set of 600-700 products gets updated, and manually adapting a colour table is not a good solution.

ingoniclas
Creator II
Creator II
Author

This worked well for my purposes. Many thanks!