first commit

This commit is contained in:
jefferyzhao
2025-07-31 17:44:12 +08:00
commit b9bdc8598b
42390 changed files with 4467935 additions and 0 deletions

266
node_modules/echarts/lib/chart/map/MapSeries.js generated vendored Normal file
View File

@ -0,0 +1,266 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var zrUtil = require("zrender/lib/core/util");
var createListSimply = require("../helper/createListSimply");
var SeriesModel = require("../../model/Series");
var _format = require("../../util/format");
var encodeHTML = _format.encodeHTML;
var addCommas = _format.addCommas;
var dataSelectableMixin = require("../../component/helper/selectableMixin");
var _dataProvider = require("../../data/helper/dataProvider");
var retrieveRawAttr = _dataProvider.retrieveRawAttr;
var geoSourceManager = require("../../coord/geo/geoSourceManager");
var _sourceHelper = require("../../data/helper/sourceHelper");
var makeSeriesEncodeForNameBased = _sourceHelper.makeSeriesEncodeForNameBased;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var MapSeries = SeriesModel.extend({
type: 'series.map',
dependencies: ['geo'],
layoutMode: 'box',
/**
* Only first map series of same mapType will drawMap
* @type {boolean}
*/
needsDrawMap: false,
/**
* Group of all map series with same mapType
* @type {boolean}
*/
seriesGroup: [],
getInitialData: function (option) {
var data = createListSimply(this, {
coordDimensions: ['value'],
encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)
});
var valueDim = data.mapDimension('value');
var dataNameMap = zrUtil.createHashMap();
var selectTargetList = [];
var toAppendNames = [];
for (var i = 0, len = data.count(); i < len; i++) {
var name = data.getName(i);
dataNameMap.set(name, true);
selectTargetList.push({
name: name,
value: data.get(valueDim, i),
selected: retrieveRawAttr(data, i, 'selected')
});
}
var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
zrUtil.each(geoSource.regions, function (region) {
var name = region.name;
if (!dataNameMap.get(name)) {
selectTargetList.push({
name: name
});
toAppendNames.push(name);
}
});
this.updateSelectedMap(selectTargetList); // Complete data with missing regions. The consequent processes (like visual
// map and render) can not be performed without a "full data". For example,
// find `dataIndex` by name.
data.appendValues([], toAppendNames);
return data;
},
/**
* If no host geo model, return null, which means using a
* inner exclusive geo model.
*/
getHostGeoModel: function () {
var geoIndex = this.option.geoIndex;
return geoIndex != null ? this.dependentModels.geo[geoIndex] : null;
},
getMapType: function () {
return (this.getHostGeoModel() || this).option.map;
},
// _fillOption: function (option, mapName) {
// Shallow clone
// option = zrUtil.extend({}, option);
// option.data = geoCreator.getFilledRegions(option.data, mapName, option.nameMap);
// return option;
// },
getRawValue: function (dataIndex) {
// Use value stored in data instead because it is calculated from multiple series
// FIXME Provide all value of multiple series ?
var data = this.getData();
return data.get(data.mapDimension('value'), dataIndex);
},
/**
* Get model of region
* @param {string} name
* @return {module:echarts/model/Model}
*/
getRegionModel: function (regionName) {
var data = this.getData();
return data.getItemModel(data.indexOfName(regionName));
},
/**
* Map tooltip formatter
*
* @param {number} dataIndex
*/
formatTooltip: function (dataIndex, multipleSeries, dataType, renderMode) {
// FIXME orignalData and data is a bit confusing
var data = this.getData();
var formattedValue = addCommas(this.getRawValue(dataIndex));
var name = data.getName(dataIndex);
var seriesGroup = this.seriesGroup;
var seriesNames = [];
for (var i = 0; i < seriesGroup.length; i++) {
var otherIndex = seriesGroup[i].originalData.indexOfName(name);
var valueDim = data.mapDimension('value');
if (!isNaN(seriesGroup[i].originalData.get(valueDim, otherIndex))) {
seriesNames.push(encodeHTML(seriesGroup[i].name));
}
}
var newLine = renderMode === 'html' ? '<br/>' : '\n';
return seriesNames.join(', ') + newLine + encodeHTML(name + ' : ' + formattedValue);
},
/**
* @implement
*/
getTooltipPosition: function (dataIndex) {
if (dataIndex != null) {
var name = this.getData().getName(dataIndex);
var geo = this.coordinateSystem;
var region = geo.getRegion(name);
return region && geo.dataToPoint(region.center);
}
},
setZoom: function (zoom) {
this.option.zoom = zoom;
},
setCenter: function (center) {
this.option.center = center;
},
defaultOption: {
// 一级层叠
zlevel: 0,
// 二级层叠
z: 2,
coordinateSystem: 'geo',
// map should be explicitly specified since ec3.
map: '',
// If `geoIndex` is not specified, a exclusive geo will be
// created. Otherwise use the specified geo component, and
// `map` and `mapType` are ignored.
// geoIndex: 0,
// 'center' | 'left' | 'right' | 'x%' | {number}
left: 'center',
// 'center' | 'top' | 'bottom' | 'x%' | {number}
top: 'center',
// right
// bottom
// width:
// height
// Aspect is width / height. Inited to be geoJson bbox aspect
// This parameter is used for scale this aspect
aspectScale: 0.75,
///// Layout with center and size
// If you wan't to put map in a fixed size box with right aspect ratio
// This two properties may more conveninet
// layoutCenter: [50%, 50%]
// layoutSize: 100
// 数值合并方式,默认加和,可选为:
// 'sum' | 'average' | 'max' | 'min'
// mapValueCalculation: 'sum',
// 地图数值计算结果小数精度
// mapValuePrecision: 0,
// 显示图例颜色标识(系列标识的小圆点),图例开启时有效
showLegendSymbol: true,
// 选择模式默认关闭可选singlemultiple
// selectedMode: false,
dataRangeHoverLink: true,
// 是否开启缩放及漫游模式
// roam: false,
// Define left-top, right-bottom coords to control view
// For example, [ [180, 90], [-180, -90] ],
// higher priority than center and zoom
boundingCoords: null,
// Default on center of map
center: null,
zoom: 1,
scaleLimit: null,
label: {
show: false,
color: '#000'
},
// scaleLimit: null,
itemStyle: {
borderWidth: 0.5,
borderColor: '#444',
areaColor: '#eee'
},
emphasis: {
label: {
show: true,
color: 'rgb(100,0,0)'
},
itemStyle: {
areaColor: 'rgba(255,215,0,0.8)'
}
},
nameProperty: 'name'
}
});
zrUtil.mixin(MapSeries, dataSelectableMixin);
var _default = MapSeries;
module.exports = _default;

