Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Re: pie charts setting default color

nothing happened :/ tried both ways

Highlighted
sergey_maka8
Valued Contributor

Re: pie charts setting default color

Can you share your app?

Not applicable

Re: pie charts setting default color

sorry Sergey i can't share it cz of office reasons :/ the colors change in to all pinkish colors doesn't look professional at all :/

sergey_maka8
Valued Contributor

Re: pie charts setting default color

Please share screenshot of your color tab

Re: Re: pie charts setting default color

Looks like you have more than 18 values. Try adjusting your expression as follows:


=if(Source=Source, color( mod(FieldIndex('Source',Source)-1,18)+1 ), LightGray())


-Rob

Not applicable

Re: pie charts setting default color

d.png

Not applicable

Re: pie charts setting default color

hi Rob

after adding your expression my chart looks like the below image :/ i have colors repeatingin.png

Re: pie charts setting default color

There are only 18 colors in the palette. The only way I can think of is to avoid repeating colors is to assign a unique color to every dimension value in the load and then a reference to that color in the background color expression.

Alternatively, you could get a better distribution across 18 colors with an expression that uses some combination of index() and concat() to sequentially assign from the 18 color palette.

However, I would question the overall usefulness of having a Pie with some many slices. Have you considered using Dimension limits to limit to the top n values and throw the rest into the "Others" bucket?

-Rob

Not applicable

Re: pie charts setting default color

Rob i have only 10 segments as shown in the above image... i want to show these 10 segments without repeating the colors and i really would prefer if i could change this color code and make it more professional is it possible??

Re: pie charts setting default color

I feel like I'm missing something. You shouldn't have repeating colors if your underlying data has less than 18 values, but maybe I'm misunderstanding something. It would be easier if you could share a scrambled version of your app. Anyways, here's an expression (getting complex though) that will distribute any values over the 18 colors.

=if(Customer=Customer

,color(mod(

Match(

Customer

,$(=chr(39) & concat(Customer,chr(39) & ',' & chr(39)) & chr(39))

)

-1,18)+1)

, LightGray())

Community Browser