@vtx/ol-map 1.0.136 → 1.0.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +205 -205
- package/lib/_util/EventEmitter.js +11 -13
- package/lib/_util/EventEmitter.js.map +1 -1
- package/lib/_util/StyleCache.js +8 -10
- package/lib/_util/StyleCache.js.map +1 -1
- package/lib/_util/encryptParams.js +17 -22
- package/lib/_util/encryptParams.js.map +1 -1
- package/lib/_util/filterSpecialCharacters.js +12 -12
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +1 -1
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getCookie.js +5 -6
- package/lib/_util/getCookie.js.map +1 -1
- package/lib/_util/getDefaultMapInfo.js +7 -8
- package/lib/_util/getDefaultMapInfo.js.map +1 -1
- package/lib/_util/getSystemInfo.js +7 -8
- package/lib/_util/getSystemInfo.js.map +1 -1
- package/lib/_util/getToken.js +2 -4
- package/lib/_util/getToken.js.map +1 -1
- package/lib/_util/getUrlParam.js +2 -3
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/http.js +30 -32
- package/lib/_util/http.js.map +1 -1
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/layer.js +33 -37
- package/lib/_util/layer.js.map +1 -1
- package/lib/_util/mapTool.js +36 -37
- package/lib/_util/mapTool.js.map +1 -1
- package/lib/_util/projzh/datum/bd-09.js +2 -3
- package/lib/_util/projzh/datum/bd-09.js.map +1 -1
- package/lib/_util/projzh/datum/gcj-02.js +1 -2
- package/lib/_util/projzh/datum/gcj-02.js.map +1 -1
- package/lib/_util/projzh/datum/index.js +2 -3
- package/lib/_util/projzh/datum/index.js.map +1 -1
- package/lib/_util/projzh/index.js +2 -3
- package/lib/_util/projzh/index.js.map +1 -1
- package/lib/_util/projzh/projection/baidu-mercator.js +1 -2
- package/lib/_util/projzh/projection/baidu-mercator.js.map +1 -1
- package/lib/_util/projzh/projection/index.js +2 -3
- package/lib/_util/projzh/projection/index.js.map +1 -1
- package/lib/_util/projzh/projection/spherical-mercator.js +1 -2
- package/lib/_util/projzh/projection/spherical-mercator.js.map +1 -1
- package/lib/_util/projzh/util.js +1 -2
- package/lib/_util/projzh/util.js.map +1 -1
- package/lib/_util/search.js +13 -16
- package/lib/_util/search.js.map +1 -1
- package/lib/_util/setCookie.js +5 -6
- package/lib/_util/setCookie.js.map +1 -1
- package/lib/_util/stringToFun.js +5 -5
- package/lib/_util/stringToFun.js.map +1 -1
- package/lib/_util/transform.js +9 -10
- package/lib/_util/transform.js.map +1 -1
- package/lib/_util/useColSize.js +2 -3
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +12 -13
- package/lib/_util/useSet.js.map +1 -1
- package/lib/analysis-layer/index.js +44 -50
- package/lib/analysis-layer/index.js.map +1 -1
- package/lib/analysis-layer/style/css.js.map +1 -1
- package/lib/analysis-layer/style/index.js.map +1 -1
- package/lib/buffer-draw/BufferDraw.js +11 -13
- package/lib/buffer-draw/BufferDraw.js.map +1 -1
- package/lib/buffer-draw/index.js +10 -10
- package/lib/buffer-draw/index.js.map +1 -1
- package/lib/buffer-draw/style/css.js.map +1 -1
- package/lib/buffer-draw/style/index.js.map +1 -1
- package/lib/circle/Circle.js +22 -24
- package/lib/circle/Circle.js.map +1 -1
- package/lib/circle/index.js +4 -4
- package/lib/circle/index.js.map +1 -1
- package/lib/circle/style/css.js.map +1 -1
- package/lib/circle/style/index.js.map +1 -1
- package/lib/config.js +1 -2
- package/lib/config.js.map +1 -1
- package/lib/convertCamelToCSS.js +1 -2
- package/lib/convertCamelToCSS.js.map +1 -1
- package/lib/dom/Dom.js +19 -21
- package/lib/dom/Dom.js.map +1 -1
- package/lib/dom/index.js +11 -11
- package/lib/dom/index.js.map +1 -1
- package/lib/dom/style/css.js.map +1 -1
- package/lib/dom/style/index.js.map +1 -1
- package/lib/events/index.js +2 -4
- package/lib/events/index.js.map +1 -1
- package/lib/feature-draw/FeatureDraw.js +40 -46
- package/lib/feature-draw/FeatureDraw.js.map +1 -1
- package/lib/feature-draw/index.js +11 -11
- package/lib/feature-draw/index.js.map +1 -1
- package/lib/feature-draw/style/css.js.map +1 -1
- package/lib/feature-draw/style/index.js.map +1 -1
- package/lib/feature-layer/FeatureLayer.js +64 -56
- package/lib/feature-layer/FeatureLayer.js.map +1 -1
- package/lib/feature-layer/MyCluster.js +28 -31
- package/lib/feature-layer/MyCluster.js.map +1 -1
- package/lib/feature-layer/createFeatureCollection.js +27 -35
- package/lib/feature-layer/createFeatureCollection.js.map +1 -1
- package/lib/feature-layer/index.js +18 -17
- package/lib/feature-layer/index.js.map +1 -1
- package/lib/feature-layer/style/css.js.map +1 -1
- package/lib/feature-layer/style/index.js.map +1 -1
- package/lib/flow-line-layer/FlowLineLayer.js +22 -25
- package/lib/flow-line-layer/FlowLineLayer.js.map +1 -1
- package/lib/flow-line-layer/index.js +16 -16
- package/lib/flow-line-layer/index.js.map +1 -1
- package/lib/flow-line-layer/style/css.js.map +1 -1
- package/lib/flow-line-layer/style/index.js.map +1 -1
- package/lib/fly-line-layer/FlyLineLayer.js +12 -14
- package/lib/fly-line-layer/FlyLineLayer.js.map +1 -1
- package/lib/fly-line-layer/index.js +9 -9
- package/lib/fly-line-layer/index.js.map +1 -1
- package/lib/fly-line-layer/style/css.js.map +1 -1
- package/lib/fly-line-layer/style/index.js.map +1 -1
- package/lib/group-layer/GroupLayer.js +10 -12
- package/lib/group-layer/GroupLayer.js.map +1 -1
- package/lib/group-layer/index.js +9 -9
- package/lib/group-layer/index.js.map +1 -1
- package/lib/group-layer/style/css.js.map +1 -1
- package/lib/group-layer/style/index.js.map +1 -1
- package/lib/heatmap-layer/HeatmapLayer.js +29 -30
- package/lib/heatmap-layer/HeatmapLayer.js.map +1 -1
- package/lib/heatmap-layer/index.js +9 -9
- package/lib/heatmap-layer/index.js.map +1 -1
- package/lib/heatmap-layer/style/css.js.map +1 -1
- package/lib/heatmap-layer/style/index.js.map +1 -1
- package/lib/high-layer/HighLayer.js +13 -15
- package/lib/high-layer/HighLayer.js.map +1 -1
- package/lib/high-layer/index.js +12 -13
- package/lib/high-layer/index.js.map +1 -1
- package/lib/high-layer/style/css.js.map +1 -1
- package/lib/high-layer/style/index.js.map +1 -1
- package/lib/image-layer/ImageLayer.js +31 -33
- package/lib/image-layer/ImageLayer.js.map +1 -1
- package/lib/image-layer/ImageTileLayer.js +31 -33
- package/lib/image-layer/ImageTileLayer.js.map +1 -1
- package/lib/image-layer/index.js +11 -11
- package/lib/image-layer/index.js.map +1 -1
- package/lib/image-layer/style/css.js.map +1 -1
- package/lib/image-layer/style/index.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legend/index.js +21 -23
- package/lib/legend/index.js.map +1 -1
- package/lib/legend/style/css.js.map +1 -1
- package/lib/legend/style/index.js.map +1 -1
- package/lib/legend/style/index.less +73 -73
- package/lib/map/Analysis.js +24 -27
- package/lib/map/Analysis.js.map +1 -1
- package/lib/map/Layers.js +24 -28
- package/lib/map/Layers.js.map +1 -1
- package/lib/map/Popup.js +23 -24
- package/lib/map/Popup.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js +1 -2
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js +2 -3
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js +8 -10
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js +7 -9
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/index.js +11 -13
- package/lib/map/getBaseLayers/index.js.map +1 -1
- package/lib/map/index.js +40 -41
- package/lib/map/index.js.map +1 -1
- package/lib/map/style/css.js.map +1 -1
- package/lib/map/style/index.js.map +1 -1
- package/lib/map/style/index.less +152 -152
- package/lib/map-icon/svg/index.js +2 -3
- package/lib/map-icon/svg/index.js.map +1 -1
- package/lib/map-icon/svg/tuceng.svg.js.map +1 -1
- package/lib/marker/Marker.js +23 -27
- package/lib/marker/Marker.js.map +1 -1
- package/lib/marker/index.js +4 -4
- package/lib/marker/index.js.map +1 -1
- package/lib/marker/style/css.js.map +1 -1
- package/lib/marker/style/index.js.map +1 -1
- package/lib/path-line-layer/PathLineLayer.js +21 -23
- package/lib/path-line-layer/PathLineLayer.js.map +1 -1
- package/lib/path-line-layer/getPathLineStyles.js +8 -9
- package/lib/path-line-layer/getPathLineStyles.js.map +1 -1
- package/lib/path-line-layer/index.js +16 -16
- package/lib/path-line-layer/index.js.map +1 -1
- package/lib/path-line-layer/style/css.js.map +1 -1
- package/lib/path-line-layer/style/index.js.map +1 -1
- package/lib/path-play-back/PathPlayBack.js +19 -21
- package/lib/path-play-back/PathPlayBack.js.map +1 -1
- package/lib/path-play-back/index.js +8 -9
- package/lib/path-play-back/index.js.map +1 -1
- package/lib/path-play-back/style/css.js.map +1 -1
- package/lib/path-play-back/style/index.js.map +1 -1
- package/lib/poi-search/Location.js +8 -8
- package/lib/poi-search/Location.js.map +1 -1
- package/lib/poi-search/PoiList.js +10 -10
- package/lib/poi-search/PoiList.js.map +1 -1
- package/lib/poi-search/Search.js +21 -21
- package/lib/poi-search/Search.js.map +1 -1
- package/lib/poi-search/index.js +10 -11
- package/lib/poi-search/index.js.map +1 -1
- package/lib/poi-search/style/css.js.map +1 -1
- package/lib/poi-search/style/index.js.map +1 -1
- package/lib/poi-search/style/index.less +97 -97
- package/lib/point/Point.js +22 -24
- package/lib/point/Point.js.map +1 -1
- package/lib/point/index.js +4 -4
- package/lib/point/index.js.map +1 -1
- package/lib/point/style/css.js.map +1 -1
- package/lib/point/style/index.js.map +1 -1
- package/lib/polygon/Polygon.js +22 -24
- package/lib/polygon/Polygon.js.map +1 -1
- package/lib/polygon/index.js +4 -4
- package/lib/polygon/index.js.map +1 -1
- package/lib/polygon/style/css.js.map +1 -1
- package/lib/polygon/style/index.js.map +1 -1
- package/lib/polyline/Polyline.js +22 -24
- package/lib/polyline/Polyline.js.map +1 -1
- package/lib/polyline/index.js +4 -4
- package/lib/polyline/index.js.map +1 -1
- package/lib/polyline/style/css.js.map +1 -1
- package/lib/polyline/style/index.js.map +1 -1
- package/lib/popup/index.js +15 -16
- package/lib/popup/index.js.map +1 -1
- package/lib/popup/style/css.js.map +1 -1
- package/lib/popup/style/index.js.map +1 -1
- package/lib/popup/style/index.less +129 -129
- package/lib/provider/index.js +3 -5
- package/lib/provider/index.js.map +1 -1
- package/lib/provider/style/css.js.map +1 -1
- package/lib/provider/style/index.js.map +1 -1
- package/lib/renderer/Fill.js +17 -19
- package/lib/renderer/Fill.js.map +1 -1
- package/lib/renderer/Stroke.js +17 -19
- package/lib/renderer/Stroke.js.map +1 -1
- package/lib/renderer/index.js +15 -16
- package/lib/renderer/index.js.map +1 -1
- package/lib/renderer/style/css.js.map +1 -1
- package/lib/renderer/style/index.js.map +1 -1
- package/lib/renderer/transformRgb.js +1 -2
- package/lib/renderer/transformRgb.js.map +1 -1
- package/lib/search-map/VtxModal.js +22 -25
- package/lib/search-map/VtxModal.js.map +1 -1
- package/lib/search-map/index.js +10 -11
- package/lib/search-map/index.js.map +1 -1
- package/lib/search-map/style/css.js.map +1 -1
- package/lib/search-map/style/index.js.map +1 -1
- package/lib/search-map/style/index.less +82 -82
- package/lib/search-map/style/modal.less +58 -58
- package/lib/style/index.less +2 -2
- package/lib/style/themes/compact.less +1 -1
- package/lib/style/themes/dark.less +9 -9
- package/lib/style/themes/default.less +7 -7
- package/lib/style/themes/index.less +1 -1
- package/lib/style/themes/variable.less +5 -5
- package/lib/tile-layer/TileLayer.js +20 -22
- package/lib/tile-layer/TileLayer.js.map +1 -1
- package/lib/tile-layer/index.js +4 -4
- package/lib/tile-layer/index.js.map +1 -1
- package/lib/tile-layer/style/css.js.map +1 -1
- package/lib/tile-layer/style/index.js.map +1 -1
- package/lib/tools/Layer/LayerService.js +8 -9
- package/lib/tools/Layer/LayerService.js.map +1 -1
- package/lib/tools/Layer/LayersCheckService.js +32 -39
- package/lib/tools/Layer/LayersCheckService.js.map +1 -1
- package/lib/tools/Layer/index.js +15 -15
- package/lib/tools/Layer/index.js.map +1 -1
- package/lib/tools/Layer/index.less +43 -43
- package/lib/tools/Search/index.js +20 -22
- package/lib/tools/Search/index.js.map +1 -1
- package/lib/tools/Toolbox/BoxSelect/index.js +5 -6
- package/lib/tools/Toolbox/BoxSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/CircleSelect/index.js +5 -6
- package/lib/tools/Toolbox/CircleSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/EagleEye/index.js +10 -11
- package/lib/tools/Toolbox/EagleEye/index.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js +33 -36
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/index.js +23 -24
- package/lib/tools/Toolbox/MapBookmark/index.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/index.less +20 -20
- package/lib/tools/Toolbox/MapDownload/index.js +2 -2
- package/lib/tools/Toolbox/MapDownload/index.js.map +1 -1
- package/lib/tools/Toolbox/MapPrint/index.js +19 -20
- package/lib/tools/Toolbox/MapPrint/index.js.map +1 -1
- package/lib/tools/Toolbox/MapPrint/index.less +4 -4
- package/lib/tools/Toolbox/Measure/Area/index.js +3 -4
- package/lib/tools/Toolbox/Measure/Area/index.js.map +1 -1
- package/lib/tools/Toolbox/Measure/Distance/index.js +3 -4
- package/lib/tools/Toolbox/Measure/Distance/index.js.map +1 -1
- package/lib/tools/Toolbox/Measure/Measure.js +8 -10
- package/lib/tools/Toolbox/Measure/Measure.js.map +1 -1
- package/lib/tools/Toolbox/Measure/index.js +13 -14
- package/lib/tools/Toolbox/Measure/index.js.map +1 -1
- package/lib/tools/Toolbox/PolygonSelect/index.js +5 -6
- package/lib/tools/Toolbox/PolygonSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/ScaleLine/index.js +10 -11
- package/lib/tools/Toolbox/ScaleLine/index.js.map +1 -1
- package/lib/tools/Toolbox/SelectTools/index.js +41 -43
- package/lib/tools/Toolbox/SelectTools/index.js.map +1 -1
- package/lib/tools/Toolbox/SelectTools/index.less +87 -87
- package/lib/tools/Toolbox/SpaceQuery/index.js +13 -13
- package/lib/tools/Toolbox/SpaceQuery/index.js.map +1 -1
- package/lib/tools/Toolbox/SpaceQuery/index.less +16 -16
- package/lib/tools/Toolbox/ZoomInput/index.js +10 -11
- package/lib/tools/Toolbox/ZoomInput/index.js.map +1 -1
- package/lib/tools/Toolbox/ZoomInput/index.less +5 -5
- package/lib/tools/Toolbox/index.js +8 -10
- package/lib/tools/Toolbox/index.js.map +1 -1
- package/lib/tools/Toolbox/index.less +2 -2
- package/lib/tools/Utils/CreateOverlay.js +10 -11
- package/lib/tools/Utils/CreateOverlay.js.map +1 -1
- package/lib/tools/Utils/Draw.js +16 -19
- package/lib/tools/Utils/Draw.js.map +1 -1
- package/lib/tools/Utils/HighLayer.js +14 -16
- package/lib/tools/Utils/HighLayer.js.map +1 -1
- package/lib/tools/Utils/measure.js +6 -7
- package/lib/tools/Utils/measure.js.map +1 -1
- package/lib/tools/Utils/utils.js +36 -45
- package/lib/tools/Utils/utils.js.map +1 -1
- package/lib/tools/View/index.js +15 -16
- package/lib/tools/View/index.js.map +1 -1
- package/lib/tools/View/index.less +28 -28
- package/lib/tools/analysis-tool/index.js +19 -20
- package/lib/tools/analysis-tool/index.js.map +1 -1
- package/lib/tools/base-map-switch/index.js +15 -16
- package/lib/tools/base-map-switch/index.js.map +1 -1
- package/lib/tools/components/Chart/index.js +120 -130
- package/lib/tools/components/Chart/index.js.map +1 -1
- package/lib/tools/components/Icon/index.js +2 -3
- package/lib/tools/components/Icon/index.js.map +1 -1
- package/lib/tools/components/Info/index.js +2 -3
- package/lib/tools/components/Info/index.js.map +1 -1
- package/lib/tools/components/Info/index.less +26 -26
- package/lib/tools/components/ItemWrap/index.js +10 -11
- package/lib/tools/components/ItemWrap/index.js.map +1 -1
- package/lib/tools/components/ItemWrap/index.less +41 -41
- package/lib/tools/components/Modal/index.js +10 -11
- package/lib/tools/components/Modal/index.js.map +1 -1
- package/lib/tools/components/Modal/index.less +33 -33
- package/lib/tools/components/MyTabs/index.js +1 -1
- package/lib/tools/components/MyTabs/index.js.map +1 -1
- package/lib/tools/components/RequiredLabel/index.js +7 -7
- package/lib/tools/components/RequiredLabel/index.js.map +1 -1
- package/lib/tools/components/RequiredLabel/index.less +5 -5
- package/lib/tools/components/Select/index.js +2 -3
- package/lib/tools/components/Select/index.js.map +1 -1
- package/lib/tools/components/Table/index.js +16 -17
- package/lib/tools/components/Table/index.js.map +1 -1
- package/lib/tools/components/Table/index.less +13 -13
- package/lib/tools/components/ToolItem/index.js +2 -3
- package/lib/tools/components/ToolItem/index.js.map +1 -1
- package/lib/tools/components/ToolItem/index.less +27 -27
- package/lib/tools/components/ToolsSelect/index.js +2 -3
- package/lib/tools/components/ToolsSelect/index.js.map +1 -1
- package/lib/tools/components/ToolsSelect/index.less +10 -10
- package/lib/tools/full-screen/index.js +11 -12
- package/lib/tools/full-screen/index.js.map +1 -1
- package/lib/tools/index.js +11 -11
- package/lib/tools/index.js.map +1 -1
- package/lib/tools/layer-control/index.js +23 -26
- package/lib/tools/layer-control/index.js.map +1 -1
- package/lib/tools/refresh/index.js +11 -12
- package/lib/tools/refresh/index.js.map +1 -1
- package/lib/tools/style/css.js.map +1 -1
- package/lib/tools/style/index.js.map +1 -1
- package/lib/tools/style/index.less +154 -154
- package/lib/tools-item/index.js +10 -11
- package/lib/tools-item/index.js.map +1 -1
- package/lib/use-props/index.js +1 -2
- package/lib/use-props/index.js.map +1 -1
- package/lib/use-props/style/css.js.map +1 -1
- package/lib/use-props/style/index.js.map +1 -1
- package/lib/wms-layer/WmsLayer.js +31 -33
- package/lib/wms-layer/WmsLayer.js.map +1 -1
- package/lib/wms-layer/index.js +11 -11
- package/lib/wms-layer/index.js.map +1 -1
- package/lib/wms-layer/style/css.js.map +1 -1
- package/lib/wms-layer/style/index.js.map +1 -1
- package/package.json +1 -1
- package/CHANGELOG.md +0 -217
|
@@ -17,37 +17,37 @@ var _excluded = ["data"],
|
|
|
17
17
|
_excluded8 = ["name", "data"],
|
|
18
18
|
_excluded9 = ["name", "data"],
|
|
19
19
|
_excluded10 = ["data", "onEvents", "color", "legend", "unit", "tooltip", "grid", "xAxis", "yAxis", "height", "series", "loading", "title", "dataZoom", "noDataText", "style", "imgStyle", "noDataStyle"];
|
|
20
|
-
function _interopRequireDefault(
|
|
21
|
-
function _getRequireWildcardCache(
|
|
22
|
-
function _interopRequireWildcard(
|
|
23
|
-
function _toConsumableArray(
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
21
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
23
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
24
24
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
-
function _iterableToArray(
|
|
26
|
-
function _arrayWithoutHoles(
|
|
27
|
-
function _objectWithoutProperties(
|
|
28
|
-
function _objectWithoutPropertiesLoose(
|
|
29
|
-
function _typeof(
|
|
30
|
-
function ownKeys(
|
|
31
|
-
function _objectSpread(
|
|
32
|
-
function _defineProperty(
|
|
33
|
-
function _toPropertyKey(
|
|
34
|
-
function _toPrimitive(
|
|
35
|
-
function _slicedToArray(
|
|
25
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
26
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
27
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
28
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
29
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
30
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
33
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
34
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
35
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
36
36
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
37
|
-
function _unsupportedIterableToArray(
|
|
38
|
-
function _arrayLikeToArray(
|
|
39
|
-
function _iterableToArrayLimit(
|
|
40
|
-
function _arrayWithHoles(
|
|
37
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
38
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
39
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
40
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
41
41
|
var color = '#86909C';
|
|
42
42
|
var fontSize = '12px';
|
|
43
43
|
|
|
44
|
-
/**
|
|
45
|
-
* 小数处理,默认2位
|
|
46
|
-
* @param value
|
|
47
|
-
* @param len
|
|
48
|
-
* @returns {number|*}
|
|
44
|
+
/**
|
|
45
|
+
* 小数处理,默认2位
|
|
46
|
+
* @param value
|
|
47
|
+
* @param len
|
|
48
|
+
* @returns {number|*}
|
|
49
49
|
*/
|
|
50
|
-
var convertDecimal = function convertDecimal(value) {
|
|
50
|
+
var convertDecimal = exports.convertDecimal = function convertDecimal(value) {
|
|
51
51
|
var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
52
52
|
if (value && String(value).indexOf('.') !== -1) {
|
|
53
53
|
var _String$split = String(value).split('.'),
|
|
@@ -62,13 +62,12 @@ var convertDecimal = function convertDecimal(value) {
|
|
|
62
62
|
return value;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
/**
|
|
66
|
-
* 转换饼图数据,处理占比截取为默认2位小数
|
|
67
|
-
* @param data
|
|
68
|
-
* @returns {*[]}
|
|
65
|
+
/**
|
|
66
|
+
* 转换饼图数据,处理占比截取为默认2位小数
|
|
67
|
+
* @param data
|
|
68
|
+
* @returns {*[]}
|
|
69
69
|
*/
|
|
70
|
-
exports.
|
|
71
|
-
var convertPieData = function convertPieData(data) {
|
|
70
|
+
var convertPieData = exports.convertPieData = function convertPieData(data) {
|
|
72
71
|
var _data2;
|
|
73
72
|
var _data = [];
|
|
74
73
|
if ((_data2 = data) !== null && _data2 !== void 0 && _data2.length) {
|
|
@@ -93,14 +92,13 @@ var convertPieData = function convertPieData(data) {
|
|
|
93
92
|
return _data;
|
|
94
93
|
};
|
|
95
94
|
|
|
96
|
-
/**
|
|
97
|
-
* 合并 xAxis 配置及数据
|
|
98
|
-
* @param xAxis
|
|
99
|
-
* @param data
|
|
100
|
-
* @returns {*&{data: *[]}}
|
|
95
|
+
/**
|
|
96
|
+
* 合并 xAxis 配置及数据
|
|
97
|
+
* @param xAxis
|
|
98
|
+
* @param data
|
|
99
|
+
* @returns {*&{data: *[]}}
|
|
101
100
|
*/
|
|
102
|
-
exports.
|
|
103
|
-
var mergeXAxisAndData = function mergeXAxisAndData(xAxis, data) {
|
|
101
|
+
var mergeXAxisAndData = exports.mergeXAxisAndData = function mergeXAxisAndData(xAxis, data) {
|
|
104
102
|
var times = [];
|
|
105
103
|
if (data !== null && data !== void 0 && data.length) {
|
|
106
104
|
var field = xAxis.field,
|
|
@@ -116,22 +114,20 @@ var mergeXAxisAndData = function mergeXAxisAndData(xAxis, data) {
|
|
|
116
114
|
data: times
|
|
117
115
|
}, xAxis);
|
|
118
116
|
};
|
|
119
|
-
exports.
|
|
120
|
-
var numberTo = function numberTo(data, number, limit) {
|
|
117
|
+
var numberTo = exports.numberTo = function numberTo(data, number, limit) {
|
|
121
118
|
if (number) {
|
|
122
119
|
return (Number(data) / number).toFixed(limit || 2);
|
|
123
120
|
}
|
|
124
121
|
return data;
|
|
125
122
|
};
|
|
126
123
|
|
|
127
|
-
/**
|
|
128
|
-
* 合并 series 和数据
|
|
129
|
-
* @param series
|
|
130
|
-
* @param data
|
|
131
|
-
* @returns {*[]}
|
|
124
|
+
/**
|
|
125
|
+
* 合并 series 和数据
|
|
126
|
+
* @param series
|
|
127
|
+
* @param data
|
|
128
|
+
* @returns {*[]}
|
|
132
129
|
*/
|
|
133
|
-
exports.
|
|
134
|
-
var mergeSeriesAndData = function mergeSeriesAndData(series, data) {
|
|
130
|
+
var mergeSeriesAndData = exports.mergeSeriesAndData = function mergeSeriesAndData(series, data) {
|
|
135
131
|
var _series = [];
|
|
136
132
|
series.map(function (s) {
|
|
137
133
|
var seriesItem = _objectSpread({}, s);
|
|
@@ -146,13 +142,12 @@ var mergeSeriesAndData = function mergeSeriesAndData(series, data) {
|
|
|
146
142
|
return _series;
|
|
147
143
|
};
|
|
148
144
|
|
|
149
|
-
/**
|
|
150
|
-
* 合并配置和数据
|
|
151
|
-
* @param options
|
|
152
|
-
* @returns {{}}
|
|
145
|
+
/**
|
|
146
|
+
* 合并配置和数据
|
|
147
|
+
* @param options
|
|
148
|
+
* @returns {{}}
|
|
153
149
|
*/
|
|
154
|
-
exports.
|
|
155
|
-
var mergeConfigAndData = function mergeConfigAndData(options) {
|
|
150
|
+
var mergeConfigAndData = exports.mergeConfigAndData = function mergeConfigAndData(options) {
|
|
156
151
|
var xAxis = options.xAxis,
|
|
157
152
|
yAxis = options.yAxis,
|
|
158
153
|
series = options.series,
|
|
@@ -172,7 +167,6 @@ var mergeConfigAndData = function mergeConfigAndData(options) {
|
|
|
172
167
|
}
|
|
173
168
|
return _objectSpread(_objectSpread({}, options), val);
|
|
174
169
|
};
|
|
175
|
-
exports.mergeConfigAndData = mergeConfigAndData;
|
|
176
170
|
var getUnit = function getUnit(units, name) {
|
|
177
171
|
if (units && _typeof(units) === 'object') {
|
|
178
172
|
if (Array.isArray(units)) {
|
|
@@ -186,10 +180,10 @@ var getUnit = function getUnit(units, name) {
|
|
|
186
180
|
}
|
|
187
181
|
return units || '';
|
|
188
182
|
};
|
|
189
|
-
/**
|
|
190
|
-
* 获取 tooltip
|
|
191
|
-
* @param options
|
|
192
|
-
* @returns {*&{trigger: string}}
|
|
183
|
+
/**
|
|
184
|
+
* 获取 tooltip
|
|
185
|
+
* @param options
|
|
186
|
+
* @returns {*&{trigger: string}}
|
|
193
187
|
*/
|
|
194
188
|
var getTooltip = function getTooltip(options, unit, series) {
|
|
195
189
|
var _series$;
|
|
@@ -214,10 +208,10 @@ var getTooltip = function getTooltip(options, unit, series) {
|
|
|
214
208
|
}, options);
|
|
215
209
|
};
|
|
216
210
|
|
|
217
|
-
/**
|
|
218
|
-
* 获取 图例
|
|
219
|
-
* @param options
|
|
220
|
-
* @returns {*&{pageTextStyle: {color: string}, textStyle: {color: string}, type: string, pageIconInactiveColor: string, pageIconColor: string}}
|
|
211
|
+
/**
|
|
212
|
+
* 获取 图例
|
|
213
|
+
* @param options
|
|
214
|
+
* @returns {*&{pageTextStyle: {color: string}, textStyle: {color: string}, type: string, pageIconInactiveColor: string, pageIconColor: string}}
|
|
221
215
|
*/
|
|
222
216
|
var getLegend = function getLegend(options) {
|
|
223
217
|
return _objectSpread({
|
|
@@ -227,11 +221,11 @@ var getLegend = function getLegend(options) {
|
|
|
227
221
|
}, options);
|
|
228
222
|
};
|
|
229
223
|
|
|
230
|
-
/**
|
|
231
|
-
* 获取布局
|
|
232
|
-
* @param grid
|
|
233
|
-
* @param dataZoom
|
|
234
|
-
* @returns {*&{top: string, left: number, bottom: string, right: number, containLabel: boolean}}
|
|
224
|
+
/**
|
|
225
|
+
* 获取布局
|
|
226
|
+
* @param grid
|
|
227
|
+
* @param dataZoom
|
|
228
|
+
* @returns {*&{top: string, left: number, bottom: string, right: number, containLabel: boolean}}
|
|
235
229
|
*/
|
|
236
230
|
var getGrid = function getGrid(grid, dataZoom) {
|
|
237
231
|
return _objectSpread({
|
|
@@ -243,10 +237,10 @@ var getGrid = function getGrid(grid, dataZoom) {
|
|
|
243
237
|
}, grid);
|
|
244
238
|
};
|
|
245
239
|
|
|
246
|
-
/**
|
|
247
|
-
* 获取 xAxis 单项
|
|
248
|
-
* @param options 参数可以是: "[xx, xx]"、"{data: [xx, xx], ...}"
|
|
249
|
-
* @returns {{axisLabel: {textStyle: {color: string}}, data: *, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, type: string, boundaryGap: boolean}}
|
|
240
|
+
/**
|
|
241
|
+
* 获取 xAxis 单项
|
|
242
|
+
* @param options 参数可以是: "[xx, xx]"、"{data: [xx, xx], ...}"
|
|
243
|
+
* @returns {{axisLabel: {textStyle: {color: string}}, data: *, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, type: string, boundaryGap: boolean}}
|
|
250
244
|
*/
|
|
251
245
|
var getXAxisItem = function getXAxisItem(options) {
|
|
252
246
|
var _ref = Array.isArray(options) ? {
|
|
@@ -279,10 +273,10 @@ var getXAxisItem = function getXAxisItem(options) {
|
|
|
279
273
|
}, other);
|
|
280
274
|
};
|
|
281
275
|
|
|
282
|
-
/**
|
|
283
|
-
* 获取 xAxis 配置
|
|
284
|
-
* @param xAxis 参数说明:"[xx, xx]"、"[[xx, xx], [xx, xx]]"、"[{data: [xx, xx], ...}]"
|
|
285
|
-
* @returns {(*&{axisLabel: {textStyle: {color: string}}, data, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, type: string, boundaryGap: boolean})|*[]}
|
|
276
|
+
/**
|
|
277
|
+
* 获取 xAxis 配置
|
|
278
|
+
* @param xAxis 参数说明:"[xx, xx]"、"[[xx, xx], [xx, xx]]"、"[{data: [xx, xx], ...}]"
|
|
279
|
+
* @returns {(*&{axisLabel: {textStyle: {color: string}}, data, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, type: string, boundaryGap: boolean})|*[]}
|
|
286
280
|
*/
|
|
287
281
|
var getXAxis = function getXAxis(xAxis) {
|
|
288
282
|
if (xAxis) {
|
|
@@ -300,10 +294,10 @@ var getXAxis = function getXAxis(xAxis) {
|
|
|
300
294
|
};
|
|
301
295
|
};
|
|
302
296
|
|
|
303
|
-
/**
|
|
304
|
-
* 获取单个 yAxis 配置
|
|
305
|
-
* @param options 参数可以是:"xx"、"{name: 'xx', ...其他配置}"
|
|
306
|
-
* @returns {{axisLabel: {textStyle: {color: string}, showMaxLabel: boolean}, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, splitLine: {show: boolean}, nameTextStyle: {color: string}}}
|
|
297
|
+
/**
|
|
298
|
+
* 获取单个 yAxis 配置
|
|
299
|
+
* @param options 参数可以是:"xx"、"{name: 'xx', ...其他配置}"
|
|
300
|
+
* @returns {{axisLabel: {textStyle: {color: string}, showMaxLabel: boolean}, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, splitLine: {show: boolean}, nameTextStyle: {color: string}}}
|
|
307
301
|
*/
|
|
308
302
|
var getYAxisItem = function getYAxisItem(options) {
|
|
309
303
|
options = options || {};
|
|
@@ -346,10 +340,10 @@ var getYAxisItem = function getYAxisItem(options) {
|
|
|
346
340
|
}, other);
|
|
347
341
|
};
|
|
348
342
|
|
|
349
|
-
/**
|
|
350
|
-
* 获取 yAxis 配置
|
|
351
|
-
* @param yAxis 参数可以是: "xx"、"['xx', 'xxx']"、"[{name: 'xx', ...其他配置}]"
|
|
352
|
-
* @returns {{axisLabel: {textStyle: {color: string}, showMaxLabel: boolean}, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, splitLine: {show: boolean}, nameTextStyle: {color: string}}|*[]}
|
|
343
|
+
/**
|
|
344
|
+
* 获取 yAxis 配置
|
|
345
|
+
* @param yAxis 参数可以是: "xx"、"['xx', 'xxx']"、"[{name: 'xx', ...其他配置}]"
|
|
346
|
+
* @returns {{axisLabel: {textStyle: {color: string}, showMaxLabel: boolean}, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, splitLine: {show: boolean}, nameTextStyle: {color: string}}|*[]}
|
|
353
347
|
*/
|
|
354
348
|
var getYAxis = function getYAxis(yAxis) {
|
|
355
349
|
if (yAxis) {
|
|
@@ -374,12 +368,12 @@ var getYAxis = function getYAxis(yAxis) {
|
|
|
374
368
|
};
|
|
375
369
|
};
|
|
376
370
|
|
|
377
|
-
/**
|
|
378
|
-
* 获取 折线图 数据项
|
|
379
|
-
* @param name
|
|
380
|
-
* @param data
|
|
381
|
-
* @param other
|
|
382
|
-
* @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
|
|
371
|
+
/**
|
|
372
|
+
* 获取 折线图 数据项
|
|
373
|
+
* @param name
|
|
374
|
+
* @param data
|
|
375
|
+
* @param other
|
|
376
|
+
* @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
|
|
383
377
|
*/
|
|
384
378
|
var getLineSeries = function getLineSeries(_ref3) {
|
|
385
379
|
var name = _ref3.name,
|
|
@@ -396,12 +390,12 @@ var getLineSeries = function getLineSeries(_ref3) {
|
|
|
396
390
|
}, other);
|
|
397
391
|
};
|
|
398
392
|
|
|
399
|
-
/**
|
|
400
|
-
* 获取 柱状图 数据项
|
|
401
|
-
* @param name
|
|
402
|
-
* @param data
|
|
403
|
-
* @param other
|
|
404
|
-
* @returns {*&{barMaxWidth: number, connectNulls: boolean, data, barMinWidth: number, name, type: string}}
|
|
393
|
+
/**
|
|
394
|
+
* 获取 柱状图 数据项
|
|
395
|
+
* @param name
|
|
396
|
+
* @param data
|
|
397
|
+
* @param other
|
|
398
|
+
* @returns {*&{barMaxWidth: number, connectNulls: boolean, data, barMinWidth: number, name, type: string}}
|
|
405
399
|
*/
|
|
406
400
|
var getBarSeries = function getBarSeries(_ref4) {
|
|
407
401
|
var name = _ref4.name,
|
|
@@ -545,12 +539,12 @@ var getWordCloudSeries = function getWordCloudSeries(_ref8) {
|
|
|
545
539
|
}];
|
|
546
540
|
};
|
|
547
541
|
|
|
548
|
-
/**
|
|
549
|
-
* 获取 饼图 数据项
|
|
550
|
-
* @param name
|
|
551
|
-
* @param data
|
|
552
|
-
* @param other
|
|
553
|
-
* @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
|
|
542
|
+
/**
|
|
543
|
+
* 获取 饼图 数据项
|
|
544
|
+
* @param name
|
|
545
|
+
* @param data
|
|
546
|
+
* @param other
|
|
547
|
+
* @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
|
|
554
548
|
*/
|
|
555
549
|
var getPieSeries = function getPieSeries(_ref9) {
|
|
556
550
|
var name = _ref9.name,
|
|
@@ -563,12 +557,12 @@ var getPieSeries = function getPieSeries(_ref9) {
|
|
|
563
557
|
}, other);
|
|
564
558
|
};
|
|
565
559
|
|
|
566
|
-
/**
|
|
567
|
-
* 获取 散点图 数据项
|
|
568
|
-
* @param name
|
|
569
|
-
* @param data
|
|
570
|
-
* @param other
|
|
571
|
-
* @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
|
|
560
|
+
/**
|
|
561
|
+
* 获取 散点图 数据项
|
|
562
|
+
* @param name
|
|
563
|
+
* @param data
|
|
564
|
+
* @param other
|
|
565
|
+
* @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
|
|
572
566
|
*/
|
|
573
567
|
var getScatterSeries = function getScatterSeries(_ref10) {
|
|
574
568
|
var name = _ref10.name,
|
|
@@ -581,12 +575,12 @@ var getScatterSeries = function getScatterSeries(_ref10) {
|
|
|
581
575
|
}, other);
|
|
582
576
|
};
|
|
583
577
|
|
|
584
|
-
/**
|
|
585
|
-
* 获取颜色
|
|
586
|
-
* @param color 参数可为:"#xxx", "['#xxx', '#xxx]"
|
|
587
|
-
* @returns {string|{x: number, y: number, y2: number, x2: number, global: boolean, colorStops: *[], type: string}}
|
|
578
|
+
/**
|
|
579
|
+
* 获取颜色
|
|
580
|
+
* @param color 参数可为:"#xxx", "['#xxx', '#xxx]"
|
|
581
|
+
* @returns {string|{x: number, y: number, y2: number, x2: number, global: boolean, colorStops: *[], type: string}}
|
|
588
582
|
*/
|
|
589
|
-
var getColor = function getColor(color) {
|
|
583
|
+
var getColor = exports.getColor = function getColor(color) {
|
|
590
584
|
if (typeof color === 'string') {
|
|
591
585
|
return color;
|
|
592
586
|
} else if (Array.isArray(color)) {
|
|
@@ -616,12 +610,11 @@ var getColor = function getColor(color) {
|
|
|
616
610
|
}
|
|
617
611
|
};
|
|
618
612
|
|
|
619
|
-
/**
|
|
620
|
-
* 获取区间渐变颜色
|
|
621
|
-
* @param color 参数可为:"#xxx", "['#xxx', '#xxx]"
|
|
622
|
-
* @returns {{color: {x: number, y: number, y2: number, globalCoord: boolean, x2: number, colorStops: [{offset: number, color: string},{offset: number, color: string}], type: string}}}
|
|
613
|
+
/**
|
|
614
|
+
* 获取区间渐变颜色
|
|
615
|
+
* @param color 参数可为:"#xxx", "['#xxx', '#xxx]"
|
|
616
|
+
* @returns {{color: {x: number, y: number, y2: number, globalCoord: boolean, x2: number, colorStops: [{offset: number, color: string},{offset: number, color: string}], type: string}}}
|
|
623
617
|
*/
|
|
624
|
-
exports.getColor = getColor;
|
|
625
618
|
var getAreaColor = function getAreaColor(color) {
|
|
626
619
|
var _ref11 = typeof color === 'string' ? [color, color] : color,
|
|
627
620
|
_ref12 = _slicedToArray(_ref11, 2),
|
|
@@ -641,16 +634,15 @@ var getAreaColor = function getAreaColor(color) {
|
|
|
641
634
|
offset: 1,
|
|
642
635
|
color: end
|
|
643
636
|
} /* 100% 处的颜色*/],
|
|
644
|
-
|
|
645
637
|
globalCoord: false // 缺省为 false
|
|
646
638
|
}
|
|
647
639
|
};
|
|
648
640
|
};
|
|
649
641
|
|
|
650
|
-
/**
|
|
651
|
-
* 获取数据
|
|
652
|
-
* @param series 参数:"{name, data, type, color, areaColor}"
|
|
653
|
-
* @returns {*[]}
|
|
642
|
+
/**
|
|
643
|
+
* 获取数据
|
|
644
|
+
* @param series 参数:"{name, data, type, color, areaColor}"
|
|
645
|
+
* @returns {*[]}
|
|
654
646
|
*/
|
|
655
647
|
var getSeries = function getSeries(series) {
|
|
656
648
|
var _series = [];
|
|
@@ -671,7 +663,6 @@ var getSeries = function getSeries(series) {
|
|
|
671
663
|
// 自定义样式的柱状图
|
|
672
664
|
wordCloud: getWordCloudSeries // 词云图
|
|
673
665
|
};
|
|
674
|
-
|
|
675
666
|
series.map(function (v) {
|
|
676
667
|
var type = v.type,
|
|
677
668
|
color = v.color,
|
|
@@ -735,8 +726,8 @@ var getDataZoom = function getDataZoom(options) {
|
|
|
735
726
|
}
|
|
736
727
|
return _dataZoom;
|
|
737
728
|
};
|
|
738
|
-
var Chart = /*#__PURE__*/(0, _react.memo)(
|
|
739
|
-
var _option$series
|
|
729
|
+
var Chart = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
730
|
+
var _option$series;
|
|
740
731
|
var _mergeConfigAndData = mergeConfigAndData(props || {}),
|
|
741
732
|
data = _mergeConfigAndData.data,
|
|
742
733
|
onEvents = _mergeConfigAndData.onEvents,
|
|
@@ -785,7 +776,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
|
|
|
785
776
|
var onClick = function onClick(e) {
|
|
786
777
|
if (onEvents !== null && onEvents !== void 0 && onEvents.onClick) {
|
|
787
778
|
var _chartRef$current, _chartRef$current$get;
|
|
788
|
-
var chart = (_chartRef$current = chartRef.current) === null || _chartRef$current === void 0
|
|
779
|
+
var chart = (_chartRef$current = chartRef.current) === null || _chartRef$current === void 0 || (_chartRef$current$get = _chartRef$current.getEchartsInstance) === null || _chartRef$current$get === void 0 ? void 0 : _chartRef$current$get.call(_chartRef$current);
|
|
789
780
|
if (chart) {
|
|
790
781
|
var rect = chart.getDom().getBoundingClientRect();
|
|
791
782
|
var x = e.clientX - rect.left;
|
|
@@ -795,7 +786,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
|
|
|
795
786
|
var xIndex = chart.convertFromPixel({
|
|
796
787
|
seriesIndex: 0
|
|
797
788
|
}, [x, y])[0];
|
|
798
|
-
onEvents === null || onEvents === void 0
|
|
789
|
+
onEvents === null || onEvents === void 0 || onEvents.onClick(xIndex);
|
|
799
790
|
}
|
|
800
791
|
}
|
|
801
792
|
}
|
|
@@ -806,7 +797,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
|
|
|
806
797
|
height: height,
|
|
807
798
|
width: '100%'
|
|
808
799
|
}, style)
|
|
809
|
-
}, (_option$series = option.series) !== null && _option$series !== void 0 && (_option$series
|
|
800
|
+
}, (_option$series = option.series) !== null && _option$series !== void 0 && (_option$series = _option$series[0]) !== null && _option$series !== void 0 && (_option$series = _option$series.data) !== null && _option$series !== void 0 && _option$series.length ? /*#__PURE__*/_react["default"].createElement(_echartsForReact["default"], {
|
|
810
801
|
ref: chartRef,
|
|
811
802
|
option: option,
|
|
812
803
|
notMerge: true,
|
|
@@ -823,6 +814,5 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
|
|
|
823
814
|
// 如果相同,则不会重新渲染
|
|
824
815
|
return JSON.stringify(prevProps) === JSON.stringify(nextProps);
|
|
825
816
|
});
|
|
826
|
-
var _default = Chart;
|
|
827
|
-
exports["default"] = _default;
|
|
817
|
+
var _default = exports["default"] = Chart;
|
|
828
818
|
//# sourceMappingURL=index.js.map
|