%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/11585/cwd/html/ppaobm/backend/web/assets/16c36a2e/es-modules/parts-map/ |
Upload File : |
/* * * * (c) 2010-2019 Torstein Honsi * * License: www.highcharts.com/license * * */ 'use strict'; import H from '../parts/Globals.js'; import '../parts/Utilities.js'; import '../parts/Axis.js'; var addEvent = H.addEvent, Axis = H.Axis, pick = H.pick; // Override to use the extreme coordinates from the SVG shape, not the data // values addEvent(Axis, 'getSeriesExtremes', function () { var xData = []; // Remove the xData array and cache it locally so that the proceed method // doesn't use it if (this.isXAxis) { this.series.forEach(function (series, i) { if (series.useMapGeometry) { xData[i] = series.xData; series.xData = []; } }); this.seriesXData = xData; } }); addEvent(Axis, 'afterGetSeriesExtremes', function () { var xData = this.seriesXData, dataMin, dataMax, useMapGeometry; // Run extremes logic for map and mapline if (this.isXAxis) { dataMin = pick(this.dataMin, Number.MAX_VALUE); dataMax = pick(this.dataMax, -Number.MAX_VALUE); this.series.forEach(function (series, i) { if (series.useMapGeometry) { dataMin = Math.min(dataMin, pick(series.minX, dataMin)); dataMax = Math.max(dataMax, pick(series.maxX, dataMax)); series.xData = xData[i]; // Reset xData array useMapGeometry = true; } }); if (useMapGeometry) { this.dataMin = dataMin; this.dataMax = dataMax; } delete this.seriesXData; } }); // Override axis translation to make sure the aspect ratio is always kept addEvent(Axis, 'afterSetAxisTranslation', function () { var chart = this.chart, mapRatio, plotRatio = chart.plotWidth / chart.plotHeight, adjustedAxisLength, xAxis = chart.xAxis[0], padAxis, fixTo, fixDiff, preserveAspectRatio; // Check for map-like series if (this.coll === 'yAxis' && xAxis.transA !== undefined) { this.series.forEach(function (series) { if (series.preserveAspectRatio) { preserveAspectRatio = true; } }); } // On Y axis, handle both if (preserveAspectRatio) { // Use the same translation for both axes this.transA = xAxis.transA = Math.min(this.transA, xAxis.transA); mapRatio = plotRatio / ((xAxis.max - xAxis.min) / (this.max - this.min)); // What axis to pad to put the map in the middle padAxis = mapRatio < 1 ? this : xAxis; // Pad it adjustedAxisLength = (padAxis.max - padAxis.min) * padAxis.transA; padAxis.pixelPadding = padAxis.len - adjustedAxisLength; padAxis.minPixelPadding = padAxis.pixelPadding / 2; fixTo = padAxis.fixTo; if (fixTo) { fixDiff = fixTo[1] - padAxis.toValue(fixTo[0], true); fixDiff *= padAxis.transA; if ( Math.abs(fixDiff) > padAxis.minPixelPadding || ( padAxis.min === padAxis.dataMin && padAxis.max === padAxis.dataMax ) ) { // zooming out again, keep within restricted area fixDiff = 0; } padAxis.minPixelPadding -= fixDiff; } } }); // Override Axis.render in order to delete the fixTo prop addEvent(Axis, 'render', function () { this.fixTo = null; });