All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.assets.rjzjh.echarts.src.model.mixin.itemStyle.js Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
define(function (require) {
    var getItemStyle = require('./makeStyleMapper')(
        [
            ['fill', 'color'],
            ['stroke', 'borderColor'],
            ['lineWidth', 'borderWidth'],
            ['opacity'],
            ['shadowBlur'],
            ['shadowOffsetX'],
            ['shadowOffsetY'],
            ['shadowColor']
        ]
    );
    return {
        getItemStyle: function (excludes) {
            var style = getItemStyle.call(this, excludes);
            var lineDash = this.getBorderLineDash();
            lineDash && (style.lineDash = lineDash);
            return style;
        },

        getBorderLineDash: function () {
            var lineType = this.get('borderType');
            return (lineType === 'solid' || lineType == null) ? null
                : (lineType === 'dashed' ? [5, 5] : [1, 1]);
        }
    };
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy