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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
markive
Advocate II
Advocate II

Custom Visual - Datapoint Fill Color - how to link it back to the data?

Hi,

 

I've been working on a cross-tab custom visual which I will be releasing / open-sourcing soon:

 

 

I want to implement a conditional formatting based on the measure value. The small example below has say a value of 0 should be red, 1 amber, 2, green. 

 

 

I have it so that the DataPoint is reading out each individual value and displays a color picker:

 

 

The problem is I have been unable to understand how to get the colour and original value of the colour picker.

 

Can someone explain how the selector: is supposed to function to create the link? This is my implementation.. I have spent hours looking through all of the other custom visuals and they are all quite confusing using colorHelper etc.. if anyone has a custom visual example to point me to that would help also.

 

instances.push({
    objectName: 'dataPoint',
    displayName: seriesDataPoints.value.toString(),
    selector: visuals.ColorHelper.normalizeSelector(seriesDataPoints.identity.getSelector()),
    properties: {
        fill: { solid: { color: seriesDataPoints.fill } }
    },
});

Thanks in advance for any help!

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.