Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Line Chart Color

Hi,

I created a line chart with:

  • Dimensions:
    • Metric_Type & ' - ' & Product

Even though it´s a calculated dimension, I want the lines to have the same color for the some product.

Any suggestions?

Thanks in advance,

Francisco

4 Replies
marcus_sommer

Try this with background-colors:

pick(match(Product, 'Product1', Product2', ...), rgb(100,100,100), rgb(120,120,120), ....)

- Marcus

Not applicable
Author

Hi,

It must be dinamic I have more than 2.000 products...

Regards,

FC

marcus_sommer

This was only an example - each of the color-parameter could be dynamically assigned. There are some more color-functions like argb() or colormix() which have more then 3 parameters.

But it makes not much sense to create more then 2000 different colors. Nobody could differentiate them and its also hardly possible to show more then 20 lines at the same time. Therefore I suggest you reused the colors every 10/15/20 products and/or used product-categories as main-color and the single product is a variance from them or some other logic.

- Marcus

Not applicable
Author

Thanks Marcus, for your replys.

I understand and agree with your explanation.

I was trying to use the QV automatic color assigning...

My Metric_Type are Sell In (SI) and Sell Out (SO)

I have about 2000 products, the user will select probably 5 (I don’t know which), I want product lines to have the same color because the visualization of the Metric_Type (SI or SO) will be different by the line style (=if(Metric_Type='SI','<S3>') .

Regards.

FC