function getColorVisual(seriesModel, visualMapModel, value, valueState) {
    var mappings = visualMapModel.targetVisuals[valueState];
    var visualTypes = VisualMapping.prepareVisualTypes(mappings);
    var resultVisual = {
        color: seriesModel.getData().getVisual('color') // default color.
    };

    for (var i = 0, len = visualTypes.length; i < len; i++) {
        var type = visualTypes[i];
        var mapping = mappings[
            type === 'opacity' ? '__alphaForOpacity' : type
        ];
        mapping && mapping.applyVisual(value, getVisual, setVisual);
    }

    return resultVisual.color;

    function getVisual(key) {
        return resultVisual[key];
    }

    function setVisual(key, value) {
        resultVisual[key] = value;
    }
}
function getColorVisual(seriesModel, visualMapModel, value, valueState) {
    var mappings = visualMapModel.targetVisuals[valueState];
    var visualTypes = VisualMapping.prepareVisualTypes(mappings);
    var resultVisual = {
        color: seriesModel.getData().getVisual('color') // default color.
    };

    for (var i = 0, len = visualTypes.length; i < len; i++) {
        var type = visualTypes[i];
        var mapping = mappings[
            type === 'opacity' ? '__alphaForOpacity' : type
        ];
        mapping && mapping.applyVisual(value, getVisual, setVisual);
    }

    return resultVisual.color;

    function getVisual(key) {
        return resultVisual[key];
    }

    function setVisual(key, value) {
        resultVisual[key] = value;
    }
}
function getColorVisual ( seriesModel , visualMapModel , value , valueState ) { var mappings = visualMapModel . targetVisuals [ valueState ] ; var visualTypes = VisualMapping . prepareVisualTypes ( mappings ) ; var resultVisual = { color : seriesModel . getData ( ) . getVisual ( 'color' ) // default color. } ; for ( var i = 0 , len = visualTypes . length ; i < len ; i ++ ) { var type = visualTypes [ i ] ; var mapping = mappings [ type === 'opacity' ? '__alphaForOpacity' : type ] ; mapping && mapping . applyVisual ( value , getVisual , setVisual ) ; } return resultVisual . color ; function getVisual ( key ) { return resultVisual [ key ] ; } function setVisual ( key , value ) { resultVisual [ key ] = value ; } }
FIXME performance and export for heatmap? value can be Infinity or -Infinity
FIXME performance and export for heatmap? value can be Infinity or - Infinity
Get color visual for a given value