227
node_modules/echarts/lib/chart/map/MapView.js generated vendored Normal file
View File

@ -0,0 +1,227 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var echarts = require("../../echarts");
var zrUtil = require("zrender/lib/core/util");
var graphic = require("../../util/graphic");
var MapDraw = require("../../component/helper/MapDraw");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var HIGH_DOWN_PROP = '__seriesMapHighDown';
var RECORD_VERSION_PROP = '__seriesMapCallKey';
var _default = echarts.extendChartView({
type: 'map',
render: function (mapModel, ecModel, api, payload) {
// Not render if it is an toggleSelect action from self
if (payload && payload.type === 'mapToggleSelect' && payload.from === this.uid) {
return;
}
var group = this.group;
group.removeAll();
if (mapModel.getHostGeoModel()) {
return;
} // Not update map if it is an roam action from self
if (!(payload && payload.type === 'geoRoam' && payload.componentType === 'series' && payload.seriesId === mapModel.id)) {
if (mapModel.needsDrawMap) {
var mapDraw = this._mapDraw || new MapDraw(api, true);
group.add(mapDraw.group);
mapDraw.draw(mapModel, ecModel, api, this, payload);
this._mapDraw = mapDraw;
} else {
// Remove drawed map
this._mapDraw && this._mapDraw.remove();
this._mapDraw = null;
}
} else {
var mapDraw = this._mapDraw;
mapDraw && group.add(mapDraw.group);
}
mapModel.get('showLegendSymbol') && ecModel.getComponent('legend') && this._renderSymbols(mapModel, ecModel, api);
},
remove: function () {
this._mapDraw && this._mapDraw.remove();
this._mapDraw = null;
this.group.removeAll();
},
dispose: function () {
this._mapDraw && this._mapDraw.remove();
this._mapDraw = null;
},
_renderSymbols: function (mapModel, ecModel, api) {
var originalData = mapModel.originalData;
var group = this.group;
originalData.each(originalData.mapDimension('value'), function (value, originalDataIndex) {
if (isNaN(value)) {
return;
}
var layout = originalData.getItemLayout(originalDataIndex);
if (!layout || !layout.point) {
// Not exists in map
return;
}
var point = layout.point;
var offset = layout.offset;
var circle = new graphic.Circle({
style: {
// Because the special of map draw.
// Which needs statistic of multiple series and draw on one map.
// And each series also need a symbol with legend color
//
// Layout and visual are put one the different data
fill: mapModel.getData().getVisual('color')
},
shape: {
cx: point[0] + offset * 9,
cy: point[1],
r: 3
},
silent: true,
// Do not overlap the first series, on which labels are displayed.
z2: 8 + (!offset ? graphic.Z2_EMPHASIS_LIFT + 1 : 0)
}); // Only the series that has the first value on the same region is in charge of rendering the label.
// But consider the case:
// series: [
// {id: 'X', type: 'map', map: 'm', {data: [{name: 'A', value: 11}, {name: 'B', {value: 22}]},
// {id: 'Y', type: 'map', map: 'm', {data: [{name: 'A', value: 21}, {name: 'C', {value: 33}]}
// ]
// The offset `0` of item `A` is at series `X`, but of item `C` is at series `Y`.
// For backward compatibility, we follow the rule that render label `A` by the
// settings on series `X` but render label `C` by the settings on series `Y`.
if (!offset) {
var fullData = mapModel.mainSeries.getData();
var name = originalData.getName(originalDataIndex);
var fullIndex = fullData.indexOfName(name);
var itemModel = originalData.getItemModel(originalDataIndex);
var labelModel = itemModel.getModel('label');
var hoverLabelModel = itemModel.getModel('emphasis.label');
var regionGroup = fullData.getItemGraphicEl(fullIndex); // `getFormattedLabel` needs to use `getData` inside. Here
// `mapModel.getData()` is shallow cloned from `mainSeries.getData()`.
// FIXME
// If this is not the `mainSeries`, the item model (like label formatter)
// set on original data item will never get. But it has been working
// like that from the begining, and this scenario is rarely encountered.
// So it won't be fixed until have to.
var normalText = zrUtil.retrieve2(mapModel.getFormattedLabel(fullIndex, 'normal'), name);
var emphasisText = zrUtil.retrieve2(mapModel.getFormattedLabel(fullIndex, 'emphasis'), normalText);
var highDownRecord = regionGroup[HIGH_DOWN_PROP];
var recordVersion = Math.random(); // Prevent from register listeners duplicatedly when roaming.
if (!highDownRecord) {
highDownRecord = regionGroup[HIGH_DOWN_PROP] = {};
var onEmphasis = zrUtil.curry(onRegionHighDown, true);
var onNormal = zrUtil.curry(onRegionHighDown, false);
regionGroup.on('mouseover', onEmphasis).on('mouseout', onNormal).on('emphasis', onEmphasis).on('normal', onNormal);
} // Prevent removed regions effect current grapics.
regionGroup[RECORD_VERSION_PROP] = recordVersion;
zrUtil.extend(highDownRecord, {
recordVersion: recordVersion,
circle: circle,
labelModel: labelModel,
hoverLabelModel: hoverLabelModel,
emphasisText: emphasisText,
normalText: normalText
}); // FIXME
// Consider set option when emphasis.
enterRegionHighDown(highDownRecord, false);
}
group.add(circle);
});
}
});
function onRegionHighDown(toHighOrDown) {
var highDownRecord = this[HIGH_DOWN_PROP];
if (highDownRecord && highDownRecord.recordVersion === this[RECORD_VERSION_PROP]) {
enterRegionHighDown(highDownRecord, toHighOrDown);
}
}
function enterRegionHighDown(highDownRecord, toHighOrDown) {
var circle = highDownRecord.circle;
var labelModel = highDownRecord.labelModel;
var hoverLabelModel = highDownRecord.hoverLabelModel;
var emphasisText = highDownRecord.emphasisText;
var normalText = highDownRecord.normalText;
if (toHighOrDown) {
circle.style.extendFrom(graphic.setTextStyle({}, hoverLabelModel, {
text: hoverLabelModel.get('show') ? emphasisText : null
}, {
isRectText: true,
useInsideStyle: false
}, true)); // Make label upper than others if overlaps.
circle.__mapOriginalZ2 = circle.z2;
circle.z2 += graphic.Z2_EMPHASIS_LIFT;
} else {
graphic.setTextStyle(circle.style, labelModel, {
text: labelModel.get('show') ? normalText : null,
textPosition: labelModel.getShallow('position') || 'bottom'
}, {
isRectText: true,
useInsideStyle: false
}); // Trigger normalize style like padding.
circle.dirty(false);
if (circle.__mapOriginalZ2 != null) {
circle.z2 = circle.__mapOriginalZ2;
circle.__mapOriginalZ2 = null;
}
}
}
module.exports = _default;

