src/chart/bar/PictorialBarView.js
function getSymbolMeta(data, dataIndex, itemModel, opt) {
    var layout = data.getItemLayout(dataIndex);
    var symbolRepeat = itemModel.get('symbolRepeat');
    var symbolClip = itemModel.get('symbolClip');
    var symbolPosition = itemModel.get('symbolPosition') || 'start';
    var symbolRotate = itemModel.get('symbolRotate');
    var rotation = (symbolRotate || 0) * Math.PI / 180 || 0;
    var symbolPatternSize = itemModel.get('symbolPatternSize') || 2;
    var isAnimationEnabled = itemModel.isAnimationEnabled();

    var symbolMeta = {
        dataIndex: dataIndex,
        layout: layout,
        itemModel: itemModel,
        symbolType: data.getItemVisual(dataIndex, 'symbol') || 'circle',
        color: data.getItemVisual(dataIndex, 'color'),
        symbolClip: symbolClip,
        symbolRepeat: symbolRepeat,
        symbolRepeatDirection: itemModel.get('symbolRepeatDirection'),
        symbolPatternSize: symbolPatternSize,
        rotation: rotation,
        animationModel: isAnimationEnabled ? itemModel : null,
        hoverAnimation: isAnimationEnabled && itemModel.get('hoverAnimation'),
        z2: itemModel.getShallow('z', true) || 0
    };

    prepareBarLength(itemModel, symbolRepeat, layout, opt, symbolMeta);

    prepareSymbolSize(
        data, dataIndex, layout, symbolRepeat, symbolClip, symbolMeta.boundingLength,
        symbolMeta.pxSign, symbolPatternSize, opt, symbolMeta
    );

    prepareLineWidth(itemModel, symbolMeta.symbolScale, rotation, opt, symbolMeta);

    var symbolSize = symbolMeta.symbolSize;
    var symbolOffset = itemModel.get('symbolOffset');
    if (zrUtil.isArray(symbolOffset)) {
        symbolOffset = [
            parsePercent(symbolOffset[0], symbolSize[0]),
            parsePercent(symbolOffset[1], symbolSize[1])
        ];
    }

    prepareLayoutInfo(
        itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset,
        symbolPosition, symbolMeta.valueLineWidth, symbolMeta.boundingLength, symbolMeta.repeatCutLength,
        opt, symbolMeta
    );

    return symbolMeta;
}
function getSymbolMeta(data, dataIndex, itemModel, opt) {
    var layout = data.getItemLayout(dataIndex);
    var symbolRepeat = itemModel.get('symbolRepeat');
    var symbolClip = itemModel.get('symbolClip');
    var symbolPosition = itemModel.get('symbolPosition') || 'start';
    var symbolRotate = itemModel.get('symbolRotate');
    var rotation = (symbolRotate || 0) * Math.PI / 180 || 0;
    var symbolPatternSize = itemModel.get('symbolPatternSize') || 2;
    var isAnimationEnabled = itemModel.isAnimationEnabled();

    var symbolMeta = {
        dataIndex: dataIndex,
        layout: layout,
        itemModel: itemModel,
        symbolType: data.getItemVisual(dataIndex, 'symbol') || 'circle',
        color: data.getItemVisual(dataIndex, 'color'),
        symbolClip: symbolClip,
        symbolRepeat: symbolRepeat,
        symbolRepeatDirection: itemModel.get('symbolRepeatDirection'),
        symbolPatternSize: symbolPatternSize,
        rotation: rotation,
        animationModel: isAnimationEnabled ? itemModel : null,
        hoverAnimation: isAnimationEnabled && itemModel.get('hoverAnimation'),
        z2: itemModel.getShallow('z', true) || 0
    };

    prepareBarLength(itemModel, symbolRepeat, layout, opt, symbolMeta);

    prepareSymbolSize(
        data, dataIndex, layout, symbolRepeat, symbolClip, symbolMeta.boundingLength,
        symbolMeta.pxSign, symbolPatternSize, opt, symbolMeta
    );

    prepareLineWidth(itemModel, symbolMeta.symbolScale, rotation, opt, symbolMeta);

    var symbolSize = symbolMeta.symbolSize;
    var symbolOffset = itemModel.get('symbolOffset');
    if (zrUtil.isArray(symbolOffset)) {
        symbolOffset = [
            parsePercent(symbolOffset[0], symbolSize[0]),
            parsePercent(symbolOffset[1], symbolSize[1])
        ];
    }

    prepareLayoutInfo(
        itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset,
        symbolPosition, symbolMeta.valueLineWidth, symbolMeta.boundingLength, symbolMeta.repeatCutLength,
        opt, symbolMeta
    );

    return symbolMeta;
}
function getSymbolMeta ( data , dataIndex , itemModel , opt ) { var layout = data . getItemLayout ( dataIndex ) ; var symbolRepeat = itemModel . get ( 'symbolRepeat' ) ; var symbolClip = itemModel . get ( 'symbolClip' ) ; var symbolPosition = itemModel . get ( 'symbolPosition' ) || 'start' ; var symbolRotate = itemModel . get ( 'symbolRotate' ) ; var rotation = ( symbolRotate || 0 ) * Math . PI / 180 || 0 ; var symbolPatternSize = itemModel . get ( 'symbolPatternSize' ) || 2 ; var isAnimationEnabled = itemModel . isAnimationEnabled ( ) ; var symbolMeta = { dataIndex : dataIndex , layout : layout , itemModel : itemModel , symbolType : data . getItemVisual ( dataIndex , 'symbol' ) || 'circle' , color : data . getItemVisual ( dataIndex , 'color' ) , symbolClip : symbolClip , symbolRepeat : symbolRepeat , symbolRepeatDirection : itemModel . get ( 'symbolRepeatDirection' ) , symbolPatternSize : symbolPatternSize , rotation : rotation , animationModel : isAnimationEnabled ? itemModel : null , hoverAnimation : isAnimationEnabled && itemModel . get ( 'hoverAnimation' ) , z2 : itemModel . getShallow ( 'z' , true ) || 0 } ; prepareBarLength ( itemModel , symbolRepeat , layout , opt , symbolMeta ) ; prepareSymbolSize ( data , dataIndex , layout , symbolRepeat , symbolClip , symbolMeta . boundingLength , symbolMeta . pxSign , symbolPatternSize , opt , symbolMeta ) ; prepareLineWidth ( itemModel , symbolMeta . symbolScale , rotation , opt , symbolMeta ) ; var symbolSize = symbolMeta . symbolSize ; var symbolOffset = itemModel . get ( 'symbolOffset' ) ; if ( zrUtil . isArray ( symbolOffset ) ) { symbolOffset = [ parsePercent ( symbolOffset [ 0 ] , symbolSize [ 0 ] ) , parsePercent ( symbolOffset [ 1 ] , symbolSize [ 1 ] ) ] ; } prepareLayoutInfo ( itemModel , symbolSize , layout , symbolRepeat , symbolClip , symbolOffset , symbolPosition , symbolMeta . valueLineWidth , symbolMeta . boundingLength , symbolMeta . repeatCutLength , opt , symbolMeta ) ; return symbolMeta ; }
Set or calculate default value about symbol, and calculate layout info.
Set or calculate default value about symbol and calculate layout info .