Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48544

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

$
0
0

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!


Viewing all articles
Browse latest Browse all 48544

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>