54
node_modules/echarts/lib/chart/map/backwardCompat.js generated vendored Normal file
View File

@ -0,0 +1,54 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var zrUtil = require("zrender/lib/core/util");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
function _default(option) {
// Save geoCoord
var mapSeries = [];
zrUtil.each(option.series, function (seriesOpt) {
if (seriesOpt && seriesOpt.type === 'map') {
mapSeries.push(seriesOpt);
seriesOpt.map = seriesOpt.map || seriesOpt.mapType; // Put x, y, width, height, x2, y2 in the top level
zrUtil.defaults(seriesOpt, seriesOpt.mapLocation);
}
});
}
module.exports = _default;

116
node_modules/echarts/lib/chart/map/mapDataStatistic.js generated vendored Normal file
View File

@ -0,0 +1,116 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var zrUtil = require("zrender/lib/core/util");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// FIXME 公用?
/**
* @param {Array.<module:echarts/data/List>} datas
* @param {string} statisticType 'average' 'sum'
* @inner
*/
function dataStatistics(datas, statisticType) {
var dataNameMap = {};
zrUtil.each(datas, function (data) {
data.each(data.mapDimension('value'), function (value, idx) {
// Add prefix to avoid conflict with Object.prototype.
var mapKey = 'ec-' + data.getName(idx);
dataNameMap[mapKey] = dataNameMap[mapKey] || [];
if (!isNaN(value)) {
dataNameMap[mapKey].push(value);
}
});
});
return datas[0].map(datas[0].mapDimension('value'), function (value, idx) {
var mapKey = 'ec-' + datas[0].getName(idx);
var sum = 0;
var min = Infinity;
var max = -Infinity;
var len = dataNameMap[mapKey].length;
for (var i = 0; i < len; i++) {
min = Math.min(min, dataNameMap[mapKey][i]);
max = Math.max(max, dataNameMap[mapKey][i]);
sum += dataNameMap[mapKey][i];
}
var result;
if (statisticType === 'min') {
result = min;
} else if (statisticType === 'max') {
result = max;
} else if (statisticType === 'average') {
result = sum / len;
} else {
result = sum;
}
return len === 0 ? NaN : result;
});
}
function _default(ecModel) {
var seriesGroups = {};
ecModel.eachSeriesByType('map', function (seriesModel) {
var hostGeoModel = seriesModel.getHostGeoModel();
var key = hostGeoModel ? 'o' + hostGeoModel.id : 'i' + seriesModel.getMapType();
(seriesGroups[key] = seriesGroups[key] || []).push(seriesModel);
});
zrUtil.each(seriesGroups, function (seriesList, key) {
var data = dataStatistics(zrUtil.map(seriesList, function (seriesModel) {
return seriesModel.getData();
}), seriesList[0].get('mapValueCalculation'));
for (var i = 0; i < seriesList.length; i++) {
seriesList[i].originalData = seriesList[i].getData();
} // FIXME Put where?
for (var i = 0; i < seriesList.length; i++) {
seriesList[i].seriesGroup = seriesList;
seriesList[i].needsDrawMap = i === 0 && !seriesList[i].getHostGeoModel();
seriesList[i].setData(data.cloneShallow());
seriesList[i].mainSeries = seriesList[0];
}
});
}
module.exports = _default;

