# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Contributor

## How to accentuate a region in pie chart

Hello!

I have a pie chart with benchmarks, and I want to show the exact position of specific company in that benchmark.

I have something like this:

Here, 1 to 8 - titles

and I need to accentuate the region like:

that is a dot stating that this company is located here.

Or as a highlighted region:

How to do that in Sense?

Tags (4)
1 Solution

Accepted Solutions
Highlighted
Partner

## Re: How to accentuate a region in pie chart

The easiest way is to change the Color parameter to use "Color By Expression" option:

In my sample QVF (attached), I am checking the company name and forcing system to use a bright color (RGB(255, 0, 0)) for this segment. All other segments are painted with dark colors...

if (index(company, district) >= 1, rgb(255, 0, 0), rgb(Rand()*90, Rand()*90, Rand()*90))

The result:

This is a simplified way and you might have more complex structure to map the company to the district.

I am not sure what requirements do you have, but I am sure you can update this algorithm to use any other conditions to select your colors.

Regards,

6 Replies
Highlighted
Partner

## Re: How to accentuate a region in pie chart

Can you share your sample app to directly work on it?

Highlighted
Partner

## Re: How to accentuate a region in pie chart

The easiest way is to change the Color parameter to use "Color By Expression" option:

In my sample QVF (attached), I am checking the company name and forcing system to use a bright color (RGB(255, 0, 0)) for this segment. All other segments are painted with dark colors...

if (index(company, district) >= 1, rgb(255, 0, 0), rgb(Rand()*90, Rand()*90, Rand()*90))

The result:

This is a simplified way and you might have more complex structure to map the company to the district.

I am not sure what requirements do you have, but I am sure you can update this algorithm to use any other conditions to select your colors.

Regards,

Highlighted
Contributor

## Re: How to accentuate a region in pie chart

Here is my example (see attached file).

I need to paint the selected region as red on pie chart (see color by expression), can you help me to do that?

It works when I select Response filed (click with a mouse)

But i need it to work when I select CLnum row in table.

UPDATE: solved it.

see attach.

Highlighted
Contributor

Highlighted
Partner

## Re: How to accentuate a region in pie chart

You just add it to you color expression:

if ( GetFieldSelections(Response) = Response or GetFieldSelections(CLnum) = CLnum  , rgb(255, 0, 0), rgb(87, 87, 87))

Highlighted
Contributor

## Re: How to accentuate a region in pie chart

oh, nice move, thanks ))