src/chart/heatmap/HeatmapLayer.js
function (data, colorFunc, state) {
        var gradientPixels = this._gradientPixels;
        var pixelsSingleState = gradientPixels[state] || (gradientPixels[state] = new Uint8ClampedArray(256 * 4));
        var color = [0, 0, 0, 0];
        var off = 0;
        for (var i = 0; i < 256; i++) {
            colorFunc[state](i / 255, true, color);
            pixelsSingleState[off++] = color[0];
            pixelsSingleState[off++] = color[1];
            pixelsSingleState[off++] = color[2];
            pixelsSingleState[off++] = color[3];
        }
        return pixelsSingleState;
    }
function (data, colorFunc, state) {
        var gradientPixels = this._gradientPixels;
        var pixelsSingleState = gradientPixels[state] || (gradientPixels[state] = new Uint8ClampedArray(256 * 4));
        var color = [0, 0, 0, 0];
        var off = 0;
        for (var i = 0; i < 256; i++) {
            colorFunc[state](i / 255, true, color);
            pixelsSingleState[off++] = color[0];
            pixelsSingleState[off++] = color[1];
            pixelsSingleState[off++] = color[2];
            pixelsSingleState[off++] = color[3];
        }
        return pixelsSingleState;
    }
function ( data , colorFunc , state ) { var gradientPixels = this . _gradientPixels ; var pixelsSingleState = gradientPixels [ state ] || ( gradientPixels [ state ] = new Uint8ClampedArray ( 256 * 4 ) ) ; var color = [ 0 , 0 , 0 , 0 ] ; var off = 0 ; for ( var i = 0 ; i < 256 ; i ++ ) { colorFunc [ state ] ( i / 255 , true , color ) ; pixelsSingleState [ off ++ ] = color [ 0 ] ; pixelsSingleState [ off ++ ] = color [ 1 ] ; pixelsSingleState [ off ++ ] = color [ 2 ] ; pixelsSingleState [ off ++ ] = color [ 3 ] ; } return pixelsSingleState ; }
get gradient color map
@private
get gradient color map