88
node_modules/echarts/lib/chart/map/mapSymbolLayout.js generated vendored Normal file
View File

@ -0,0 +1,88 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var zrUtil = require("zrender/lib/core/util");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
function _default(ecModel) {
var processedMapType = {};
ecModel.eachSeriesByType('map', function (mapSeries) {
var mapType = mapSeries.getMapType();
if (mapSeries.getHostGeoModel() || processedMapType[mapType]) {
return;
}
var mapSymbolOffsets = {};
zrUtil.each(mapSeries.seriesGroup, function (subMapSeries) {
var geo = subMapSeries.coordinateSystem;
var data = subMapSeries.originalData;
if (subMapSeries.get('showLegendSymbol') && ecModel.getComponent('legend')) {
data.each(data.mapDimension('value'), function (value, idx) {
var name = data.getName(idx);
var region = geo.getRegion(name); // If input series.data is [11, 22, '-'/null/undefined, 44],
// it will be filled with NaN: [11, 22, NaN, 44] and NaN will
// not be drawn. So here must validate if value is NaN.
if (!region || isNaN(value)) {
return;
}
var offset = mapSymbolOffsets[name] || 0;
var point = geo.dataToPoint(region.center);
mapSymbolOffsets[name] = offset + 1;
data.setItemLayout(idx, {
point: point,
offset: offset
});
});
}
}); // Show label of those region not has legendSymbol(which is offset 0)
var data = mapSeries.getData();
data.each(function (idx) {
var name = data.getName(idx);
var layout = data.getItemLayout(idx) || {};
layout.showLabel = !mapSymbolOffsets[name];
data.setItemLayout(idx, layout);
});
processedMapType[mapType] = true;
});
}
module.exports = _default;

52
node_modules/echarts/lib/chart/map/mapVisual.js generated vendored Normal file
View File

@ -0,0 +1,52 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
function _default(ecModel) {
ecModel.eachSeriesByType('map', function (seriesModel) {
var colorList = seriesModel.get('color');
var itemStyleModel = seriesModel.getModel('itemStyle');
var areaColor = itemStyleModel.get('areaColor');
var color = itemStyleModel.get('color') || colorList[seriesModel.seriesIndex % colorList.length];
seriesModel.getData().setVisual({
'areaColor': areaColor,
'color': color
});
});
}
module.exports = _default;