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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.