@fusioncharts/fusiontime
Version:
FusionCharts JavaScript time-series charting framework
1 lines • 1.68 kB
JavaScript
;var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=true;exports.default=void 0;var _inheritsLoose2=_interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));var _componentInterface=require("@fusioncharts/core/src/component-interface");var Background=function(_SmartRenderer){function Background(){return _SmartRenderer.apply(this,arguments)||this}(0,_inheritsLoose2.default)(Background,_SmartRenderer);var _proto=Background.prototype;_proto.__setDefaultConfig=function __setDefaultConfig(){this.config.backgroundCss={fill:"#ffffff"}};_proto.configureAttributes=function configureAttributes(options){if(options===void 0){options={}}_SmartRenderer.prototype.configureAttributes.call(this,options);var background=this,config=background.config,chartAttr=background.getFromEnv("chart-attrib"),backgroundStyle=chartAttr.style&&chartAttr.style.background;Object.keys(options).forEach((function(key){return config[key]=options[key]}));config.backgroundCss=Object.assign(config.backgroundCss,background.getFromEnv("getStyleDef")(backgroundStyle))};_proto.setDimension=function setDimension(dim){if(dim===void 0){dim={}}Object.assign(this.config,dim)};_proto.draw=function draw(){var background=this,config=background.config;background.addGraphicalElement({el:"rect",attr:{x:0,y:0,height:config.height,width:config.width,transform:config.translate,opacity:config.backgroundCss.opacity},container:{id:"tropo",label:"group",isParent:true},css:config.backgroundCss,component:background,id:"background",label:"rect"})};return Background}(_componentInterface.SmartRenderer);var _default=exports.default=Background;