{"size": 2778, "ext": "js", "max_stars_repo_path": "node_modules/@fusioncharts/widgets/src/chart/_internal/lineargauge.js", "max_stars_repo_name": "SergioGF/TransportPrototypeVue", "max_stars_repo_stars_event_min_datetime": "2019-09-20T04:36:40.000Z", "max_stars_repo_stars_event_max_datetime": "2020-08-27T09:53:21.000Z", "max_issues_repo_path": "node_modules/@fusioncharts/widgets/src/chart/_internal/lineargauge.js", "max_issues_repo_name": "ankitkanojia/react-fusion-mapchart", "max_issues_repo_issues_event_min_datetime": "2020-07-18T00:13:46.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-10T19:04:10.000Z", "max_forks_repo_path": "node_modules/@fusioncharts/widgets/src/chart/_internal/lineargauge.js", "max_forks_repo_name": "SergioGF/TransportPrototypeVue", "max_forks_repo_forks_event_min_datetime": "2019-09-20T04:36:41.000Z", "max_forks_repo_forks_event_max_datetime": "2019-09-24T09:52:39.000Z"}
{"max_stars_count": 6, "max_issues_count": 3, "max_forks_count": 6, "avg_line_length": 2778.0, "max_line_length": 2778, "alphanum_fraction": 0.8660907127}
import _inheritsLoose from"@babel/runtime/helpers/inheritsLoose";import Gauge from"./gauge";import axisFactory from"../../factories/gauge-axis";import{pluckNumber}from"@fusioncharts/core/src/lib";var LinearGauge=function(_Gauge){_inheritsLoose(LinearGauge,_Gauge);function LinearGauge(){var _this;_this=_Gauge.call(this)||this;_this.registerFactory("axis",axisFactory);return _this}LinearGauge.getName=function getName(){return"AxisGaugeBase"};var _proto=LinearGauge.prototype;_proto.__setDefaultConfig=function __setDefaultConfig(){_Gauge.prototype.__setDefaultConfig.call(this)};_proto.allocatePosition=function allocatePosition(){var iapi=this,chartConfig=iapi.config,width=chartConfig.canvasWidth,height=chartConfig.canvasHeight;chartConfig.gaugeStartX=chartConfig.canvasLeft;chartConfig.gaugeEndX=chartConfig.canvasLeft+width;chartConfig.gaugeStartY=chartConfig.canvasTop;chartConfig.gaugeEndY=chartConfig.canvasTop+height;chartConfig.gaugeCenterX=chartConfig.canvasLeft+width/2;chartConfig.gaugeCenterY=chartConfig.canvasTop+height/2};_proto._spaceManager=function _spaceManager(){var spaceForActionBar,actionBarSpace,iapi=this,config=iapi.config,dataset=iapi.getChildren("dataset")[0],scale=iapi.getChildren("scale")[0],is3D=iapi.config.is3D,canvas=iapi.getChildren("canvas")[0],chartAttrs=iapi.getFromEnv("dataSource").chart,showBorder=pluckNumber(chartAttrs.showborder,is3D?0:1),isHorizontal=iapi.isHorizontal,minChartWidth=config.minChartWidth,minChartHeight=config.minChartHeight,chartBorderWidth=config.borderWidth=showBorder?pluckNumber(chartAttrs.borderthickness,1):0,chartBorderVertical,chartBorderHorizontal;if(config.canvasWidth-2*chartBorderWidth<minChartWidth){chartBorderVertical=(config.canvasWidth-minChartWidth)/2}if(config.canvasHeight-2*chartBorderWidth<minChartHeight){chartBorderHorizontal=(config.canvasHeight-minChartHeight)/2}iapi._allocateSpace({top:chartBorderHorizontal||chartBorderWidth,bottom:chartBorderHorizontal||chartBorderWidth,left:chartBorderVertical||chartBorderWidth,right:chartBorderVertical||chartBorderWidth});spaceForActionBar=config.availableHeight*.225;actionBarSpace=iapi._manageActionBarSpace&&iapi._manageActionBarSpace(spaceForActionBar)||{};iapi._allocateSpace(actionBarSpace);if(isHorizontal){iapi._allocateSpace(scale.placeAxis(config.availableHeight))}else{iapi._allocateSpace(scale.placeAxis(config.availableWidth))}iapi._manageChartMenuBar(config.availableHeight*.4);dataset._manageSpace&&iapi._allocateSpace(dataset._manageSpace(config.availableHeight));scale.setAxisConfig({drawPlotlines:iapi.drawPlotlines,drawPlotBands:iapi.drawPlotBands});canvas.setDimension({top:config.canvasTop,left:config.canvasLeft,width:config.canvasWidth,height:config.canvasHeight})};return LinearGauge}(Gauge);export default LinearGauge;