Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

ingoniclas
Contributor

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

Tags (2)
1 Solution

Accepted Solutions
giakoum
Honored Contributor II

Re: Not sufficient colours for line graphs available in QV?

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.

9 Replies
giakoum
Honored Contributor II

Re: Not sufficient colours for line graphs available in QV?

have you Persistent Colors checked? try this option.

sudeepkm
Valued Contributor III

Re: Not sufficient colours for line graphs available in QV?

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
Honored Contributor II

Re: Not sufficient colours for line graphs available in QV?

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.

MVP
MVP

Re: Not sufficient colours for line graphs available in QV?

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

srikanthsri1
Valued Contributor

Re: Not sufficient colours for line graphs available in QV?

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

Employee
Employee

Re: Not sufficient colours for line graphs available in QV?

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)

mov
Esteemed Contributor III

Re: Not sufficient colours for line graphs available in QV?

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
Contributor

Re: Not sufficient colours for line graphs available in QV?

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
Contributor

Re: Not sufficient colours for line graphs available in QV?

This worked well for my purposes. Many thanks!

Community Browser