src/visual/VisualMapping.js
function () {
            var thisOption = this.option;

            return zrUtil.bind(
                thisOption.mappingMethod === 'category'
                    ? function (value, isNormalized) {
                        !isNormalized && (value = this._normalizeData(value));
                        return doMapCategory.call(this, value);
                    }
                    : function (value, isNormalized, out) {
                        // If output rgb array
                        // which will be much faster and useful in pixel manipulation
                        var returnRGBArray = !!out;
                        !isNormalized && (value = this._normalizeData(value));
                        out = zrColor.fastLerp(value, thisOption.parsedVisual, out);
                        return returnRGBArray ? out : zrColor.stringify(out, 'rgba');
                    },
                this
            );
        }
function () {
            var thisOption = this.option;

            return zrUtil.bind(
                thisOption.mappingMethod === 'category'
                    ? function (value, isNormalized) {
                        !isNormalized && (value = this._normalizeData(value));
                        return doMapCategory.call(this, value);
                    }
                    : function (value, isNormalized, out) {
                        // If output rgb array
                        // which will be much faster and useful in pixel manipulation
                        var returnRGBArray = !!out;
                        !isNormalized && (value = this._normalizeData(value));
                        out = zrColor.fastLerp(value, thisOption.parsedVisual, out);
                        return returnRGBArray ? out : zrColor.stringify(out, 'rgba');
                    },
                this
            );
        }
function ( ) { var thisOption = this . option ; return zrUtil . bind ( thisOption . mappingMethod === 'category' ? function ( value , isNormalized ) { ! isNormalized && ( value = this . _normalizeData ( value ) ) ; return doMapCategory . call ( this , value ) ; } : function ( value , isNormalized , out ) { // If output rgb array // which will be much faster and useful in pixel manipulation var returnRGBArray = ! ! out ; ! isNormalized && ( value = this . _normalizeData ( value ) ) ; out = zrColor . fastLerp ( value , thisOption . parsedVisual , out ) ; return returnRGBArray ? out : zrColor . stringify ( out , 'rgba' ) ; } , this ) ; }
Create a mapper function
@return {Function}
Create a mapper function