@vtx/ol-map 1.0.158 → 1.0.159
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 +45 -52
- 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 +9 -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 +3 -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 +10 -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/dom-layer/index.js +10 -11
- package/lib/dom-layer/index.js.map +1 -1
- package/lib/dom-layer/style/css.js.map +1 -1
- package/lib/dom-layer/style/index.js.map +1 -1
- package/lib/dom-layer/style/index.less +3 -3
- 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 -65
- 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 +39 -47
- package/lib/feature-layer/createFeatureCollection.js.map +1 -1
- package/lib/feature-layer/index.js +15 -16
- 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 +15 -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 +8 -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 +8 -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 +8 -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 +11 -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 +10 -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 +20 -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 +100 -100
- 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 +22 -24
- package/lib/map/Popup.js.map +1 -1
- package/lib/map/ScaleDenominator.js +9 -11
- package/lib/map/ScaleDenominator.js.map +1 -1
- package/lib/map/Test.js +12 -14
- package/lib/map/Test.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js +3 -4
- 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 +67 -71
- 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 -26
- package/lib/marker/Marker.js.map +1 -1
- package/lib/marker/index.js +3 -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 +15 -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 +21 -24
- 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 +7 -8
- package/lib/poi-search/Location.js.map +1 -1
- package/lib/poi-search/PoiList.js +9 -10
- package/lib/poi-search/PoiList.js.map +1 -1
- package/lib/poi-search/Search.js +20 -21
- package/lib/poi-search/Search.js.map +1 -1
- package/lib/poi-search/index.js +9 -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 +3 -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 +3 -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 +3 -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 +14 -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 +12 -15
- 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 +31 -33
- 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 +21 -24
- package/lib/tile-layer/TileLayer.js.map +1 -1
- package/lib/tile-layer/index.js +7 -6
- 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 +14 -15
- package/lib/tools/Layer/index.js.map +1 -1
- package/lib/tools/Layer/index.less +43 -43
- package/lib/tools/Search/index.js +18 -21
- 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 +9 -11
- package/lib/tools/Toolbox/EagleEye/index.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js +44 -50
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/index.js +34 -36
- 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 +33 -36
- 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 +12 -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 +9 -11
- package/lib/tools/Toolbox/ScaleLine/index.js.map +1 -1
- package/lib/tools/Toolbox/SelectTools/index.js +59 -62
- 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 +24 -25
- 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 +9 -11
- package/lib/tools/Toolbox/ZoomInput/index.js.map +1 -1
- package/lib/tools/Toolbox/ZoomInput/index.less +5 -5
- package/lib/tools/Toolbox/draftingPrint/index.css +26 -0
- package/lib/tools/Toolbox/draftingPrint/index.js +364 -0
- package/lib/tools/Toolbox/draftingPrint/index.js.map +1 -0
- package/lib/tools/Toolbox/draftingPrint/index.less +34 -0
- package/lib/tools/Toolbox/index.js +18 -11
- 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 +14 -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 +18 -20
- package/lib/tools/analysis-tool/index.js.map +1 -1
- package/lib/tools/base-map-switch/index.js +14 -16
- package/lib/tools/base-map-switch/index.js.map +1 -1
- package/lib/tools/components/Chart/index.js +129 -140
- 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 +9 -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 +17 -19
- 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 +10 -12
- package/lib/tools/full-screen/index.js.map +1 -1
- package/lib/tools/index.js +11 -12
- package/lib/tools/index.js.map +1 -1
- package/lib/tools/layer-control/index.js +22 -26
- package/lib/tools/layer-control/index.js.map +1 -1
- package/lib/tools/refresh/index.js +10 -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 +9 -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 +10 -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 +120 -120
|
@@ -16,38 +16,37 @@ 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
|
|
23
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
19
|
+
_excluded0 = ["data", "onEvents", "color", "legend", "unit", "tooltip", "grid", "xAxis", "yAxis", "height", "series", "loading", "title", "dataZoom", "noDataText", "style", "imgStyle", "noDataStyle"];
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
21
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
24
23
|
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(
|
|
24
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
25
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
26
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
27
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
28
|
+
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); }
|
|
29
|
+
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; }
|
|
30
|
+
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; }
|
|
31
|
+
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; }
|
|
32
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
33
|
+
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); }
|
|
34
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
36
35
|
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(
|
|
36
|
+
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; } }
|
|
37
|
+
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; }
|
|
38
|
+
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; } }
|
|
39
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
41
40
|
var color = '#86909C';
|
|
42
41
|
var fontSize = '12px';
|
|
43
42
|
|
|
44
|
-
/**
|
|
45
|
-
* 小数处理,默认2位
|
|
46
|
-
* @param value
|
|
47
|
-
* @param len
|
|
48
|
-
* @returns {number|*}
|
|
43
|
+
/**
|
|
44
|
+
* 小数处理,默认2位
|
|
45
|
+
* @param value
|
|
46
|
+
* @param len
|
|
47
|
+
* @returns {number|*}
|
|
49
48
|
*/
|
|
50
|
-
var convertDecimal = function convertDecimal(value) {
|
|
49
|
+
var convertDecimal = exports.convertDecimal = function convertDecimal(value) {
|
|
51
50
|
var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
52
51
|
if (value && String(value).indexOf('.') !== -1) {
|
|
53
52
|
var _String$split = String(value).split('.'),
|
|
@@ -62,13 +61,12 @@ var convertDecimal = function convertDecimal(value) {
|
|
|
62
61
|
return value;
|
|
63
62
|
};
|
|
64
63
|
|
|
65
|
-
/**
|
|
66
|
-
* 转换饼图数据,处理占比截取为默认2位小数
|
|
67
|
-
* @param data
|
|
68
|
-
* @returns {*[]}
|
|
64
|
+
/**
|
|
65
|
+
* 转换饼图数据,处理占比截取为默认2位小数
|
|
66
|
+
* @param data
|
|
67
|
+
* @returns {*[]}
|
|
69
68
|
*/
|
|
70
|
-
exports.
|
|
71
|
-
var convertPieData = function convertPieData(data) {
|
|
69
|
+
var convertPieData = exports.convertPieData = function convertPieData(data) {
|
|
72
70
|
var _data2;
|
|
73
71
|
var _data = [];
|
|
74
72
|
if ((_data2 = data) !== null && _data2 !== void 0 && _data2.length) {
|
|
@@ -93,14 +91,13 @@ var convertPieData = function convertPieData(data) {
|
|
|
93
91
|
return _data;
|
|
94
92
|
};
|
|
95
93
|
|
|
96
|
-
/**
|
|
97
|
-
* 合并 xAxis 配置及数据
|
|
98
|
-
* @param xAxis
|
|
99
|
-
* @param data
|
|
100
|
-
* @returns {*&{data: *[]}}
|
|
94
|
+
/**
|
|
95
|
+
* 合并 xAxis 配置及数据
|
|
96
|
+
* @param xAxis
|
|
97
|
+
* @param data
|
|
98
|
+
* @returns {*&{data: *[]}}
|
|
101
99
|
*/
|
|
102
|
-
exports.
|
|
103
|
-
var mergeXAxisAndData = function mergeXAxisAndData(xAxis, data) {
|
|
100
|
+
var mergeXAxisAndData = exports.mergeXAxisAndData = function mergeXAxisAndData(xAxis, data) {
|
|
104
101
|
var times = [];
|
|
105
102
|
if (data !== null && data !== void 0 && data.length) {
|
|
106
103
|
var field = xAxis.field,
|
|
@@ -116,22 +113,20 @@ var mergeXAxisAndData = function mergeXAxisAndData(xAxis, data) {
|
|
|
116
113
|
data: times
|
|
117
114
|
}, xAxis);
|
|
118
115
|
};
|
|
119
|
-
exports.
|
|
120
|
-
var numberTo = function numberTo(data, number, limit) {
|
|
116
|
+
var numberTo = exports.numberTo = function numberTo(data, number, limit) {
|
|
121
117
|
if (number) {
|
|
122
118
|
return (Number(data) / number).toFixed(limit || 2);
|
|
123
119
|
}
|
|
124
120
|
return data;
|
|
125
121
|
};
|
|
126
122
|
|
|
127
|
-
/**
|
|
128
|
-
* 合并 series 和数据
|
|
129
|
-
* @param series
|
|
130
|
-
* @param data
|
|
131
|
-
* @returns {*[]}
|
|
123
|
+
/**
|
|
124
|
+
* 合并 series 和数据
|
|
125
|
+
* @param series
|
|
126
|
+
* @param data
|
|
127
|
+
* @returns {*[]}
|
|
132
128
|
*/
|
|
133
|
-
exports.
|
|
134
|
-
var mergeSeriesAndData = function mergeSeriesAndData(series, data) {
|
|
129
|
+
var mergeSeriesAndData = exports.mergeSeriesAndData = function mergeSeriesAndData(series, data) {
|
|
135
130
|
var _series = [];
|
|
136
131
|
series.map(function (s) {
|
|
137
132
|
var seriesItem = _objectSpread({}, s);
|
|
@@ -146,13 +141,12 @@ var mergeSeriesAndData = function mergeSeriesAndData(series, data) {
|
|
|
146
141
|
return _series;
|
|
147
142
|
};
|
|
148
143
|
|
|
149
|
-
/**
|
|
150
|
-
* 合并配置和数据
|
|
151
|
-
* @param options
|
|
152
|
-
* @returns {{}}
|
|
144
|
+
/**
|
|
145
|
+
* 合并配置和数据
|
|
146
|
+
* @param options
|
|
147
|
+
* @returns {{}}
|
|
153
148
|
*/
|
|
154
|
-
exports.
|
|
155
|
-
var mergeConfigAndData = function mergeConfigAndData(options) {
|
|
149
|
+
var mergeConfigAndData = exports.mergeConfigAndData = function mergeConfigAndData(options) {
|
|
156
150
|
var xAxis = options.xAxis,
|
|
157
151
|
yAxis = options.yAxis,
|
|
158
152
|
series = options.series,
|
|
@@ -172,7 +166,6 @@ var mergeConfigAndData = function mergeConfigAndData(options) {
|
|
|
172
166
|
}
|
|
173
167
|
return _objectSpread(_objectSpread({}, options), val);
|
|
174
168
|
};
|
|
175
|
-
exports.mergeConfigAndData = mergeConfigAndData;
|
|
176
169
|
var getUnit = function getUnit(units, name) {
|
|
177
170
|
if (units && _typeof(units) === 'object') {
|
|
178
171
|
if (Array.isArray(units)) {
|
|
@@ -186,10 +179,10 @@ var getUnit = function getUnit(units, name) {
|
|
|
186
179
|
}
|
|
187
180
|
return units || '';
|
|
188
181
|
};
|
|
189
|
-
/**
|
|
190
|
-
* 获取 tooltip
|
|
191
|
-
* @param options
|
|
192
|
-
* @returns {*&{trigger: string}}
|
|
182
|
+
/**
|
|
183
|
+
* 获取 tooltip
|
|
184
|
+
* @param options
|
|
185
|
+
* @returns {*&{trigger: string}}
|
|
193
186
|
*/
|
|
194
187
|
var getTooltip = function getTooltip(options, unit, series) {
|
|
195
188
|
var _series$;
|
|
@@ -214,10 +207,10 @@ var getTooltip = function getTooltip(options, unit, series) {
|
|
|
214
207
|
}, options);
|
|
215
208
|
};
|
|
216
209
|
|
|
217
|
-
/**
|
|
218
|
-
* 获取 图例
|
|
219
|
-
* @param options
|
|
220
|
-
* @returns {*&{pageTextStyle: {color: string}, textStyle: {color: string}, type: string, pageIconInactiveColor: string, pageIconColor: string}}
|
|
210
|
+
/**
|
|
211
|
+
* 获取 图例
|
|
212
|
+
* @param options
|
|
213
|
+
* @returns {*&{pageTextStyle: {color: string}, textStyle: {color: string}, type: string, pageIconInactiveColor: string, pageIconColor: string}}
|
|
221
214
|
*/
|
|
222
215
|
var getLegend = function getLegend(options) {
|
|
223
216
|
return _objectSpread({
|
|
@@ -227,11 +220,11 @@ var getLegend = function getLegend(options) {
|
|
|
227
220
|
}, options);
|
|
228
221
|
};
|
|
229
222
|
|
|
230
|
-
/**
|
|
231
|
-
* 获取布局
|
|
232
|
-
* @param grid
|
|
233
|
-
* @param dataZoom
|
|
234
|
-
* @returns {*&{top: string, left: number, bottom: string, right: number, containLabel: boolean}}
|
|
223
|
+
/**
|
|
224
|
+
* 获取布局
|
|
225
|
+
* @param grid
|
|
226
|
+
* @param dataZoom
|
|
227
|
+
* @returns {*&{top: string, left: number, bottom: string, right: number, containLabel: boolean}}
|
|
235
228
|
*/
|
|
236
229
|
var getGrid = function getGrid(grid, dataZoom) {
|
|
237
230
|
return _objectSpread({
|
|
@@ -243,10 +236,10 @@ var getGrid = function getGrid(grid, dataZoom) {
|
|
|
243
236
|
}, grid);
|
|
244
237
|
};
|
|
245
238
|
|
|
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}}
|
|
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}}
|
|
250
243
|
*/
|
|
251
244
|
var getXAxisItem = function getXAxisItem(options) {
|
|
252
245
|
var _ref = Array.isArray(options) ? {
|
|
@@ -279,10 +272,10 @@ var getXAxisItem = function getXAxisItem(options) {
|
|
|
279
272
|
}, other);
|
|
280
273
|
};
|
|
281
274
|
|
|
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})|*[]}
|
|
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})|*[]}
|
|
286
279
|
*/
|
|
287
280
|
var getXAxis = function getXAxis(xAxis) {
|
|
288
281
|
if (xAxis) {
|
|
@@ -300,10 +293,10 @@ var getXAxis = function getXAxis(xAxis) {
|
|
|
300
293
|
};
|
|
301
294
|
};
|
|
302
295
|
|
|
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}}}
|
|
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}}}
|
|
307
300
|
*/
|
|
308
301
|
var getYAxisItem = function getYAxisItem(options) {
|
|
309
302
|
options = options || {};
|
|
@@ -346,10 +339,10 @@ var getYAxisItem = function getYAxisItem(options) {
|
|
|
346
339
|
}, other);
|
|
347
340
|
};
|
|
348
341
|
|
|
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}}|*[]}
|
|
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}}|*[]}
|
|
353
346
|
*/
|
|
354
347
|
var getYAxis = function getYAxis(yAxis) {
|
|
355
348
|
if (yAxis) {
|
|
@@ -374,12 +367,12 @@ var getYAxis = function getYAxis(yAxis) {
|
|
|
374
367
|
};
|
|
375
368
|
};
|
|
376
369
|
|
|
377
|
-
/**
|
|
378
|
-
* 获取 折线图 数据项
|
|
379
|
-
* @param name
|
|
380
|
-
* @param data
|
|
381
|
-
* @param other
|
|
382
|
-
* @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
|
|
370
|
+
/**
|
|
371
|
+
* 获取 折线图 数据项
|
|
372
|
+
* @param name
|
|
373
|
+
* @param data
|
|
374
|
+
* @param other
|
|
375
|
+
* @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
|
|
383
376
|
*/
|
|
384
377
|
var getLineSeries = function getLineSeries(_ref3) {
|
|
385
378
|
var name = _ref3.name,
|
|
@@ -396,12 +389,12 @@ var getLineSeries = function getLineSeries(_ref3) {
|
|
|
396
389
|
}, other);
|
|
397
390
|
};
|
|
398
391
|
|
|
399
|
-
/**
|
|
400
|
-
* 获取 柱状图 数据项
|
|
401
|
-
* @param name
|
|
402
|
-
* @param data
|
|
403
|
-
* @param other
|
|
404
|
-
* @returns {*&{barMaxWidth: number, connectNulls: boolean, data, barMinWidth: number, name, type: string}}
|
|
392
|
+
/**
|
|
393
|
+
* 获取 柱状图 数据项
|
|
394
|
+
* @param name
|
|
395
|
+
* @param data
|
|
396
|
+
* @param other
|
|
397
|
+
* @returns {*&{barMaxWidth: number, connectNulls: boolean, data, barMinWidth: number, name, type: string}}
|
|
405
398
|
*/
|
|
406
399
|
var getBarSeries = function getBarSeries(_ref4) {
|
|
407
400
|
var name = _ref4.name,
|
|
@@ -545,12 +538,12 @@ var getWordCloudSeries = function getWordCloudSeries(_ref8) {
|
|
|
545
538
|
}];
|
|
546
539
|
};
|
|
547
540
|
|
|
548
|
-
/**
|
|
549
|
-
* 获取 饼图 数据项
|
|
550
|
-
* @param name
|
|
551
|
-
* @param data
|
|
552
|
-
* @param other
|
|
553
|
-
* @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
|
|
541
|
+
/**
|
|
542
|
+
* 获取 饼图 数据项
|
|
543
|
+
* @param name
|
|
544
|
+
* @param data
|
|
545
|
+
* @param other
|
|
546
|
+
* @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
|
|
554
547
|
*/
|
|
555
548
|
var getPieSeries = function getPieSeries(_ref9) {
|
|
556
549
|
var name = _ref9.name,
|
|
@@ -563,17 +556,17 @@ var getPieSeries = function getPieSeries(_ref9) {
|
|
|
563
556
|
}, other);
|
|
564
557
|
};
|
|
565
558
|
|
|
566
|
-
/**
|
|
567
|
-
* 获取 散点图 数据项
|
|
568
|
-
* @param name
|
|
569
|
-
* @param data
|
|
570
|
-
* @param other
|
|
571
|
-
* @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
|
|
559
|
+
/**
|
|
560
|
+
* 获取 散点图 数据项
|
|
561
|
+
* @param name
|
|
562
|
+
* @param data
|
|
563
|
+
* @param other
|
|
564
|
+
* @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
|
|
572
565
|
*/
|
|
573
|
-
var getScatterSeries = function getScatterSeries(
|
|
574
|
-
var name =
|
|
575
|
-
data =
|
|
576
|
-
other = _objectWithoutProperties(
|
|
566
|
+
var getScatterSeries = function getScatterSeries(_ref0) {
|
|
567
|
+
var name = _ref0.name,
|
|
568
|
+
data = _ref0.data,
|
|
569
|
+
other = _objectWithoutProperties(_ref0, _excluded9);
|
|
577
570
|
return _objectSpread({
|
|
578
571
|
type: 'scatter',
|
|
579
572
|
name: name,
|
|
@@ -581,12 +574,12 @@ var getScatterSeries = function getScatterSeries(_ref10) {
|
|
|
581
574
|
}, other);
|
|
582
575
|
};
|
|
583
576
|
|
|
584
|
-
/**
|
|
585
|
-
* 获取颜色
|
|
586
|
-
* @param color 参数可为:"#xxx", "['#xxx', '#xxx]"
|
|
587
|
-
* @returns {string|{x: number, y: number, y2: number, x2: number, global: boolean, colorStops: *[], type: string}}
|
|
577
|
+
/**
|
|
578
|
+
* 获取颜色
|
|
579
|
+
* @param color 参数可为:"#xxx", "['#xxx', '#xxx]"
|
|
580
|
+
* @returns {string|{x: number, y: number, y2: number, x2: number, global: boolean, colorStops: *[], type: string}}
|
|
588
581
|
*/
|
|
589
|
-
var getColor = function getColor(color) {
|
|
582
|
+
var getColor = exports.getColor = function getColor(color) {
|
|
590
583
|
if (typeof color === 'string') {
|
|
591
584
|
return color;
|
|
592
585
|
} else if (Array.isArray(color)) {
|
|
@@ -616,17 +609,16 @@ var getColor = function getColor(color) {
|
|
|
616
609
|
}
|
|
617
610
|
};
|
|
618
611
|
|
|
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}}}
|
|
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}}}
|
|
623
616
|
*/
|
|
624
|
-
exports.getColor = getColor;
|
|
625
617
|
var getAreaColor = function getAreaColor(color) {
|
|
626
|
-
var
|
|
627
|
-
|
|
628
|
-
start =
|
|
629
|
-
end =
|
|
618
|
+
var _ref1 = typeof color === 'string' ? [color, color] : color,
|
|
619
|
+
_ref10 = _slicedToArray(_ref1, 2),
|
|
620
|
+
start = _ref10[0],
|
|
621
|
+
end = _ref10[1];
|
|
630
622
|
return {
|
|
631
623
|
color: {
|
|
632
624
|
type: 'linear',
|
|
@@ -641,16 +633,15 @@ var getAreaColor = function getAreaColor(color) {
|
|
|
641
633
|
offset: 1,
|
|
642
634
|
color: end
|
|
643
635
|
} /* 100% 处的颜色*/],
|
|
644
|
-
|
|
645
636
|
globalCoord: false // 缺省为 false
|
|
646
637
|
}
|
|
647
638
|
};
|
|
648
639
|
};
|
|
649
640
|
|
|
650
|
-
/**
|
|
651
|
-
* 获取数据
|
|
652
|
-
* @param series 参数:"{name, data, type, color, areaColor}"
|
|
653
|
-
* @returns {*[]}
|
|
641
|
+
/**
|
|
642
|
+
* 获取数据
|
|
643
|
+
* @param series 参数:"{name, data, type, color, areaColor}"
|
|
644
|
+
* @returns {*[]}
|
|
654
645
|
*/
|
|
655
646
|
var getSeries = function getSeries(series) {
|
|
656
647
|
var _series = [];
|
|
@@ -671,7 +662,6 @@ var getSeries = function getSeries(series) {
|
|
|
671
662
|
// 自定义样式的柱状图
|
|
672
663
|
wordCloud: getWordCloudSeries // 词云图
|
|
673
664
|
};
|
|
674
|
-
|
|
675
665
|
series.map(function (v) {
|
|
676
666
|
var type = v.type,
|
|
677
667
|
color = v.color,
|
|
@@ -735,8 +725,8 @@ var getDataZoom = function getDataZoom(options) {
|
|
|
735
725
|
}
|
|
736
726
|
return _dataZoom;
|
|
737
727
|
};
|
|
738
|
-
var Chart = /*#__PURE__*/(0, _react.memo)(
|
|
739
|
-
var _option$series
|
|
728
|
+
var Chart = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
729
|
+
var _option$series;
|
|
740
730
|
var _mergeConfigAndData = mergeConfigAndData(props || {}),
|
|
741
731
|
data = _mergeConfigAndData.data,
|
|
742
732
|
onEvents = _mergeConfigAndData.onEvents,
|
|
@@ -762,7 +752,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
|
|
|
762
752
|
imgStyle = _mergeConfigAndData$i === void 0 ? {} : _mergeConfigAndData$i,
|
|
763
753
|
_mergeConfigAndData$n = _mergeConfigAndData.noDataStyle,
|
|
764
754
|
noDataStyle = _mergeConfigAndData$n === void 0 ? {} : _mergeConfigAndData$n,
|
|
765
|
-
other = _objectWithoutProperties(_mergeConfigAndData,
|
|
755
|
+
other = _objectWithoutProperties(_mergeConfigAndData, _excluded0);
|
|
766
756
|
var option = _objectSpread({
|
|
767
757
|
title: title,
|
|
768
758
|
legend: getLegend(legend),
|
|
@@ -785,7 +775,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
|
|
|
785
775
|
var onClick = function onClick(e) {
|
|
786
776
|
if (onEvents !== null && onEvents !== void 0 && onEvents.onClick) {
|
|
787
777
|
var _chartRef$current, _chartRef$current$get;
|
|
788
|
-
var chart = (_chartRef$current = chartRef.current) === null || _chartRef$current === void 0
|
|
778
|
+
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
779
|
if (chart) {
|
|
790
780
|
var rect = chart.getDom().getBoundingClientRect();
|
|
791
781
|
var x = e.clientX - rect.left;
|
|
@@ -795,7 +785,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
|
|
|
795
785
|
var xIndex = chart.convertFromPixel({
|
|
796
786
|
seriesIndex: 0
|
|
797
787
|
}, [x, y])[0];
|
|
798
|
-
onEvents === null || onEvents === void 0
|
|
788
|
+
onEvents === null || onEvents === void 0 || onEvents.onClick(xIndex);
|
|
799
789
|
}
|
|
800
790
|
}
|
|
801
791
|
}
|
|
@@ -806,7 +796,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
|
|
|
806
796
|
height: height,
|
|
807
797
|
width: '100%'
|
|
808
798
|
}, style)
|
|
809
|
-
}, (_option$series = option.series) !== null && _option$series !== void 0 && (_option$series
|
|
799
|
+
}, (_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
800
|
ref: chartRef,
|
|
811
801
|
option: option,
|
|
812
802
|
notMerge: true,
|
|
@@ -823,6 +813,5 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
|
|
|
823
813
|
// 如果相同,则不会重新渲染
|
|
824
814
|
return JSON.stringify(prevProps) === JSON.stringify(nextProps);
|
|
825
815
|
});
|
|
826
|
-
var _default = Chart;
|
|
827
|
-
exports["default"] = _default;
|
|
816
|
+
var _default = exports["default"] = Chart;
|
|
828
817
|
//# sourceMappingURL=index.js.map
|