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