@pyreon/charts 0.9.0 → 0.11.0

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.
Files changed (42) hide show
  1. package/lib/analysis/index.js.html +1 -1
  2. package/lib/analysis/manual.js.html +1 -1
  3. package/lib/{charts-Ckh2qxB5.js → charts-lo2KeDld.js} +164 -164
  4. package/lib/charts-lo2KeDld.js.map +1 -0
  5. package/lib/{components-BcPePBeS.js → components-ClWy1Ztp.js} +128 -128
  6. package/lib/components-ClWy1Ztp.js.map +1 -0
  7. package/lib/{core-9w0g6EOI.js → core-BiuQ3y-t.js} +11 -11
  8. package/lib/core-BiuQ3y-t.js.map +1 -0
  9. package/lib/{createSeriesData-DOHScdgk.js → createSeriesData-BGy-6PqI.js} +6 -6
  10. package/lib/createSeriesData-BGy-6PqI.js.map +1 -0
  11. package/lib/{customGraphicKeyframeAnimation-CvkEkSt_.js → customGraphicKeyframeAnimation-BIbJI8ew.js} +61 -61
  12. package/lib/customGraphicKeyframeAnimation-BIbJI8ew.js.map +1 -0
  13. package/lib/{graphic-CPJ2K90a.js → graphic-Bt7SEwll.js} +59 -59
  14. package/lib/graphic-Bt7SEwll.js.map +1 -0
  15. package/lib/index.js +60 -52
  16. package/lib/index.js.map +1 -1
  17. package/lib/manual.js +60 -52
  18. package/lib/manual.js.map +1 -1
  19. package/lib/{parseGeoJson-BlBe5Vig.js → parseGeoJson-NjUY1feF.js} +115 -115
  20. package/lib/parseGeoJson-NjUY1feF.js.map +1 -0
  21. package/lib/{renderers-Dytryvoy.js → renderers-BnAAXHfG.js} +16 -16
  22. package/lib/renderers-BnAAXHfG.js.map +1 -0
  23. package/lib/types/index.d.ts +3 -3
  24. package/lib/types/index.d.ts.map +1 -1
  25. package/lib/types/manual.d.ts +3 -3
  26. package/lib/types/manual.d.ts.map +1 -1
  27. package/package.json +14 -7
  28. package/src/chart-component.tsx +18 -10
  29. package/src/index.ts +3 -3
  30. package/src/loader.ts +70 -73
  31. package/src/manual.ts +4 -4
  32. package/src/tests/charts.test.tsx +431 -126
  33. package/src/types.ts +8 -9
  34. package/src/use-chart.ts +8 -8
  35. package/lib/charts-Ckh2qxB5.js.map +0 -1
  36. package/lib/components-BcPePBeS.js.map +0 -1
  37. package/lib/core-9w0g6EOI.js.map +0 -1
  38. package/lib/createSeriesData-DOHScdgk.js.map +0 -1
  39. package/lib/customGraphicKeyframeAnimation-CvkEkSt_.js.map +0 -1
  40. package/lib/graphic-CPJ2K90a.js.map +0 -1
  41. package/lib/parseGeoJson-BlBe5Vig.js.map +0 -1
  42. package/lib/renderers-Dytryvoy.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"components-BcPePBeS.js","names":["inner","zrUtil.clone","zrUtil.bind","graphic.Group","zrUtil.curry","axisPointerModelHelper.getAxisInfo","graphic","graphic.Text","graphic.createIcon","zrUtil.isArray","graphic.updateProps","zrUtil.isObject","formatUtil.normalizeCssArray","textContain.getBoundingRect","axisHelper.getAxisRawValue","zrUtil.isString","zrUtil.isFunction","matrix.create","graphic.applyTransform","viewHelper.buildElStyle","pointerShapeBuilder","cartesianAxisHelper.layout","viewHelper.getTransformedPosition","viewHelper.makeLineShape","viewHelper.makeRectShape","inner","each","zrUtil.each","zrUtil.curry","makeDispatchAction","modelUtil.queryDataIndex","zrUtil.isArray","zrUtil.map","inner","bind","curry","modelHelper.makeKey","each","install","isArray","install","installSimple","installAxisPointer","viewHelper.buildElStyle","matrix.create","graphic.applyTransform","viewHelper.makeLineShape","viewHelper.makeSectorShape","zrUtil.mixin","inner","textContain.getBoundingRect","getCoordSys","parsePercent","zrUtil.isArray","createScaleByModel","zrUtil.retrieve","zrUtil.map","zrUtil.clone","graphic","graphic.Ring","graphic.Line","graphic.mergePath","zrUtil.defaults","zrUtil.isObject","graphic.Text","graphic.Sector","graphic.Group","graphic","graphic.mergePath","zrUtil.defaults","graphic.Circle","graphic.Sector","zrUtil.filter","parsePercent","install","installAxisPointer","curry","mergeAndNormalizeLayoutParams","zrUtil.isArray","zrUtil.map","graphic.Rect","graphic.Polyline","graphic.Text","parsePercent","numberUtil.parseDate","layout.getLayoutRect","zrUtil.isArray","install","zrUtil.extend","modelUtil.mappingToExists","zrUtil.isObject","zrUtil.filter","graphicUtil.Group","graphicUtil.Image","graphicUtil.Text","inner","modelUtil.makeInner","zrUtil.createHashMap","modelUtil.convertOptionIdName","zrUtil.assert","parsePercent","layoutUtil.positionElement","zrUtil.indexOf","zrUtil.hasOwn","graphicUtil.getShapeClass","zrUtil.retrieve2","zrUtil.keys","zrUtil.isFunction","zrUtil.extend","layoutUtil.LOCATION_PARAMS","install","isArray","each","each","zrUtil.each","asc","numberUtil.asc","zrUtil.clone","numberUtil.linearMap","zrUtil.map","numberUtil.getPixelPrecision","installed","installCommon","install","SelectZoomModel","SelectZoomView","featureManager.getFeature","formatUtil.normalizeCssArray","graphic.Rect","zrUtil.curry","zrUtil.isString","graphic.createIcon","zrUtil.bind","listComponentHelper.makeBackground","zrUtil.isFunction","textContain.getBoundingRect","zrUtil.indexOf","zrUtil.merge","echarts.registerAction","zrUtil.map","zrUtil.filter","zrUtil.isFunction","zrUtil.isString","zrUtil.isDom","zrUtil.isObject","zrUtil.isArray","zrUtil.defaults","echarts.registerAction","zrUtil.extend","each","zrUtil.each","inner","echarts.registerAction","brushHelper.makeRectPanelClipPath","brushHelper.makeRectIsTargetByCursor","brushHelper.makeLinearBrushOtherExtent","modelUtilParseFinder","graphic.getTransform","curry","each","zrUtil.each","zrUtil.bind","zrUtil.clone","history.pop","history.count","parseFinder","install","DataZoom","Restore","installDataZoomSelect","makeStyleCoord","isArray","bind","zrUtil.isObject","zrUtil.bind","Rect","bind","axisPointerViewHelper.getValueLabel","trim","axisHelper.getAxisRawValue","clone","isArray","timeFormat","parsePercent","each","install","installAxisPointer","zrUtil.isArray","each","zrUtil.each","zrUtil.clone","polygonContain.contain","zrUtil.clone","zrUtil.map","zrUtil.defaults","visualSolution.createVisualMappings","zrUtil.each","visualSolution.applyVisual","dispatchAction","throttleUtil.createOrUpdate","zrUtil.isArray","zrUtil.indexOf","zrUtil.bind","zrUtil.clone","visualSolution.replaceVisualOption","zrUtil.isArray","zrUtil.map","zrUtil.merge","install","zrUtil.retrieve2","graphic.Text","graphic.Rect","install","clone","matrix.create","graphic.Group","graphic.Line","bind","graphic.Text","numberUtil.asc","graphic.applyTransform","layout.getLayoutRect","layout.createBoxLayoutReference","graphic.createIcon","zrUtil.isArray","has","zrUtil.isObject","install","preprocessor","isArray","inner","zrUtil.mixin","numberUtil.getPrecision","curry","isArray","clone","inner","numberUtil.parsePercent","curry","markerHelper.dataTransform","markerHelper.dataFilter","markerHelper.createMarkerDimValueGetter","install","inner","isArray","markerHelper.getAxisInfo","markerHelper.numCalculate","clone","markerHelper.dataTransform","isInfinity","markerHelper.dataFilter","numberUtil.parsePercent","createList","curry","markerHelper.createMarkerDimValueGetter","install","inner","markerHelper.dataTransform","markerHelper.zoneFilter","markerHelper.dataFilter","numberUtil.parsePercent","graphic.Group","colorUtil.modifyAlpha","graphic.Polygon","curry","install","zrUtil.isArray","zrUtil.merge","zrUtil.createHashMap","zrUtil.map","zrUtil.isString","zrUtil.isNumber","zrUtil.filter","zrUtil.indexOf","zrUtil.curry","each","zrUtil.each","Group","graphic.Group","layoutUtil.createBoxLayoutReference","layoutUtil.getLayoutRect","zrUtil.defaults","zrUtil.createHashMap","zrUtil.extend","graphic.Text","zrUtil.isFunction","zrUtil.isString","graphic.Rect","curry","install","graphic.Group","zrUtil.isArray","graphic.Text","graphic.createIcon","zrUtil.bind","layoutUtil.box","zrUtil.clone","zrUtil.retrieve2","graphic.Rect","graphic.updateProps","zrUtil.isString","install","installLegendPlain","install","installLegendPlain","installLegendScroll","inner","curry","bind","install","graphic.Rect","bind","graphic.Group","layout.createBoxLayoutReference","layout.getLayoutParams","layout.getLayoutRect","linearMap","graphic.Polygon","graphic.Polyline","getCursor","parsePercent","graphic.Text","asc","graphic.getTransform","graphic.transformDirection","graphic.applyTransform","graphic.Point","install","install","installDataZoomInside","installDataZoomSlider","zrUtil.clone","zrUtil.isArray","zrUtil.isArray","each","zrUtil.each","numberUtil.asc","linearMap","numberUtil.linearMap","visualSolution.replaceVisualOption","zrUtil.bind","visualSolution.createVisualMappings","modelUtil.queryReferringComponents","zrUtil.map","zrUtil.isString","zrUtil.isFunction","zrUtil.clone","zrUtil.isArray","numberUtil.asc","zrUtil.retrieve2","formatUtil.normalizeCssArray","Rect","layout.createBoxLayoutReference","numberUtil.linearMap","each","zrUtil.each","zrUtil.bind","graphic.Text","helper.getItemAlign","graphic.Group","graphic.Rect","zrUtil.extend","graphic.applyTransform","graphic.getTransform","modelUtil.compressBatches","helper.makeHighDownBatch","zrUtil.isArray","graphic.transformDirection","graphic.Polygon","visualSolution.incrementalApplyVisual","zrUtil.bind","zrUtil.each","zrUtil.isArray","zrUtil.isObject","preprocessor","install","zrUtil.clone","zrUtil.map","zrUtil.each","zrUtil.isObject","zrUtil.retrieve","graphic.Group","zrUtil.bind","graphic.Text","zrUtil.retrieve2","helper.makeHighDownBatch","helper.getItemAlign","zrUtil.map","zrUtil.clone","install","PiecewiseView","install","installVisualMapContinuous","installVisualMapPiecewise","zrUtil.clone","zrUtil.createHashMap","zrUtil.isFunction","zrUtil.extend","zrUtil.defaults","zrUtil.filter","zrUtil.indexOf","zrUtil.isString","install"],"sources":["../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axisPointer/viewHelper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axisPointer/globalListener.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axisPointer/AxisPointerView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axisPointer/axisTrigger.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axisPointer/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/grid/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axisPointer/PolarAxisPointer.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/polar/PolarModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/polar/AxisModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/polar/RadiusAxis.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/polar/AngleAxis.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/polar/Polar.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/polar/polarCreator.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axis/AngleAxisView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/axis/RadiusAxisView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/layout/barPolar.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/polar/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/calendar/CalendarModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/calendar/CalendarView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/coord/calendar/Calendar.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/calendar/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/graphic/GraphicModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/graphic/GraphicView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/graphic/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/helper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/DataZoomModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/SelectZoomModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/DataZoomView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/SelectZoomView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/AxisProxy.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/dataZoomProcessor.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/dataZoomAction.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/installCommon.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/installDataZoomSelect.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/toolbox/featureManager.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/toolbox/ToolboxModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/helper/listComponent.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/toolbox/ToolboxView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/toolbox/feature/SaveAsImage.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/toolbox/feature/MagicType.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/toolbox/feature/DataView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/history.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/toolbox/feature/Restore.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/helper/BrushTargetManager.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/toolbox/feature/DataZoom.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/toolbox/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/tooltip/TooltipModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/tooltip/helper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/tooltip/TooltipView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/tooltip/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/brush/preprocessor.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/visual/visualSolution.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/brush/selector.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/brush/visualEncoding.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/brush/BrushView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/brush/BrushModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/toolbox/feature/Brush.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/brush/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/title/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/timeline/TimelineModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/timeline/SliderTimelineModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/timeline/TimelineView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/timeline/TimelineAxis.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/timeline/SliderTimelineView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/timeline/timelineAction.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/timeline/preprocessor.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/timeline/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/checkMarkerInSeries.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/MarkerModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/MarkPointModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/markerHelper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/MarkerView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/MarkPointView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/installMarkPoint.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/MarkLineModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/MarkLineView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/installMarkLine.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/MarkAreaModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/MarkAreaView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/marker/installMarkArea.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/legend/LegendModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/legend/LegendView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/legend/legendFilter.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/legend/legendAction.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/legend/installLegendPlain.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/legend/ScrollableLegendModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/legend/ScrollableLegendView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/legend/scrollableLegendAction.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/legend/installLegendScroll.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/legend/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/InsideZoomModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/roams.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/InsideZoomView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/installDataZoomInside.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/SliderZoomModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/SliderZoomView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/installDataZoomSlider.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataZoom/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/visual/visualDefault.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/VisualMapModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/ContinuousModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/VisualMapView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/helper.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/ContinuousView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/visualMapAction.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/visualEncoding.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/preprocessor.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/installCommon.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/installVisualMapContinuous.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/PiecewiseModel.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/PiecewiseView.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/installVisualMapPiecewise.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/visualMap/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/visual/aria.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/aria/preprocessor.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/aria/install.js","../../../node_modules/.bun/echarts@6.0.0/node_modules/echarts/lib/component/dataset/install.js"],"sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as axisPointerModelHelper from './modelHelper.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport * as throttleUtil from '../../util/throttle.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nvar clone = zrUtil.clone;\nvar bind = zrUtil.bind;\n/**\n * Base axis pointer class in 2D.\n */\nvar BaseAxisPointer = /** @class */function () {\n function BaseAxisPointer() {\n this._dragging = false;\n /**\n * In px, arbitrary value. Do not set too small,\n * no animation is ok for most cases.\n */\n this.animationThreshold = 15;\n }\n /**\n * @implement\n */\n BaseAxisPointer.prototype.render = function (axisModel, axisPointerModel, api, forceRender) {\n var value = axisPointerModel.get('value');\n var status = axisPointerModel.get('status');\n // Bind them to `this`, not in closure, otherwise they will not\n // be replaced when user calling setOption in not merge mode.\n this._axisModel = axisModel;\n this._axisPointerModel = axisPointerModel;\n this._api = api;\n // Optimize: `render` will be called repeatedly during mouse move.\n // So it is power consuming if performing `render` each time,\n // especially on mobile device.\n if (!forceRender && this._lastValue === value && this._lastStatus === status) {\n return;\n }\n this._lastValue = value;\n this._lastStatus = status;\n var group = this._group;\n var handle = this._handle;\n if (!status || status === 'hide') {\n // Do not clear here, for animation better.\n group && group.hide();\n handle && handle.hide();\n return;\n }\n group && group.show();\n handle && handle.show();\n // Otherwise status is 'show'\n var elOption = {};\n this.makeElOption(elOption, value, axisModel, axisPointerModel, api);\n // Enable change axis pointer type.\n var graphicKey = elOption.graphicKey;\n if (graphicKey !== this._lastGraphicKey) {\n this.clear(api);\n }\n this._lastGraphicKey = graphicKey;\n var moveAnimation = this._moveAnimation = this.determineAnimation(axisModel, axisPointerModel);\n if (!group) {\n group = this._group = new graphic.Group();\n this.createPointerEl(group, elOption, axisModel, axisPointerModel);\n this.createLabelEl(group, elOption, axisModel, axisPointerModel);\n api.getZr().add(group);\n } else {\n var doUpdateProps = zrUtil.curry(updateProps, axisPointerModel, moveAnimation);\n this.updatePointerEl(group, elOption, doUpdateProps);\n this.updateLabelEl(group, elOption, doUpdateProps, axisPointerModel);\n }\n updateMandatoryProps(group, axisPointerModel, true);\n this._renderHandle(value);\n };\n /**\n * @implement\n */\n BaseAxisPointer.prototype.remove = function (api) {\n this.clear(api);\n };\n /**\n * @implement\n */\n BaseAxisPointer.prototype.dispose = function (api) {\n this.clear(api);\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.determineAnimation = function (axisModel, axisPointerModel) {\n var animation = axisPointerModel.get('animation');\n var axis = axisModel.axis;\n var isCategoryAxis = axis.type === 'category';\n var useSnap = axisPointerModel.get('snap');\n // Value axis without snap always do not snap.\n if (!useSnap && !isCategoryAxis) {\n return false;\n }\n if (animation === 'auto' || animation == null) {\n var animationThreshold = this.animationThreshold;\n if (isCategoryAxis && axis.getBandWidth() > animationThreshold) {\n return true;\n }\n // It is important to auto animation when snap used. Consider if there is\n // a dataZoom, animation will be disabled when too many points exist, while\n // it will be enabled for better visual effect when little points exist.\n if (useSnap) {\n var seriesDataCount = axisPointerModelHelper.getAxisInfo(axisModel).seriesDataCount;\n var axisExtent = axis.getExtent();\n // Approximate band width\n return Math.abs(axisExtent[0] - axisExtent[1]) / seriesDataCount > animationThreshold;\n }\n return false;\n }\n return animation === true;\n };\n /**\n * add {pointer, label, graphicKey} to elOption\n * @protected\n */\n BaseAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n // Should be implemenented by sub-class.\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.createPointerEl = function (group, elOption, axisModel, axisPointerModel) {\n var pointerOption = elOption.pointer;\n if (pointerOption) {\n var pointerEl = inner(group).pointerEl = new graphic[pointerOption.type](clone(elOption.pointer));\n group.add(pointerEl);\n }\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.createLabelEl = function (group, elOption, axisModel, axisPointerModel) {\n if (elOption.label) {\n var labelEl = inner(group).labelEl = new graphic.Text(clone(elOption.label));\n group.add(labelEl);\n updateLabelShowHide(labelEl, axisPointerModel);\n }\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.updatePointerEl = function (group, elOption, updateProps) {\n var pointerEl = inner(group).pointerEl;\n if (pointerEl && elOption.pointer) {\n pointerEl.setStyle(elOption.pointer.style);\n updateProps(pointerEl, {\n shape: elOption.pointer.shape\n });\n }\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.updateLabelEl = function (group, elOption, updateProps, axisPointerModel) {\n var labelEl = inner(group).labelEl;\n if (labelEl) {\n labelEl.setStyle(elOption.label.style);\n updateProps(labelEl, {\n // Consider text length change in vertical axis, animation should\n // be used on shape, otherwise the effect will be weird.\n // TODOTODO\n // shape: elOption.label.shape,\n x: elOption.label.x,\n y: elOption.label.y\n });\n updateLabelShowHide(labelEl, axisPointerModel);\n }\n };\n /**\n * @private\n */\n BaseAxisPointer.prototype._renderHandle = function (value) {\n if (this._dragging || !this.updateHandleTransform) {\n return;\n }\n var axisPointerModel = this._axisPointerModel;\n var zr = this._api.getZr();\n var handle = this._handle;\n var handleModel = axisPointerModel.getModel('handle');\n var status = axisPointerModel.get('status');\n if (!handleModel.get('show') || !status || status === 'hide') {\n handle && zr.remove(handle);\n this._handle = null;\n return;\n }\n var isInit;\n if (!this._handle) {\n isInit = true;\n handle = this._handle = graphic.createIcon(handleModel.get('icon'), {\n cursor: 'move',\n draggable: true,\n onmousemove: function (e) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n onmousedown: bind(this._onHandleDragMove, this, 0, 0),\n drift: bind(this._onHandleDragMove, this),\n ondragend: bind(this._onHandleDragEnd, this)\n });\n zr.add(handle);\n }\n updateMandatoryProps(handle, axisPointerModel, false);\n // update style\n handle.setStyle(handleModel.getItemStyle(null, ['color', 'borderColor', 'borderWidth', 'opacity', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY']));\n // update position\n var handleSize = handleModel.get('size');\n if (!zrUtil.isArray(handleSize)) {\n handleSize = [handleSize, handleSize];\n }\n handle.scaleX = handleSize[0] / 2;\n handle.scaleY = handleSize[1] / 2;\n throttleUtil.createOrUpdate(this, '_doDispatchAxisPointer', handleModel.get('throttle') || 0, 'fixRate');\n this._moveHandleToValue(value, isInit);\n };\n BaseAxisPointer.prototype._moveHandleToValue = function (value, isInit) {\n updateProps(this._axisPointerModel, !isInit && this._moveAnimation, this._handle, getHandleTransProps(this.getHandleTransform(value, this._axisModel, this._axisPointerModel)));\n };\n BaseAxisPointer.prototype._onHandleDragMove = function (dx, dy) {\n var handle = this._handle;\n if (!handle) {\n return;\n }\n this._dragging = true;\n // Persistent for throttle.\n var trans = this.updateHandleTransform(getHandleTransProps(handle), [dx, dy], this._axisModel, this._axisPointerModel);\n this._payloadInfo = trans;\n handle.stopAnimation();\n handle.attr(getHandleTransProps(trans));\n inner(handle).lastProp = null;\n this._doDispatchAxisPointer();\n };\n /**\n * Throttled method.\n */\n BaseAxisPointer.prototype._doDispatchAxisPointer = function () {\n var handle = this._handle;\n if (!handle) {\n return;\n }\n var payloadInfo = this._payloadInfo;\n var axisModel = this._axisModel;\n this._api.dispatchAction({\n type: 'updateAxisPointer',\n x: payloadInfo.cursorPoint[0],\n y: payloadInfo.cursorPoint[1],\n tooltipOption: payloadInfo.tooltipOption,\n axesInfo: [{\n axisDim: axisModel.axis.dim,\n axisIndex: axisModel.componentIndex\n }]\n });\n };\n BaseAxisPointer.prototype._onHandleDragEnd = function () {\n this._dragging = false;\n var handle = this._handle;\n if (!handle) {\n return;\n }\n var value = this._axisPointerModel.get('value');\n // Consider snap or categroy axis, handle may be not consistent with\n // axisPointer. So move handle to align the exact value position when\n // drag ended.\n this._moveHandleToValue(value);\n // For the effect: tooltip will be shown when finger holding on handle\n // button, and will be hidden after finger left handle button.\n this._api.dispatchAction({\n type: 'hideTip'\n });\n };\n /**\n * @private\n */\n BaseAxisPointer.prototype.clear = function (api) {\n this._lastValue = null;\n this._lastStatus = null;\n var zr = api.getZr();\n var group = this._group;\n var handle = this._handle;\n if (zr && group) {\n this._lastGraphicKey = null;\n group && zr.remove(group);\n handle && zr.remove(handle);\n this._group = null;\n this._handle = null;\n this._payloadInfo = null;\n }\n throttleUtil.clear(this, '_doDispatchAxisPointer');\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.doClear = function () {\n // Implemented by sub-class if necessary.\n };\n BaseAxisPointer.prototype.buildLabel = function (xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n };\n return BaseAxisPointer;\n}();\nfunction updateProps(animationModel, moveAnimation, el, props) {\n // Animation optimize.\n if (!propsEqual(inner(el).lastProp, props)) {\n inner(el).lastProp = props;\n moveAnimation ? graphic.updateProps(el, props, animationModel) : (el.stopAnimation(), el.attr(props));\n }\n}\nfunction propsEqual(lastProps, newProps) {\n if (zrUtil.isObject(lastProps) && zrUtil.isObject(newProps)) {\n var equals_1 = true;\n zrUtil.each(newProps, function (item, key) {\n equals_1 = equals_1 && propsEqual(lastProps[key], item);\n });\n return !!equals_1;\n } else {\n return lastProps === newProps;\n }\n}\nfunction updateLabelShowHide(labelEl, axisPointerModel) {\n labelEl[axisPointerModel.get(['label', 'show']) ? 'show' : 'hide']();\n}\nfunction getHandleTransProps(trans) {\n return {\n x: trans.x || 0,\n y: trans.y || 0,\n rotation: trans.rotation || 0\n };\n}\nfunction updateMandatoryProps(group, axisPointerModel, silent) {\n var z = axisPointerModel.get('z');\n var zlevel = axisPointerModel.get('zlevel');\n group && group.traverse(function (el) {\n if (el.type !== 'group') {\n z != null && (el.z = z);\n zlevel != null && (el.zlevel = zlevel);\n el.silent = silent;\n }\n });\n}\nexport default BaseAxisPointer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport * as formatUtil from '../../util/format.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nexport function buildElStyle(axisPointerModel) {\n var axisPointerType = axisPointerModel.get('type');\n var styleModel = axisPointerModel.getModel(axisPointerType + 'Style');\n var style;\n if (axisPointerType === 'line') {\n style = styleModel.getLineStyle();\n style.fill = null;\n } else if (axisPointerType === 'shadow') {\n style = styleModel.getAreaStyle();\n style.stroke = null;\n }\n return style;\n}\n/**\n * @param {Function} labelPos {align, verticalAlign, position}\n */\nexport function buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos) {\n var value = axisPointerModel.get('value');\n var text = getValueLabel(value, axisModel.axis, axisModel.ecModel, axisPointerModel.get('seriesDataIndices'), {\n precision: axisPointerModel.get(['label', 'precision']),\n formatter: axisPointerModel.get(['label', 'formatter'])\n });\n var labelModel = axisPointerModel.getModel('label');\n var paddings = formatUtil.normalizeCssArray(labelModel.get('padding') || 0);\n var font = labelModel.getFont();\n var textRect = textContain.getBoundingRect(text, font);\n var position = labelPos.position;\n var width = textRect.width + paddings[1] + paddings[3];\n var height = textRect.height + paddings[0] + paddings[2];\n // Adjust by align.\n var align = labelPos.align;\n align === 'right' && (position[0] -= width);\n align === 'center' && (position[0] -= width / 2);\n var verticalAlign = labelPos.verticalAlign;\n verticalAlign === 'bottom' && (position[1] -= height);\n verticalAlign === 'middle' && (position[1] -= height / 2);\n // Not overflow ec container\n confineInContainer(position, width, height, api);\n var bgColor = labelModel.get('backgroundColor');\n if (!bgColor || bgColor === 'auto') {\n bgColor = axisModel.get(['axisLine', 'lineStyle', 'color']);\n }\n elOption.label = {\n // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},\n x: position[0],\n y: position[1],\n style: createTextStyle(labelModel, {\n text: text,\n font: font,\n fill: labelModel.getTextColor(),\n padding: paddings,\n backgroundColor: bgColor\n }),\n // Label should be over axisPointer.\n z2: 10\n };\n}\n// Do not overflow ec container\nfunction confineInContainer(position, width, height, api) {\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n position[0] = Math.min(position[0] + width, viewWidth) - width;\n position[1] = Math.min(position[1] + height, viewHeight) - height;\n position[0] = Math.max(position[0], 0);\n position[1] = Math.max(position[1], 0);\n}\nexport function getValueLabel(value, axis, ecModel, seriesDataIndices, opt) {\n value = axis.scale.parse(value);\n var text = axis.scale.getLabel({\n value: value\n }, {\n // If `precision` is set, width can be fixed (like '12.00500'), which\n // helps to debounce when when moving label.\n precision: opt.precision\n });\n var formatter = opt.formatter;\n if (formatter) {\n var params_1 = {\n value: axisHelper.getAxisRawValue(axis, {\n value: value\n }),\n axisDimension: axis.dim,\n axisIndex: axis.index,\n seriesData: []\n };\n zrUtil.each(seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var dataParams = series && series.getDataParams(dataIndex);\n dataParams && params_1.seriesData.push(dataParams);\n });\n if (zrUtil.isString(formatter)) {\n text = formatter.replace('{value}', text);\n } else if (zrUtil.isFunction(formatter)) {\n text = formatter(params_1);\n }\n }\n return text;\n}\nexport function getTransformedPosition(axis, value, layoutInfo) {\n var transform = matrix.create();\n matrix.rotate(transform, transform, layoutInfo.rotation);\n matrix.translate(transform, transform, layoutInfo.position);\n return graphic.applyTransform([axis.dataToCoord(value), (layoutInfo.labelOffset || 0) + (layoutInfo.labelDirection || 1) * (layoutInfo.labelMargin || 0)], transform);\n}\nexport function buildCartesianSingleLabelElOption(value, elOption, layoutInfo, axisModel, axisPointerModel, api) {\n var textLayout = AxisBuilder.innerTextLayout(layoutInfo.rotation, 0, layoutInfo.labelDirection);\n layoutInfo.labelMargin = axisPointerModel.get(['label', 'margin']);\n buildLabelElOption(elOption, axisModel, axisPointerModel, api, {\n position: getTransformedPosition(axisModel.axis, value, layoutInfo),\n align: textLayout.textAlign,\n verticalAlign: textLayout.textVerticalAlign\n });\n}\nexport function makeLineShape(p1, p2, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x1: p1[xDimIndex],\n y1: p1[1 - xDimIndex],\n x2: p2[xDimIndex],\n y2: p2[1 - xDimIndex]\n };\n}\nexport function makeRectShape(xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n}\nexport function makeSectorShape(cx, cy, r0, r, startAngle, endAngle) {\n return {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n startAngle: startAngle,\n endAngle: endAngle,\n clockwise: true\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseAxisPointer from './BaseAxisPointer.js';\nimport * as viewHelper from './viewHelper.js';\nimport * as cartesianAxisHelper from '../../coord/cartesian/cartesianAxisHelper.js';\nvar CartesianAxisPointer = /** @class */function (_super) {\n __extends(CartesianAxisPointer, _super);\n function CartesianAxisPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @override\n */\n CartesianAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n var grid = axis.grid;\n var axisPointerType = axisPointerModel.get('type');\n var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent();\n var pixelValue = axis.toGlobalCoord(axis.dataToCoord(value, true));\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, pixelValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n var layoutInfo = cartesianAxisHelper.layout(grid.getRect(), axisModel);\n viewHelper.buildCartesianSingleLabelElOption(value, elOption, layoutInfo, axisModel, axisPointerModel, api);\n };\n /**\n * @override\n */\n CartesianAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) {\n var layoutInfo = cartesianAxisHelper.layout(axisModel.axis.grid.getRect(), axisModel, {\n labelInside: false\n });\n layoutInfo.labelMargin = axisPointerModel.get(['handle', 'margin']);\n var pos = viewHelper.getTransformedPosition(axisModel.axis, value, layoutInfo);\n return {\n x: pos[0],\n y: pos[1],\n rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0)\n };\n };\n /**\n * @override\n */\n CartesianAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) {\n var axis = axisModel.axis;\n var grid = axis.grid;\n var axisExtent = axis.getGlobalExtent(true);\n var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent();\n var dimIndex = axis.dim === 'x' ? 0 : 1;\n var currPosition = [transform.x, transform.y];\n currPosition[dimIndex] += delta[dimIndex];\n currPosition[dimIndex] = Math.min(axisExtent[1], currPosition[dimIndex]);\n currPosition[dimIndex] = Math.max(axisExtent[0], currPosition[dimIndex]);\n var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2;\n var cursorPoint = [cursorOtherValue, cursorOtherValue];\n cursorPoint[dimIndex] = currPosition[dimIndex];\n // Make tooltip do not overlap axisPointer and in the middle of the grid.\n var tooltipOptions = [{\n verticalAlign: 'middle'\n }, {\n align: 'center'\n }];\n return {\n x: currPosition[0],\n y: currPosition[1],\n rotation: transform.rotation,\n cursorPoint: cursorPoint,\n tooltipOption: tooltipOptions[dimIndex]\n };\n };\n return CartesianAxisPointer;\n}(BaseAxisPointer);\nfunction getCartesian(grid, axis) {\n var opt = {};\n opt[axis.dim + 'AxisIndex'] = axis.index;\n return grid.getCartesian(opt);\n}\nvar pointerShapeBuilder = {\n line: function (axis, pixelValue, otherExtent) {\n var targetShape = viewHelper.makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getAxisDimIndex(axis));\n return {\n type: 'Line',\n subPixelOptimize: true,\n shape: targetShape\n };\n },\n shadow: function (axis, pixelValue, otherExtent) {\n var bandWidth = Math.max(1, axis.getBandWidth());\n var span = otherExtent[1] - otherExtent[0];\n return {\n type: 'Rect',\n shape: viewHelper.makeRectShape([pixelValue - bandWidth / 2, otherExtent[0]], [bandWidth, span], getAxisDimIndex(axis))\n };\n }\n};\nfunction getAxisDimIndex(axis) {\n return axis.dim === 'x' ? 0 : 1;\n}\nexport default CartesianAxisPointer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nimport tokens from '../../visual/tokens.js';\nvar AxisPointerModel = /** @class */function (_super) {\n __extends(AxisPointerModel, _super);\n function AxisPointerModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisPointerModel.type;\n return _this;\n }\n AxisPointerModel.type = 'axisPointer';\n AxisPointerModel.defaultOption = {\n // 'auto' means that show when triggered by tooltip or handle.\n show: 'auto',\n // zlevel: 0,\n z: 50,\n type: 'line',\n // axispointer triggered by tootip determine snap automatically,\n // see `modelHelper`.\n snap: false,\n triggerTooltip: true,\n triggerEmphasis: true,\n value: null,\n status: null,\n link: [],\n // Do not set 'auto' here, otherwise global animation: false\n // will not effect at this axispointer.\n animation: null,\n animationDurationUpdate: 200,\n lineStyle: {\n color: tokens.color.border,\n width: 1,\n type: 'dashed'\n },\n shadowStyle: {\n color: tokens.color.shadowTint\n },\n label: {\n show: true,\n formatter: null,\n precision: 'auto',\n margin: 3,\n color: tokens.color.neutral00,\n padding: [5, 7, 5, 7],\n backgroundColor: tokens.color.accent60,\n borderColor: null,\n borderWidth: 0,\n borderRadius: 3\n },\n handle: {\n show: false,\n // eslint-disable-next-line\n icon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z',\n size: 45,\n // handle margin is from symbol center to axis, which is stable when circular move.\n margin: 50,\n // color: '#1b8bbd'\n // color: '#2f4554'\n color: tokens.color.accent40,\n // For mobile performance\n throttle: 40\n }\n };\n return AxisPointerModel;\n}(ComponentModel);\nexport default AxisPointerModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nvar each = zrUtil.each;\n/**\n * @param {string} key\n * @param {module:echarts/ExtensionAPI} api\n * @param {Function} handler\n * param: {string} currTrigger\n * param: {Array.<number>} point\n */\nexport function register(key, api, handler) {\n if (env.node) {\n return;\n }\n var zr = api.getZr();\n inner(zr).records || (inner(zr).records = {});\n initGlobalListeners(zr, api);\n var record = inner(zr).records[key] || (inner(zr).records[key] = {});\n record.handler = handler;\n}\nfunction initGlobalListeners(zr, api) {\n if (inner(zr).initialized) {\n return;\n }\n inner(zr).initialized = true;\n useHandler('click', zrUtil.curry(doEnter, 'click'));\n useHandler('mousemove', zrUtil.curry(doEnter, 'mousemove'));\n // useHandler('mouseout', onLeave);\n useHandler('globalout', onLeave);\n function useHandler(eventType, cb) {\n zr.on(eventType, function (e) {\n var dis = makeDispatchAction(api);\n each(inner(zr).records, function (record) {\n record && cb(record, e, dis.dispatchAction);\n });\n dispatchTooltipFinally(dis.pendings, api);\n });\n }\n}\nfunction dispatchTooltipFinally(pendings, api) {\n var showLen = pendings.showTip.length;\n var hideLen = pendings.hideTip.length;\n var actuallyPayload;\n if (showLen) {\n actuallyPayload = pendings.showTip[showLen - 1];\n } else if (hideLen) {\n actuallyPayload = pendings.hideTip[hideLen - 1];\n }\n if (actuallyPayload) {\n actuallyPayload.dispatchAction = null;\n api.dispatchAction(actuallyPayload);\n }\n}\nfunction onLeave(record, e, dispatchAction) {\n record.handler('leave', null, dispatchAction);\n}\nfunction doEnter(currTrigger, record, e, dispatchAction) {\n record.handler(currTrigger, e, dispatchAction);\n}\nfunction makeDispatchAction(api) {\n var pendings = {\n showTip: [],\n hideTip: []\n };\n // FIXME\n // better approach?\n // 'showTip' and 'hideTip' can be triggered by axisPointer and tooltip,\n // which may be conflict, (axisPointer call showTip but tooltip call hideTip);\n // So we have to add \"final stage\" to merge those dispatched actions.\n var dispatchAction = function (payload) {\n var pendingList = pendings[payload.type];\n if (pendingList) {\n pendingList.push(payload);\n } else {\n payload.dispatchAction = dispatchAction;\n api.dispatchAction(payload);\n }\n };\n return {\n dispatchAction: dispatchAction,\n pendings: pendings\n };\n}\nexport function unregister(key, api) {\n if (env.node) {\n return;\n }\n var zr = api.getZr();\n var record = (inner(zr).records || {})[key];\n if (record) {\n inner(zr).records[key] = null;\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as globalListener from './globalListener.js';\nimport ComponentView from '../../view/Component.js';\nvar AxisPointerView = /** @class */function (_super) {\n __extends(AxisPointerView, _super);\n function AxisPointerView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisPointerView.type;\n return _this;\n }\n AxisPointerView.prototype.render = function (globalAxisPointerModel, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var triggerOn = globalAxisPointerModel.get('triggerOn') || globalTooltipModel && globalTooltipModel.get('triggerOn') || 'mousemove|click';\n // Register global listener in AxisPointerView to enable\n // AxisPointerView to be independent to Tooltip.\n globalListener.register('axisPointer', api, function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none' && (currTrigger === 'leave' || triggerOn.indexOf(currTrigger) >= 0)) {\n dispatchAction({\n type: 'updateAxisPointer',\n currTrigger: currTrigger,\n x: e && e.offsetX,\n y: e && e.offsetY\n });\n }\n });\n };\n AxisPointerView.prototype.remove = function (ecModel, api) {\n globalListener.unregister('axisPointer', api);\n };\n AxisPointerView.prototype.dispose = function (ecModel, api) {\n globalListener.unregister('axisPointer', api);\n };\n AxisPointerView.type = 'axisPointer';\n return AxisPointerView;\n}(ComponentView);\nexport default AxisPointerView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\n/**\n * @param finder contains {seriesIndex, dataIndex, dataIndexInside}\n * @param ecModel\n * @return {point: [x, y], el: ...} point Will not be null.\n */\nexport default function findPointFromSeries(finder, ecModel) {\n var point = [];\n var seriesIndex = finder.seriesIndex;\n var seriesModel;\n if (seriesIndex == null || !(seriesModel = ecModel.getSeriesByIndex(seriesIndex))) {\n return {\n point: []\n };\n }\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, finder);\n if (dataIndex == null || dataIndex < 0 || zrUtil.isArray(dataIndex)) {\n return {\n point: []\n };\n }\n var el = data.getItemGraphicEl(dataIndex);\n var coordSys = seriesModel.coordinateSystem;\n if (seriesModel.getTooltipPosition) {\n point = seriesModel.getTooltipPosition(dataIndex) || [];\n } else if (coordSys && coordSys.dataToPoint) {\n if (finder.isStacked) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var valueAxisDim = valueAxis.dim;\n var baseAxisDim = baseAxis.dim;\n var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;\n var baseDim = data.mapDimension(baseAxisDim);\n var stackedData = [];\n stackedData[baseDataOffset] = data.get(baseDim, dataIndex);\n stackedData[1 - baseDataOffset] = data.get(data.getCalculationInfo('stackResultDimension'), dataIndex);\n point = coordSys.dataToPoint(stackedData) || [];\n } else {\n point = coordSys.dataToPoint(data.getValues(zrUtil.map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }), dataIndex)) || [];\n }\n } else if (el) {\n // Use graphic bounding rect\n var rect = el.getBoundingRect().clone();\n rect.applyTransform(el.transform);\n point = [rect.x + rect.width / 2, rect.y + rect.height / 2];\n }\n return {\n point: point,\n el: el\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner } from '../../util/model.js';\nimport * as modelHelper from './modelHelper.js';\nimport findPointFromSeries from './findPointFromSeries.js';\nimport { each, curry, bind, extend } from 'zrender/lib/core/util.js';\nvar inner = makeInner();\n/**\n * Basic logic: check all axis, if they do not demand show/highlight,\n * then hide/downplay them.\n *\n * @return content of event obj for echarts.connect.\n */\nexport default function axisTrigger(payload, ecModel, api) {\n var currTrigger = payload.currTrigger;\n var point = [payload.x, payload.y];\n var finder = payload;\n var dispatchAction = payload.dispatchAction || bind(api.dispatchAction, api);\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo;\n // Pending\n // See #6121. But we are not able to reproduce it yet.\n if (!coordSysAxesInfo) {\n return;\n }\n if (illegalPoint(point)) {\n // Used in the default behavior of `connection`: use the sample seriesIndex\n // and dataIndex. And also used in the tooltipView trigger.\n point = findPointFromSeries({\n seriesIndex: finder.seriesIndex,\n // Do not use dataIndexInside from other ec instance.\n // FIXME: auto detect it?\n dataIndex: finder.dataIndex\n }, ecModel).point;\n }\n var isIllegalPoint = illegalPoint(point);\n // Axis and value can be specified when calling dispatchAction({type: 'updateAxisPointer'}).\n // Notice: In this case, it is difficult to get the `point` (which is necessary to show\n // tooltip, so if point is not given, we just use the point found by sample seriesIndex\n // and dataIndex.\n var inputAxesInfo = finder.axesInfo;\n var axesInfo = coordSysAxesInfo.axesInfo;\n var shouldHide = currTrigger === 'leave' || illegalPoint(point);\n var outputPayload = {};\n var showValueMap = {};\n var dataByCoordSys = {\n list: [],\n map: {}\n };\n var updaters = {\n showPointer: curry(showPointer, showValueMap),\n showTooltip: curry(showTooltip, dataByCoordSys)\n };\n // Process for triggered axes.\n each(coordSysAxesInfo.coordSysMap, function (coordSys, coordSysKey) {\n // If a point given, it must be contained by the coordinate system.\n var coordSysContainsPoint = isIllegalPoint || coordSys.containPoint(point);\n each(coordSysAxesInfo.coordSysAxesInfo[coordSysKey], function (axisInfo, key) {\n var axis = axisInfo.axis;\n var inputAxisInfo = findInputAxisInfo(inputAxesInfo, axisInfo);\n // If no inputAxesInfo, no axis is restricted.\n if (!shouldHide && coordSysContainsPoint && (!inputAxesInfo || inputAxisInfo)) {\n var val = inputAxisInfo && inputAxisInfo.value;\n if (val == null && !isIllegalPoint) {\n val = axis.pointToData(point);\n }\n val != null && processOnAxis(axisInfo, val, updaters, false, outputPayload);\n }\n });\n });\n // Process for linked axes.\n var linkTriggers = {};\n each(axesInfo, function (tarAxisInfo, tarKey) {\n var linkGroup = tarAxisInfo.linkGroup;\n // If axis has been triggered in the previous stage, it should not be triggered by link.\n if (linkGroup && !showValueMap[tarKey]) {\n each(linkGroup.axesInfo, function (srcAxisInfo, srcKey) {\n var srcValItem = showValueMap[srcKey];\n // If srcValItem exist, source axis is triggered, so link to target axis.\n if (srcAxisInfo !== tarAxisInfo && srcValItem) {\n var val = srcValItem.value;\n linkGroup.mapper && (val = tarAxisInfo.axis.scale.parse(linkGroup.mapper(val, makeMapperParam(srcAxisInfo), makeMapperParam(tarAxisInfo))));\n linkTriggers[tarAxisInfo.key] = val;\n }\n });\n }\n });\n each(linkTriggers, function (val, tarKey) {\n processOnAxis(axesInfo[tarKey], val, updaters, true, outputPayload);\n });\n updateModelActually(showValueMap, axesInfo, outputPayload);\n dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction);\n dispatchHighDownActually(axesInfo, dispatchAction, api);\n return outputPayload;\n}\nfunction processOnAxis(axisInfo, newValue, updaters, noSnap, outputFinder) {\n var axis = axisInfo.axis;\n if (axis.scale.isBlank() || !axis.containData(newValue)) {\n return;\n }\n if (!axisInfo.involveSeries) {\n updaters.showPointer(axisInfo, newValue);\n return;\n }\n // Heavy calculation. So put it after axis.containData checking.\n var payloadInfo = buildPayloadsBySeries(newValue, axisInfo);\n var payloadBatch = payloadInfo.payloadBatch;\n var snapToValue = payloadInfo.snapToValue;\n // Fill content of event obj for echarts.connect.\n // By default use the first involved series data as a sample to connect.\n if (payloadBatch[0] && outputFinder.seriesIndex == null) {\n extend(outputFinder, payloadBatch[0]);\n }\n // If no linkSource input, this process is for collecting link\n // target, where snap should not be accepted.\n if (!noSnap && axisInfo.snap) {\n if (axis.containData(snapToValue) && snapToValue != null) {\n newValue = snapToValue;\n }\n }\n updaters.showPointer(axisInfo, newValue, payloadBatch);\n // Tooltip should always be snapToValue, otherwise there will be\n // incorrect \"axis value ~ series value\" mapping displayed in tooltip.\n updaters.showTooltip(axisInfo, payloadInfo, snapToValue);\n}\nfunction buildPayloadsBySeries(value, axisInfo) {\n var axis = axisInfo.axis;\n var dim = axis.dim;\n var snapToValue = value;\n var payloadBatch = [];\n var minDist = Number.MAX_VALUE;\n var minDiff = -1;\n each(axisInfo.seriesModels, function (series, idx) {\n var dataDim = series.getData().mapDimensionsAll(dim);\n var seriesNestestValue;\n var dataIndices;\n if (series.getAxisTooltipData) {\n var result = series.getAxisTooltipData(dataDim, value, axis);\n dataIndices = result.dataIndices;\n seriesNestestValue = result.nestestValue;\n } else {\n dataIndices = series.indicesOfNearest(dim, dataDim[0], value,\n // Add a threshold to avoid find the wrong dataIndex\n // when data length is not same.\n // false,\n axis.type === 'category' ? 0.5 : null);\n if (!dataIndices.length) {\n return;\n }\n seriesNestestValue = series.getData().get(dataDim[0], dataIndices[0]);\n }\n if (seriesNestestValue == null || !isFinite(seriesNestestValue)) {\n return;\n }\n var diff = value - seriesNestestValue;\n var dist = Math.abs(diff);\n // Consider category case\n if (dist <= minDist) {\n if (dist < minDist || diff >= 0 && minDiff < 0) {\n minDist = dist;\n minDiff = diff;\n snapToValue = seriesNestestValue;\n payloadBatch.length = 0;\n }\n each(dataIndices, function (dataIndex) {\n payloadBatch.push({\n seriesIndex: series.seriesIndex,\n dataIndexInside: dataIndex,\n dataIndex: series.getData().getRawIndex(dataIndex)\n });\n });\n }\n });\n return {\n payloadBatch: payloadBatch,\n snapToValue: snapToValue\n };\n}\nfunction showPointer(showValueMap, axisInfo, value, payloadBatch) {\n showValueMap[axisInfo.key] = {\n value: value,\n payloadBatch: payloadBatch\n };\n}\nfunction showTooltip(dataByCoordSys, axisInfo, payloadInfo, value) {\n var payloadBatch = payloadInfo.payloadBatch;\n var axis = axisInfo.axis;\n var axisModel = axis.model;\n var axisPointerModel = axisInfo.axisPointerModel;\n // If no data, do not create anything in dataByCoordSys,\n // whose length will be used to judge whether dispatch action.\n if (!axisInfo.triggerTooltip || !payloadBatch.length) {\n return;\n }\n var coordSysModel = axisInfo.coordSys.model;\n var coordSysKey = modelHelper.makeKey(coordSysModel);\n var coordSysItem = dataByCoordSys.map[coordSysKey];\n if (!coordSysItem) {\n coordSysItem = dataByCoordSys.map[coordSysKey] = {\n coordSysId: coordSysModel.id,\n coordSysIndex: coordSysModel.componentIndex,\n coordSysType: coordSysModel.type,\n coordSysMainType: coordSysModel.mainType,\n dataByAxis: []\n };\n dataByCoordSys.list.push(coordSysItem);\n }\n coordSysItem.dataByAxis.push({\n axisDim: axis.dim,\n axisIndex: axisModel.componentIndex,\n axisType: axisModel.type,\n axisId: axisModel.id,\n value: value,\n // Caustion: viewHelper.getValueLabel is actually on \"view stage\", which\n // depends that all models have been updated. So it should not be performed\n // here. Considering axisPointerModel used here is volatile, which is hard\n // to be retrieve in TooltipView, we prepare parameters here.\n valueLabelOpt: {\n precision: axisPointerModel.get(['label', 'precision']),\n formatter: axisPointerModel.get(['label', 'formatter'])\n },\n seriesDataIndices: payloadBatch.slice()\n });\n}\nfunction updateModelActually(showValueMap, axesInfo, outputPayload) {\n var outputAxesInfo = outputPayload.axesInfo = [];\n // Basic logic: If no 'show' required, 'hide' this axisPointer.\n each(axesInfo, function (axisInfo, key) {\n var option = axisInfo.axisPointerModel.option;\n var valItem = showValueMap[key];\n if (valItem) {\n !axisInfo.useHandle && (option.status = 'show');\n option.value = valItem.value;\n // For label formatter param and highlight.\n option.seriesDataIndices = (valItem.payloadBatch || []).slice();\n }\n // When always show (e.g., handle used), remain\n // original value and status.\n else {\n // If hide, value still need to be set, consider\n // click legend to toggle axis blank.\n !axisInfo.useHandle && (option.status = 'hide');\n }\n // If status is 'hide', should be no info in payload.\n option.status === 'show' && outputAxesInfo.push({\n axisDim: axisInfo.axis.dim,\n axisIndex: axisInfo.axis.model.componentIndex,\n value: option.value\n });\n });\n}\nfunction dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction) {\n // Basic logic: If no showTip required, hideTip will be dispatched.\n if (illegalPoint(point) || !dataByCoordSys.list.length) {\n dispatchAction({\n type: 'hideTip'\n });\n return;\n }\n // In most case only one axis (or event one series is used). It is\n // convenient to fetch payload.seriesIndex and payload.dataIndex\n // directly. So put the first seriesIndex and dataIndex of the first\n // axis on the payload.\n var sampleItem = ((dataByCoordSys.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};\n dispatchAction({\n type: 'showTip',\n escapeConnect: true,\n x: point[0],\n y: point[1],\n tooltipOption: payload.tooltipOption,\n position: payload.position,\n dataIndexInside: sampleItem.dataIndexInside,\n dataIndex: sampleItem.dataIndex,\n seriesIndex: sampleItem.seriesIndex,\n dataByCoordSys: dataByCoordSys.list\n });\n}\nfunction dispatchHighDownActually(axesInfo, dispatchAction, api) {\n // FIXME\n // highlight status modification should be a stage of main process?\n // (Consider confilct (e.g., legend and axisPointer) and setOption)\n var zr = api.getZr();\n var highDownKey = 'axisPointerLastHighlights';\n var lastHighlights = inner(zr)[highDownKey] || {};\n var newHighlights = inner(zr)[highDownKey] = {};\n // Update highlight/downplay status according to axisPointer model.\n // Build hash map and remove duplicate incidentally.\n each(axesInfo, function (axisInfo, key) {\n var option = axisInfo.axisPointerModel.option;\n option.status === 'show' && axisInfo.triggerEmphasis && each(option.seriesDataIndices, function (batchItem) {\n var key = batchItem.seriesIndex + ' | ' + batchItem.dataIndex;\n newHighlights[key] = batchItem;\n });\n });\n // Diff.\n var toHighlight = [];\n var toDownplay = [];\n each(lastHighlights, function (batchItem, key) {\n !newHighlights[key] && toDownplay.push(batchItem);\n });\n each(newHighlights, function (batchItem, key) {\n !lastHighlights[key] && toHighlight.push(batchItem);\n });\n toDownplay.length && api.dispatchAction({\n type: 'downplay',\n escapeConnect: true,\n // Not blur others when highlight in axisPointer.\n notBlur: true,\n batch: toDownplay\n });\n toHighlight.length && api.dispatchAction({\n type: 'highlight',\n escapeConnect: true,\n // Not blur others when highlight in axisPointer.\n notBlur: true,\n batch: toHighlight\n });\n}\nfunction findInputAxisInfo(inputAxesInfo, axisInfo) {\n for (var i = 0; i < (inputAxesInfo || []).length; i++) {\n var inputAxisInfo = inputAxesInfo[i];\n if (axisInfo.axis.dim === inputAxisInfo.axisDim && axisInfo.axis.model.componentIndex === inputAxisInfo.axisIndex) {\n return inputAxisInfo;\n }\n }\n}\nfunction makeMapperParam(axisInfo) {\n var axisModel = axisInfo.axis.model;\n var item = {};\n var dim = item.axisDim = axisInfo.axis.dim;\n item.axisIndex = item[dim + 'AxisIndex'] = axisModel.componentIndex;\n item.axisName = item[dim + 'AxisName'] = axisModel.name;\n item.axisId = item[dim + 'AxisId'] = axisModel.id;\n return item;\n}\nfunction illegalPoint(point) {\n return !point || point[0] == null || isNaN(point[0]) || point[1] == null || isNaN(point[1]);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport AxisView from '../axis/AxisView.js';\nimport CartesianAxisPointer from './CartesianAxisPointer.js';\nimport AxisPointerModel from './AxisPointerModel.js';\nimport AxisPointerView from './AxisPointerView.js';\nimport { isArray } from 'zrender/lib/core/util.js';\nimport { collect } from './modelHelper.js';\nimport axisTrigger from './axisTrigger.js';\nexport function install(registers) {\n // CartesianAxisPointer is not supposed to be required here. But consider\n // echarts.simple.js and online build tooltip, which only require gridSimple,\n // CartesianAxisPointer should be able to required somewhere.\n AxisView.registerAxisPointerClass('CartesianAxisPointer', CartesianAxisPointer);\n registers.registerComponentModel(AxisPointerModel);\n registers.registerComponentView(AxisPointerView);\n registers.registerPreprocessor(function (option) {\n // Always has a global axisPointerModel for default setting.\n if (option) {\n (!option.axisPointer || option.axisPointer.length === 0) && (option.axisPointer = {});\n var link = option.axisPointer.link;\n // Normalize to array to avoid object mergin. But if link\n // is not set, remain null/undefined, otherwise it will\n // override existent link setting.\n if (link && !isArray(link)) {\n option.axisPointer.link = [link];\n }\n }\n });\n // This process should proformed after coordinate systems created\n // and series data processed. So put it on statistic processing stage.\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, function (ecModel, api) {\n // Build axisPointerModel, mergin tooltip.axisPointer model for each axis.\n // allAxesInfo should be updated when setOption performed.\n ecModel.getComponent('axisPointer').coordSysAxesInfo = collect(ecModel, api);\n });\n // Broadcast to all views.\n registers.registerAction({\n type: 'updateAxisPointer',\n event: 'updateAxisPointer',\n update: ':updateAxisPointer'\n }, axisTrigger);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { install as installSimple } from './installSimple.js';\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport { use } from '../../extension.js';\nexport function install(registers) {\n use(installSimple);\n use(installAxisPointer);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseAxisPointer from './BaseAxisPointer.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as viewHelper from './viewHelper.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\nvar PolarAxisPointer = /** @class */function (_super) {\n __extends(PolarAxisPointer, _super);\n function PolarAxisPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @override\n */\n PolarAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n if (axis.dim === 'angle') {\n this.animationThreshold = Math.PI / 18;\n }\n var polar = axis.polar;\n var otherAxis = polar.getOtherAxis(axis);\n var otherExtent = otherAxis.getExtent();\n var coordValue = axis.dataToCoord(value);\n var axisPointerType = axisPointerModel.get('type');\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, polar, coordValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n var labelMargin = axisPointerModel.get(['label', 'margin']);\n var labelPos = getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin);\n viewHelper.buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos);\n };\n return PolarAxisPointer;\n}(BaseAxisPointer);\n;\nfunction getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin) {\n var axis = axisModel.axis;\n var coord = axis.dataToCoord(value);\n var axisAngle = polar.getAngleAxis().getExtent()[0];\n axisAngle = axisAngle / 180 * Math.PI;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var position;\n var align;\n var verticalAlign;\n if (axis.dim === 'radius') {\n var transform = matrix.create();\n matrix.rotate(transform, transform, axisAngle);\n matrix.translate(transform, transform, [polar.cx, polar.cy]);\n position = graphic.applyTransform([coord, -labelMargin], transform);\n var labelRotation = axisModel.getModel('axisLabel').get('rotate') || 0;\n // @ts-ignore\n var labelLayout = AxisBuilder.innerTextLayout(axisAngle, labelRotation * Math.PI / 180, -1);\n align = labelLayout.textAlign;\n verticalAlign = labelLayout.textVerticalAlign;\n } else {\n // angle axis\n var r = radiusExtent[1];\n position = polar.coordToPoint([r + labelMargin, coord]);\n var cx = polar.cx;\n var cy = polar.cy;\n align = Math.abs(position[0] - cx) / r < 0.3 ? 'center' : position[0] > cx ? 'left' : 'right';\n verticalAlign = Math.abs(position[1] - cy) / r < 0.3 ? 'middle' : position[1] > cy ? 'top' : 'bottom';\n }\n return {\n position: position,\n align: align,\n verticalAlign: verticalAlign\n };\n}\nvar pointerShapeBuilder = {\n line: function (axis, polar, coordValue, otherExtent) {\n return axis.dim === 'angle' ? {\n type: 'Line',\n shape: viewHelper.makeLineShape(polar.coordToPoint([otherExtent[0], coordValue]), polar.coordToPoint([otherExtent[1], coordValue]))\n } : {\n type: 'Circle',\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: coordValue\n }\n };\n },\n shadow: function (axis, polar, coordValue, otherExtent) {\n var bandWidth = Math.max(1, axis.getBandWidth());\n var radian = Math.PI / 180;\n return axis.dim === 'angle' ? {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, otherExtent[0], otherExtent[1],\n // In ECharts y is negative if angle is positive\n (-coordValue - bandWidth / 2) * radian, (-coordValue + bandWidth / 2) * radian)\n } : {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, coordValue - bandWidth / 2, coordValue + bandWidth / 2, 0, Math.PI * 2)\n };\n }\n};\nexport default PolarAxisPointer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar PolarModel = /** @class */function (_super) {\n __extends(PolarModel, _super);\n function PolarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PolarModel.type;\n return _this;\n }\n PolarModel.prototype.findAxisModel = function (axisType) {\n var foundAxisModel;\n var ecModel = this.ecModel;\n ecModel.eachComponent(axisType, function (axisModel) {\n if (axisModel.getCoordSysModel() === this) {\n foundAxisModel = axisModel;\n }\n }, this);\n return foundAxisModel;\n };\n PolarModel.type = 'polar';\n PolarModel.dependencies = ['radiusAxis', 'angleAxis'];\n PolarModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '80%'\n };\n return PolarModel;\n}(ComponentModel);\nexport default PolarModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nvar PolarAxisModel = /** @class */function (_super) {\n __extends(PolarAxisModel, _super);\n function PolarAxisModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PolarAxisModel.prototype.getCoordSysModel = function () {\n return this.getReferringComponents('polar', SINGLE_REFERRING).models[0];\n };\n PolarAxisModel.type = 'polarAxis';\n return PolarAxisModel;\n}(ComponentModel);\nzrUtil.mixin(PolarAxisModel, AxisModelCommonMixin);\nexport { PolarAxisModel };\nvar AngleAxisModel = /** @class */function (_super) {\n __extends(AngleAxisModel, _super);\n function AngleAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AngleAxisModel.type;\n return _this;\n }\n AngleAxisModel.type = 'angleAxis';\n return AngleAxisModel;\n}(PolarAxisModel);\nexport { AngleAxisModel };\nvar RadiusAxisModel = /** @class */function (_super) {\n __extends(RadiusAxisModel, _super);\n function RadiusAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadiusAxisModel.type;\n return _this;\n }\n RadiusAxisModel.type = 'radiusAxis';\n return RadiusAxisModel;\n}(PolarAxisModel);\nexport { RadiusAxisModel };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar RadiusAxis = /** @class */function (_super) {\n __extends(RadiusAxis, _super);\n function RadiusAxis(scale, radiusExtent) {\n return _super.call(this, 'radius', scale, radiusExtent) || this;\n }\n RadiusAxis.prototype.pointToData = function (point, clamp) {\n return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1];\n };\n return RadiusAxis;\n}(Axis);\nRadiusAxis.prototype.dataToRadius = Axis.prototype.dataToCoord;\nRadiusAxis.prototype.radiusToData = Axis.prototype.coordToData;\nexport default RadiusAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport Axis from '../Axis.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nvar AngleAxis = /** @class */function (_super) {\n __extends(AngleAxis, _super);\n function AngleAxis(scale, angleExtent) {\n return _super.call(this, 'angle', scale, angleExtent || [0, 360]) || this;\n }\n AngleAxis.prototype.pointToData = function (point, clamp) {\n return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1];\n };\n /**\n * Only be called in category axis.\n * Angle axis uses text height to decide interval\n *\n * @override\n * @return {number} Auto interval for cateogry axis tick and label\n */\n AngleAxis.prototype.calculateCategoryInterval = function () {\n var axis = this;\n var labelModel = axis.getLabelModel();\n var ordinalScale = axis.scale;\n var ordinalExtent = ordinalScale.getExtent();\n // Providing this method is for optimization:\n // avoid generating a long array by `getTicks`\n // in large category data case.\n var tickCount = ordinalScale.count();\n if (ordinalExtent[1] - ordinalExtent[0] < 1) {\n return 0;\n }\n var tickValue = ordinalExtent[0];\n var unitSpan = axis.dataToCoord(tickValue + 1) - axis.dataToCoord(tickValue);\n var unitH = Math.abs(unitSpan);\n // Not precise, just use height as text width\n // and each distance from axis line yet.\n var rect = textContain.getBoundingRect(tickValue == null ? '' : tickValue + '', labelModel.getFont(), 'center', 'top');\n var maxH = Math.max(rect.height, 7);\n var dh = maxH / unitH;\n // 0/0 is NaN, 1/0 is Infinity.\n isNaN(dh) && (dh = Infinity);\n var interval = Math.max(0, Math.floor(dh));\n var cache = inner(axis.model);\n var lastAutoInterval = cache.lastAutoInterval;\n var lastTickCount = cache.lastTickCount;\n // Use cache to keep interval stable while moving zoom window,\n // otherwise the calculated interval might jitter when the zoom\n // window size is close to the interval-changing size.\n if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1\n // Always choose the bigger one, otherwise the critical\n // point is not the same when zooming in or zooming out.\n && lastAutoInterval > interval) {\n interval = lastAutoInterval;\n }\n // Only update cache if cache not used, otherwise the\n // changing of interval is too insensitive.\n else {\n cache.lastTickCount = tickCount;\n cache.lastAutoInterval = interval;\n }\n return interval;\n };\n return AngleAxis;\n}(Axis);\nAngleAxis.prototype.dataToAngle = Axis.prototype.dataToCoord;\nAngleAxis.prototype.angleToData = Axis.prototype.coordToData;\nexport default AngleAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport RadiusAxis from './RadiusAxis.js';\nimport AngleAxis from './AngleAxis.js';\nexport var polarDimensions = ['radius', 'angle'];\nvar Polar = /** @class */function () {\n function Polar(name) {\n this.dimensions = polarDimensions;\n this.type = 'polar';\n /**\n * x of polar center\n */\n this.cx = 0;\n /**\n * y of polar center\n */\n this.cy = 0;\n this._radiusAxis = new RadiusAxis();\n this._angleAxis = new AngleAxis();\n this.axisPointerEnabled = true;\n this.name = name || '';\n this._radiusAxis.polar = this._angleAxis.polar = this;\n }\n /**\n * If contain coord\n */\n Polar.prototype.containPoint = function (point) {\n var coord = this.pointToCoord(point);\n return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]);\n };\n /**\n * If contain data\n */\n Polar.prototype.containData = function (data) {\n return this._radiusAxis.containData(data[0]) && this._angleAxis.containData(data[1]);\n };\n Polar.prototype.getAxis = function (dim) {\n var key = '_' + dim + 'Axis';\n return this[key];\n };\n Polar.prototype.getAxes = function () {\n return [this._radiusAxis, this._angleAxis];\n };\n /**\n * Get axes by type of scale\n */\n Polar.prototype.getAxesByScale = function (scaleType) {\n var axes = [];\n var angleAxis = this._angleAxis;\n var radiusAxis = this._radiusAxis;\n angleAxis.scale.type === scaleType && axes.push(angleAxis);\n radiusAxis.scale.type === scaleType && axes.push(radiusAxis);\n return axes;\n };\n Polar.prototype.getAngleAxis = function () {\n return this._angleAxis;\n };\n Polar.prototype.getRadiusAxis = function () {\n return this._radiusAxis;\n };\n Polar.prototype.getOtherAxis = function (axis) {\n var angleAxis = this._angleAxis;\n return axis === angleAxis ? this._radiusAxis : angleAxis;\n };\n /**\n * Base axis will be used on stacking.\n *\n */\n Polar.prototype.getBaseAxis = function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAngleAxis();\n };\n Polar.prototype.getTooltipAxes = function (dim) {\n var baseAxis = dim != null && dim !== 'auto' ? this.getAxis(dim) : this.getBaseAxis();\n return {\n baseAxes: [baseAxis],\n otherAxes: [this.getOtherAxis(baseAxis)]\n };\n };\n /**\n * Convert a single data item to (x, y) point.\n * Parameter data is an array which the first element is radius and the second is angle\n */\n Polar.prototype.dataToPoint = function (data, clamp, out) {\n return this.coordToPoint([this._radiusAxis.dataToRadius(data[0], clamp), this._angleAxis.dataToAngle(data[1], clamp)], out);\n };\n /**\n * Convert a (x, y) point to data\n */\n Polar.prototype.pointToData = function (point, clamp, out) {\n out = out || [];\n var coord = this.pointToCoord(point);\n out[0] = this._radiusAxis.radiusToData(coord[0], clamp);\n out[1] = this._angleAxis.angleToData(coord[1], clamp);\n return out;\n };\n /**\n * Convert a (x, y) point to (radius, angle) coord\n */\n Polar.prototype.pointToCoord = function (point) {\n var dx = point[0] - this.cx;\n var dy = point[1] - this.cy;\n var angleAxis = this.getAngleAxis();\n var extent = angleAxis.getExtent();\n var minAngle = Math.min(extent[0], extent[1]);\n var maxAngle = Math.max(extent[0], extent[1]);\n // Fix fixed extent in polarCreator\n // FIXME\n angleAxis.inverse ? minAngle = maxAngle - 360 : maxAngle = minAngle + 360;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx) / Math.PI * 180;\n // move to angleExtent\n var dir = radian < minAngle ? 1 : -1;\n while (radian < minAngle || radian > maxAngle) {\n radian += dir * 360;\n }\n return [radius, radian];\n };\n /**\n * Convert a (radius, angle) coord to (x, y) point\n */\n Polar.prototype.coordToPoint = function (coord, out) {\n out = out || [];\n var radius = coord[0];\n var radian = coord[1] / 180 * Math.PI;\n out[0] = Math.cos(radian) * radius + this.cx;\n // Inverse the y\n out[1] = -Math.sin(radian) * radius + this.cy;\n return out;\n };\n /**\n * Get ring area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n */\n Polar.prototype.getArea = function () {\n var angleAxis = this.getAngleAxis();\n var radiusAxis = this.getRadiusAxis();\n var radiusExtent = radiusAxis.getExtent().slice();\n radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse();\n var angleExtent = angleAxis.getExtent();\n var RADIAN = Math.PI / 180;\n var EPSILON = 1e-4;\n return {\n cx: this.cx,\n cy: this.cy,\n r0: radiusExtent[0],\n r: radiusExtent[1],\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse,\n contain: function (x, y) {\n // It's a ring shape.\n // Start angle and end angle don't matter\n var dx = x - this.cx;\n var dy = y - this.cy;\n var d2 = dx * dx + dy * dy;\n var r = this.r;\n var r0 = this.r0;\n // minus a tiny value 1e-4 in double side to avoid being clipped unexpectedly\n // r == r0 contain nothing\n return r !== r0 && d2 - EPSILON <= r * r && d2 + EPSILON >= r0 * r0;\n },\n // As the bounding box\n x: this.cx - radiusExtent[1],\n y: this.cy - radiusExtent[1],\n width: radiusExtent[1] * 2,\n height: radiusExtent[1] * 2\n };\n };\n Polar.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.dataToPoint(value) : null;\n };\n Polar.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.pointToData(pixel) : null;\n };\n return Polar;\n}();\nfunction getCoordSys(finder) {\n var seriesModel = finder.seriesModel;\n var polarModel = finder.polarModel;\n return polarModel && polarModel.coordinateSystem || seriesModel && seriesModel.coordinateSystem;\n}\nexport default Polar;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO Axis scale\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Polar, { polarDimensions } from './Polar.js';\nimport { parsePercent } from '../../util/number.js';\nimport { createScaleByModel, niceScaleExtent, getDataDimensionsOnAxis } from '../../coord/axisHelper.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nimport { createBoxLayoutReference } from '../../util/layout.js';\n/**\n * Resize method bound to the polar\n */\nfunction resizePolar(polar, polarModel, api) {\n var center = polarModel.get('center');\n var refContainer = createBoxLayoutReference(polarModel, api).refContainer;\n polar.cx = parsePercent(center[0], refContainer.width) + refContainer.x;\n polar.cy = parsePercent(center[1], refContainer.height) + refContainer.y;\n var radiusAxis = polar.getRadiusAxis();\n var size = Math.min(refContainer.width, refContainer.height) / 2;\n var radius = polarModel.get('radius');\n if (radius == null) {\n radius = [0, '100%'];\n } else if (!zrUtil.isArray(radius)) {\n // r0 = 0\n radius = [0, radius];\n }\n var parsedRadius = [parsePercent(radius[0], size), parsePercent(radius[1], size)];\n radiusAxis.inverse ? radiusAxis.setExtent(parsedRadius[1], parsedRadius[0]) : radiusAxis.setExtent(parsedRadius[0], parsedRadius[1]);\n}\n/**\n * Update polar\n */\nfunction updatePolarScale(ecModel, api) {\n var polar = this;\n var angleAxis = polar.getAngleAxis();\n var radiusAxis = polar.getRadiusAxis();\n // Reset scale\n angleAxis.scale.setExtent(Infinity, -Infinity);\n radiusAxis.scale.setExtent(Infinity, -Infinity);\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.coordinateSystem === polar) {\n var data_1 = seriesModel.getData();\n zrUtil.each(getDataDimensionsOnAxis(data_1, 'radius'), function (dim) {\n radiusAxis.scale.unionExtentFromData(data_1, dim);\n });\n zrUtil.each(getDataDimensionsOnAxis(data_1, 'angle'), function (dim) {\n angleAxis.scale.unionExtentFromData(data_1, dim);\n });\n }\n });\n niceScaleExtent(angleAxis.scale, angleAxis.model);\n niceScaleExtent(radiusAxis.scale, radiusAxis.model);\n // Fix extent of category angle axis\n if (angleAxis.type === 'category' && !angleAxis.onBand) {\n var extent = angleAxis.getExtent();\n var diff = 360 / angleAxis.scale.count();\n angleAxis.inverse ? extent[1] += diff : extent[1] -= diff;\n angleAxis.setExtent(extent[0], extent[1]);\n }\n}\nfunction isAngleAxisModel(axisModel) {\n return axisModel.mainType === 'angleAxis';\n}\n/**\n * Set common axis properties\n */\nfunction setAxis(axis, axisModel) {\n var _a;\n axis.type = axisModel.get('type');\n axis.scale = createScaleByModel(axisModel);\n axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category';\n axis.inverse = axisModel.get('inverse');\n if (isAngleAxisModel(axisModel)) {\n axis.inverse = axis.inverse !== axisModel.get('clockwise');\n var startAngle = axisModel.get('startAngle');\n var endAngle = (_a = axisModel.get('endAngle')) !== null && _a !== void 0 ? _a : startAngle + (axis.inverse ? -360 : 360);\n axis.setExtent(startAngle, endAngle);\n }\n // Inject axis instance\n axisModel.axis = axis;\n axis.model = axisModel;\n}\nvar polarCreator = {\n dimensions: polarDimensions,\n create: function (ecModel, api) {\n var polarList = [];\n ecModel.eachComponent('polar', function (polarModel, idx) {\n var polar = new Polar(idx + '');\n // Inject resize and update method\n polar.update = updatePolarScale;\n var radiusAxis = polar.getRadiusAxis();\n var angleAxis = polar.getAngleAxis();\n var radiusAxisModel = polarModel.findAxisModel('radiusAxis');\n var angleAxisModel = polarModel.findAxisModel('angleAxis');\n setAxis(radiusAxis, radiusAxisModel);\n setAxis(angleAxis, angleAxisModel);\n resizePolar(polar, polarModel, api);\n polarList.push(polar);\n polarModel.coordinateSystem = polar;\n polar.model = polarModel;\n });\n // Inject coordinateSystem to series\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'polar') {\n var polarModel = seriesModel.getReferringComponents('polar', SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!polarModel) {\n throw new Error('Polar \"' + zrUtil.retrieve(seriesModel.get('polarIndex'), seriesModel.get('polarId'), 0) + '\" not found');\n }\n }\n seriesModel.coordinateSystem = polarModel.coordinateSystem;\n }\n });\n return polarList;\n }\n};\nexport default polarCreator;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport Model from '../../model/Model.js';\nimport AxisView from './AxisView.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport { getECData } from '../../util/innerStore.js';\nvar elementList = ['axisLine', 'axisLabel', 'axisTick', 'minorTick', 'splitLine', 'minorSplitLine', 'splitArea'];\nfunction getAxisLineShape(polar, rExtent, angle) {\n rExtent[1] > rExtent[0] && (rExtent = rExtent.slice().reverse());\n var start = polar.coordToPoint([rExtent[0], angle]);\n var end = polar.coordToPoint([rExtent[1], angle]);\n return {\n x1: start[0],\n y1: start[1],\n x2: end[0],\n y2: end[1]\n };\n}\nfunction getRadiusIdx(polar) {\n var radiusAxis = polar.getRadiusAxis();\n return radiusAxis.inverse ? 0 : 1;\n}\n// Remove the last tick which will overlap the first tick\nfunction fixAngleOverlap(list) {\n var firstItem = list[0];\n var lastItem = list[list.length - 1];\n if (firstItem && lastItem && Math.abs(Math.abs(firstItem.coord - lastItem.coord) - 360) < 1e-4) {\n list.pop();\n }\n}\nvar AngleAxisView = /** @class */function (_super) {\n __extends(AngleAxisView, _super);\n function AngleAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AngleAxisView.type;\n _this.axisPointerClass = 'PolarAxisPointer';\n return _this;\n }\n AngleAxisView.prototype.render = function (angleAxisModel, ecModel) {\n this.group.removeAll();\n if (!angleAxisModel.get('show')) {\n return;\n }\n var angleAxis = angleAxisModel.axis;\n var polar = angleAxis.polar;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var ticksAngles = angleAxis.getTicksCoords({\n breakTicks: 'none'\n });\n var minorTickAngles = angleAxis.getMinorTicksCoords();\n var labels = zrUtil.map(angleAxis.getViewLabels(), function (labelItem) {\n labelItem = zrUtil.clone(labelItem);\n var scale = angleAxis.scale;\n var tickValue = scale.type === 'ordinal' ? scale.getRawOrdinalNumber(labelItem.tickValue) : labelItem.tickValue;\n labelItem.coord = angleAxis.dataToCoord(tickValue);\n return labelItem;\n });\n fixAngleOverlap(labels);\n fixAngleOverlap(ticksAngles);\n zrUtil.each(elementList, function (name) {\n if (angleAxisModel.get([name, 'show']) && (!angleAxis.scale.isBlank() || name === 'axisLine')) {\n angelAxisElementsBuilders[name](this.group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels);\n }\n }, this);\n };\n AngleAxisView.type = 'angleAxis';\n return AngleAxisView;\n}(AxisView);\nvar angelAxisElementsBuilders = {\n axisLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var lineStyleModel = angleAxisModel.getModel(['axisLine', 'lineStyle']);\n var angleAxis = polar.getAngleAxis();\n var RADIAN = Math.PI / 180;\n var angleExtent = angleAxis.getExtent();\n // extent id of the axis radius (r0 and r)\n var rId = getRadiusIdx(polar);\n var r0Id = rId ? 0 : 1;\n var shape;\n var shapeType = Math.abs(angleExtent[1] - angleExtent[0]) === 360 ? 'Circle' : 'Arc';\n if (radiusExtent[r0Id] === 0) {\n shape = new graphic[shapeType]({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: radiusExtent[rId],\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse\n },\n style: lineStyleModel.getLineStyle(),\n z2: 1,\n silent: true\n });\n } else {\n shape = new graphic.Ring({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: radiusExtent[rId],\n r0: radiusExtent[r0Id]\n },\n style: lineStyleModel.getLineStyle(),\n z2: 1,\n silent: true\n });\n }\n shape.style.fill = null;\n group.add(shape);\n },\n axisTick: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var tickModel = angleAxisModel.getModel('axisTick');\n var tickLen = (tickModel.get('inside') ? -1 : 1) * tickModel.get('length');\n var radius = radiusExtent[getRadiusIdx(polar)];\n var lines = zrUtil.map(ticksAngles, function (tickAngleItem) {\n return new graphic.Line({\n shape: getAxisLineShape(polar, [radius, radius + tickLen], tickAngleItem.coord)\n });\n });\n group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults(tickModel.getModel('lineStyle').getLineStyle(), {\n stroke: angleAxisModel.get(['axisLine', 'lineStyle', 'color'])\n })\n }));\n },\n minorTick: function (group, angleAxisModel, polar, tickAngles, minorTickAngles, radiusExtent) {\n if (!minorTickAngles.length) {\n return;\n }\n var tickModel = angleAxisModel.getModel('axisTick');\n var minorTickModel = angleAxisModel.getModel('minorTick');\n var tickLen = (tickModel.get('inside') ? -1 : 1) * minorTickModel.get('length');\n var radius = radiusExtent[getRadiusIdx(polar)];\n var lines = [];\n for (var i = 0; i < minorTickAngles.length; i++) {\n for (var k = 0; k < minorTickAngles[i].length; k++) {\n lines.push(new graphic.Line({\n shape: getAxisLineShape(polar, [radius, radius + tickLen], minorTickAngles[i][k].coord)\n }));\n }\n }\n group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults(minorTickModel.getModel('lineStyle').getLineStyle(), zrUtil.defaults(tickModel.getLineStyle(), {\n stroke: angleAxisModel.get(['axisLine', 'lineStyle', 'color'])\n }))\n }));\n },\n axisLabel: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels) {\n var rawCategoryData = angleAxisModel.getCategories(true);\n var commonLabelModel = angleAxisModel.getModel('axisLabel');\n var labelMargin = commonLabelModel.get('margin');\n var triggerEvent = angleAxisModel.get('triggerEvent');\n // Use length of ticksAngles because it may remove the last tick to avoid overlapping\n zrUtil.each(labels, function (labelItem, idx) {\n var labelModel = commonLabelModel;\n var tickValue = labelItem.tickValue;\n var r = radiusExtent[getRadiusIdx(polar)];\n var p = polar.coordToPoint([r + labelMargin, labelItem.coord]);\n var cx = polar.cx;\n var cy = polar.cy;\n var labelTextAlign = Math.abs(p[0] - cx) / r < 0.3 ? 'center' : p[0] > cx ? 'left' : 'right';\n var labelTextVerticalAlign = Math.abs(p[1] - cy) / r < 0.3 ? 'middle' : p[1] > cy ? 'top' : 'bottom';\n if (rawCategoryData && rawCategoryData[tickValue]) {\n var rawCategoryItem = rawCategoryData[tickValue];\n if (zrUtil.isObject(rawCategoryItem) && rawCategoryItem.textStyle) {\n labelModel = new Model(rawCategoryItem.textStyle, commonLabelModel, commonLabelModel.ecModel);\n }\n }\n var textEl = new graphic.Text({\n silent: AxisBuilder.isLabelSilent(angleAxisModel),\n style: createTextStyle(labelModel, {\n x: p[0],\n y: p[1],\n fill: labelModel.getTextColor() || angleAxisModel.get(['axisLine', 'lineStyle', 'color']),\n text: labelItem.formattedLabel,\n align: labelTextAlign,\n verticalAlign: labelTextVerticalAlign\n })\n });\n group.add(textEl);\n graphic.setTooltipConfig({\n el: textEl,\n componentModel: angleAxisModel,\n itemName: labelItem.formattedLabel,\n formatterParamsExtra: {\n isTruncated: function () {\n return textEl.isTruncated;\n },\n value: labelItem.rawLabel,\n tickIndex: idx\n }\n });\n // Pack data for mouse event\n if (triggerEvent) {\n var eventData = AxisBuilder.makeAxisEventDataBase(angleAxisModel);\n eventData.targetType = 'axisLabel';\n eventData.value = labelItem.rawLabel;\n getECData(textEl).eventData = eventData;\n }\n }, this);\n },\n splitLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var splitLineModel = angleAxisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var lineCount = 0;\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var splitLines = [];\n for (var i = 0; i < ticksAngles.length; i++) {\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic.Line({\n shape: getAxisLineShape(polar, radiusExtent, ticksAngles[i].coord)\n }));\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitLines.length; i++) {\n group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length]\n }, lineStyleModel.getLineStyle()),\n silent: true,\n z: angleAxisModel.get('z')\n }));\n }\n },\n minorSplitLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n if (!minorTickAngles.length) {\n return;\n }\n var minorSplitLineModel = angleAxisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var lines = [];\n for (var i = 0; i < minorTickAngles.length; i++) {\n for (var k = 0; k < minorTickAngles[i].length; k++) {\n lines.push(new graphic.Line({\n shape: getAxisLineShape(polar, radiusExtent, minorTickAngles[i][k].coord)\n }));\n }\n }\n group.add(graphic.mergePath(lines, {\n style: lineStyleModel.getLineStyle(),\n silent: true,\n z: angleAxisModel.get('z')\n }));\n },\n splitArea: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n if (!ticksAngles.length) {\n return;\n }\n var splitAreaModel = angleAxisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var lineCount = 0;\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n var splitAreas = [];\n var RADIAN = Math.PI / 180;\n var prevAngle = -ticksAngles[0].coord * RADIAN;\n var r0 = Math.min(radiusExtent[0], radiusExtent[1]);\n var r1 = Math.max(radiusExtent[0], radiusExtent[1]);\n var clockwise = angleAxisModel.get('clockwise');\n for (var i = 1, len = ticksAngles.length; i <= len; i++) {\n var coord = i === len ? ticksAngles[0].coord : ticksAngles[i].coord;\n var colorIndex = lineCount++ % areaColors.length;\n splitAreas[colorIndex] = splitAreas[colorIndex] || [];\n splitAreas[colorIndex].push(new graphic.Sector({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r0: r0,\n r: r1,\n startAngle: prevAngle,\n endAngle: -coord * RADIAN,\n clockwise: clockwise\n },\n silent: true\n }));\n prevAngle = -coord * RADIAN;\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitAreas.length; i++) {\n group.add(graphic.mergePath(splitAreas[i], {\n style: zrUtil.defaults({\n fill: areaColors[i % areaColors.length]\n }, areaStyleModel.getAreaStyle()),\n silent: true\n }));\n }\n }\n};\nexport default AngleAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport AxisView from './AxisView.js';\nvar selfBuilderAttrs = ['splitLine', 'splitArea', 'minorSplitLine'];\nvar RadiusAxisView = /** @class */function (_super) {\n __extends(RadiusAxisView, _super);\n function RadiusAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadiusAxisView.type;\n _this.axisPointerClass = 'PolarAxisPointer';\n return _this;\n }\n RadiusAxisView.prototype.render = function (radiusAxisModel, ecModel, api) {\n this.group.removeAll();\n if (!radiusAxisModel.get('show')) {\n return;\n }\n var oldAxisGroup = this._axisGroup;\n var newAxisGroup = this._axisGroup = new graphic.Group();\n this.group.add(newAxisGroup);\n var radiusAxis = radiusAxisModel.axis;\n var polar = radiusAxis.polar;\n var angleAxis = polar.getAngleAxis();\n var ticksCoords = radiusAxis.getTicksCoords();\n var minorTicksCoords = radiusAxis.getMinorTicksCoords();\n var axisAngle = angleAxis.getExtent()[0];\n var radiusExtent = radiusAxis.getExtent();\n var layout = layoutAxis(polar, radiusAxisModel, axisAngle);\n var axisBuilder = new AxisBuilder(radiusAxisModel, api, layout);\n axisBuilder.build();\n newAxisGroup.add(axisBuilder.group);\n graphic.groupTransition(oldAxisGroup, newAxisGroup, radiusAxisModel);\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (radiusAxisModel.get([name, 'show']) && !radiusAxis.scale.isBlank()) {\n axisElementBuilders[name](this.group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords);\n }\n }, this);\n };\n RadiusAxisView.type = 'radiusAxis';\n return RadiusAxisView;\n}(AxisView);\nvar axisElementBuilders = {\n splitLine: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {\n var splitLineModel = radiusAxisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var lineCount = 0;\n var angleAxis = polar.getAngleAxis();\n var RADIAN = Math.PI / 180;\n var angleExtent = angleAxis.getExtent();\n var shapeType = Math.abs(angleExtent[1] - angleExtent[0]) === 360 ? 'Circle' : 'Arc';\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var splitLines = [];\n for (var i = 0; i < ticksCoords.length; i++) {\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic[shapeType]({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n // ensure circle radius >= 0\n r: Math.max(ticksCoords[i].coord, 0),\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse\n }\n }));\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitLines.length; i++) {\n group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length],\n fill: null\n }, lineStyleModel.getLineStyle()),\n silent: true\n }));\n }\n },\n minorSplitLine: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords) {\n if (!minorTicksCoords.length) {\n return;\n }\n var minorSplitLineModel = radiusAxisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var lines = [];\n for (var i = 0; i < minorTicksCoords.length; i++) {\n for (var k = 0; k < minorTicksCoords[i].length; k++) {\n lines.push(new graphic.Circle({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: minorTicksCoords[i][k].coord\n }\n }));\n }\n }\n group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults({\n fill: null\n }, lineStyleModel.getLineStyle()),\n silent: true\n }));\n },\n splitArea: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {\n if (!ticksCoords.length) {\n return;\n }\n var splitAreaModel = radiusAxisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var lineCount = 0;\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n var splitAreas = [];\n var prevRadius = ticksCoords[0].coord;\n for (var i = 1; i < ticksCoords.length; i++) {\n var colorIndex = lineCount++ % areaColors.length;\n splitAreas[colorIndex] = splitAreas[colorIndex] || [];\n splitAreas[colorIndex].push(new graphic.Sector({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r0: prevRadius,\n r: ticksCoords[i].coord,\n startAngle: 0,\n endAngle: Math.PI * 2\n },\n silent: true\n }));\n prevRadius = ticksCoords[i].coord;\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitAreas.length; i++) {\n group.add(graphic.mergePath(splitAreas[i], {\n style: zrUtil.defaults({\n fill: areaColors[i % areaColors.length]\n }, areaStyleModel.getAreaStyle()),\n silent: true\n }));\n }\n }\n};\n/**\n * @inner\n */\nfunction layoutAxis(polar, radiusAxisModel, axisAngle) {\n return {\n position: [polar.cx, polar.cy],\n rotation: axisAngle / 180 * Math.PI,\n labelDirection: -1,\n tickDirection: -1,\n nameDirection: 1,\n labelRotate: radiusAxisModel.getModel('axisLabel').get('rotate'),\n // Over splitLine and splitArea\n z2: 1\n };\n}\nexport default RadiusAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parsePercent } from '../util/number.js';\nimport { isDimensionStacked } from '../data/helper/dataStackHelper.js';\nfunction getSeriesStackId(seriesModel) {\n return seriesModel.get('stack') || '__ec_stack_' + seriesModel.seriesIndex;\n}\nfunction getAxisKey(polar, axis) {\n return axis.dim + polar.model.componentIndex;\n}\nfunction barLayoutPolar(seriesType, ecModel, api) {\n var lastStackCoords = {};\n var barWidthAndOffset = calRadialBar(zrUtil.filter(ecModel.getSeriesByType(seriesType), function (seriesModel) {\n return !ecModel.isSeriesFiltered(seriesModel) && seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'polar';\n }));\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n // Check series coordinate, do layout for polar only\n if (seriesModel.coordinateSystem.type !== 'polar') {\n return;\n }\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var stackId = getSeriesStackId(seriesModel);\n var columnLayoutInfo = barWidthAndOffset[axisKey][stackId];\n var columnOffset = columnLayoutInfo.offset;\n var columnWidth = columnLayoutInfo.width;\n var valueAxis = polar.getOtherAxis(baseAxis);\n var cx = seriesModel.coordinateSystem.cx;\n var cy = seriesModel.coordinateSystem.cy;\n var barMinHeight = seriesModel.get('barMinHeight') || 0;\n var barMinAngle = seriesModel.get('barMinAngle') || 0;\n lastStackCoords[stackId] = lastStackCoords[stackId] || [];\n var valueDim = data.mapDimension(valueAxis.dim);\n var baseDim = data.mapDimension(baseAxis.dim);\n var stacked = isDimensionStacked(data, valueDim /* , baseDim */);\n var clampLayout = baseAxis.dim !== 'radius' || !seriesModel.get('roundCap', true);\n var valueAxisModel = valueAxis.model;\n var startValue = valueAxisModel.get('startValue');\n var valueAxisStart = valueAxis.dataToCoord(startValue || 0);\n for (var idx = 0, len = data.count(); idx < len; idx++) {\n var value = data.get(valueDim, idx);\n var baseValue = data.get(baseDim, idx);\n var sign = value >= 0 ? 'p' : 'n';\n var baseCoord = valueAxisStart;\n // Because of the barMinHeight, we can not use the value in\n // stackResultDimension directly.\n // Only ordinal axis can be stacked.\n if (stacked) {\n if (!lastStackCoords[stackId][baseValue]) {\n lastStackCoords[stackId][baseValue] = {\n p: valueAxisStart,\n n: valueAxisStart // Negative stack\n };\n }\n // Should also consider #4243\n baseCoord = lastStackCoords[stackId][baseValue][sign];\n }\n var r0 = void 0;\n var r = void 0;\n var startAngle = void 0;\n var endAngle = void 0;\n // radial sector\n if (valueAxis.dim === 'radius') {\n var radiusSpan = valueAxis.dataToCoord(value) - valueAxisStart;\n var angle = baseAxis.dataToCoord(baseValue);\n if (Math.abs(radiusSpan) < barMinHeight) {\n radiusSpan = (radiusSpan < 0 ? -1 : 1) * barMinHeight;\n }\n r0 = baseCoord;\n r = baseCoord + radiusSpan;\n startAngle = angle - columnOffset;\n endAngle = startAngle - columnWidth;\n stacked && (lastStackCoords[stackId][baseValue][sign] = r);\n }\n // tangential sector\n else {\n var angleSpan = valueAxis.dataToCoord(value, clampLayout) - valueAxisStart;\n var radius = baseAxis.dataToCoord(baseValue);\n if (Math.abs(angleSpan) < barMinAngle) {\n angleSpan = (angleSpan < 0 ? -1 : 1) * barMinAngle;\n }\n r0 = radius + columnOffset;\n r = r0 + columnWidth;\n startAngle = baseCoord;\n endAngle = baseCoord + angleSpan;\n // if the previous stack is at the end of the ring,\n // add a round to differentiate it from origin\n // let extent = angleAxis.getExtent();\n // let stackCoord = angle;\n // if (stackCoord === extent[0] && value > 0) {\n // stackCoord = extent[1];\n // }\n // else if (stackCoord === extent[1] && value < 0) {\n // stackCoord = extent[0];\n // }\n stacked && (lastStackCoords[stackId][baseValue][sign] = endAngle);\n }\n data.setItemLayout(idx, {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n // Consider that positive angle is anti-clockwise,\n // while positive radian of sector is clockwise\n startAngle: -startAngle * Math.PI / 180,\n endAngle: -endAngle * Math.PI / 180,\n /**\n * Keep the same logic with bar in catesion: use end value to\n * control direction. Notice that if clockwise is true (by\n * default), the sector will always draw clockwisely, no matter\n * whether endAngle is greater or less than startAngle.\n */\n clockwise: startAngle >= endAngle\n });\n }\n });\n}\n/**\n * Calculate bar width and offset for radial bar charts\n */\nfunction calRadialBar(barSeries) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[axisKey] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[axisKey] = columnsOnAxis;\n var stackId = getSeriesStackId(seriesModel);\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n // Find if any auto calculated bar exceeded maxBarWidth\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n });\n // Recalculate width again\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}\nexport default barLayoutPolar;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { use } from '../../extension.js';\nimport AxisView from '../axis/AxisView.js';\nimport PolarAxisPointer from '../axisPointer/PolarAxisPointer.js';\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport PolarModel from '../../coord/polar/PolarModel.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport { AngleAxisModel, RadiusAxisModel } from '../../coord/polar/AxisModel.js';\nimport polarCreator from '../../coord/polar/polarCreator.js';\nimport AngleAxisView from '../axis/AngleAxisView.js';\nimport RadiusAxisView from '../axis/RadiusAxisView.js';\nimport ComponentView from '../../view/Component.js';\nimport { curry } from 'zrender/lib/core/util.js';\nimport barLayoutPolar from '../../layout/barPolar.js';\nvar angleAxisExtraOption = {\n startAngle: 90,\n clockwise: true,\n splitNumber: 12,\n axisLabel: {\n rotate: 0\n }\n};\nvar radiusAxisExtraOption = {\n splitNumber: 5\n};\nvar PolarView = /** @class */function (_super) {\n __extends(PolarView, _super);\n function PolarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PolarView.type;\n return _this;\n }\n PolarView.type = 'polar';\n return PolarView;\n}(ComponentView);\nexport function install(registers) {\n use(installAxisPointer);\n AxisView.registerAxisPointerClass('PolarAxisPointer', PolarAxisPointer);\n registers.registerCoordinateSystem('polar', polarCreator);\n registers.registerComponentModel(PolarModel);\n registers.registerComponentView(PolarView);\n // Model and view for angleAxis and radiusAxis\n axisModelCreator(registers, 'angle', AngleAxisModel, angleAxisExtraOption);\n axisModelCreator(registers, 'radius', RadiusAxisModel, radiusAxisExtraOption);\n registers.registerComponentView(AngleAxisView);\n registers.registerComponentView(RadiusAxisView);\n registers.registerLayout(curry(barLayoutPolar, 'bar'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { getLayoutParams, sizeCalculable, mergeLayoutParam } from '../../util/layout.js';\nimport tokens from '../../visual/tokens.js';\nvar CalendarModel = /** @class */function (_super) {\n __extends(CalendarModel, _super);\n function CalendarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CalendarModel.type;\n return _this;\n }\n /**\n * @override\n */\n CalendarModel.prototype.init = function (option, parentModel, ecModel) {\n var inputPositionParams = getLayoutParams(option);\n _super.prototype.init.apply(this, arguments);\n mergeAndNormalizeLayoutParams(option, inputPositionParams);\n };\n /**\n * @override\n */\n CalendarModel.prototype.mergeOption = function (option) {\n _super.prototype.mergeOption.apply(this, arguments);\n mergeAndNormalizeLayoutParams(this.option, option);\n };\n CalendarModel.prototype.getCellSize = function () {\n // Has been normalized\n return this.option.cellSize;\n };\n CalendarModel.type = 'calendar';\n CalendarModel.layoutMode = 'box';\n CalendarModel.defaultOption = {\n // zlevel: 0,\n // TODO: theoretically, the z of the calendar should be lower\n // than series, but we don't want the series to be displayed\n // on top of the borders like month split line. To align with\n // the effect of previous versions, we set the z to 2 for now\n // until better solution is found.\n z: 2,\n left: 80,\n top: 60,\n cellSize: 20,\n // horizontal vertical\n orient: 'horizontal',\n // month separate line style\n splitLine: {\n show: true,\n lineStyle: {\n color: tokens.color.axisLine,\n width: 1,\n type: 'solid'\n }\n },\n // rect style temporarily unused emphasis\n itemStyle: {\n color: tokens.color.neutral00,\n borderWidth: 1,\n borderColor: tokens.color.neutral10\n },\n // week text style\n dayLabel: {\n show: true,\n firstDay: 0,\n // start end\n position: 'start',\n margin: tokens.size.s,\n color: tokens.color.secondary\n },\n // month text style\n monthLabel: {\n show: true,\n // start end\n position: 'start',\n margin: tokens.size.s,\n // center or left\n align: 'center',\n formatter: null,\n color: tokens.color.secondary\n },\n // year text style\n yearLabel: {\n show: true,\n // top bottom left right\n position: null,\n margin: tokens.size.xl,\n formatter: null,\n color: tokens.color.quaternary,\n fontFamily: 'sans-serif',\n fontWeight: 'bolder',\n fontSize: 20\n }\n };\n return CalendarModel;\n}(ComponentModel);\nfunction mergeAndNormalizeLayoutParams(target, raw) {\n // Normalize cellSize\n var cellSize = target.cellSize;\n var cellSizeArr;\n if (!zrUtil.isArray(cellSize)) {\n cellSizeArr = target.cellSize = [cellSize, cellSize];\n } else {\n cellSizeArr = cellSize;\n }\n if (cellSizeArr.length === 1) {\n cellSizeArr[1] = cellSizeArr[0];\n }\n var ignoreSize = zrUtil.map([0, 1], function (hvIdx) {\n // If user have set `width` or both `left` and `right`, cellSizeArr\n // will be automatically set to 'auto', otherwise the default\n // setting of cellSizeArr will make `width` setting not work.\n if (sizeCalculable(raw, hvIdx)) {\n cellSizeArr[hvIdx] = 'auto';\n }\n return cellSizeArr[hvIdx] != null && cellSizeArr[hvIdx] !== 'auto';\n });\n mergeLayoutParam(target, raw, {\n type: 'box',\n ignoreSize: ignoreSize\n });\n}\nexport default CalendarModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { isString, extend, map, isFunction } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { formatTplSimple } from '../../util/format.js';\nimport { parsePercent } from '../../util/number.js';\nimport ComponentView from '../../view/Component.js';\nimport { getLocaleModel } from '../../core/locale.js';\nvar CalendarView = /** @class */function (_super) {\n __extends(CalendarView, _super);\n function CalendarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CalendarView.type;\n return _this;\n }\n CalendarView.prototype.render = function (calendarModel, ecModel, api) {\n var group = this.group;\n group.removeAll();\n var coordSys = calendarModel.coordinateSystem;\n // range info\n var rangeData = coordSys.getRangeInfo();\n var orient = coordSys.getOrient();\n // locale\n var localeModel = ecModel.getLocaleModel();\n this._renderDayRect(calendarModel, rangeData, group);\n // _renderLines must be called prior to following function\n this._renderLines(calendarModel, rangeData, orient, group);\n this._renderYearText(calendarModel, rangeData, orient, group);\n this._renderMonthText(calendarModel, localeModel, orient, group);\n this._renderWeekText(calendarModel, localeModel, rangeData, orient, group);\n };\n // render day rect\n CalendarView.prototype._renderDayRect = function (calendarModel, rangeData, group) {\n var coordSys = calendarModel.coordinateSystem;\n var itemRectStyleModel = calendarModel.getModel('itemStyle').getItemStyle();\n var sw = coordSys.getCellWidth();\n var sh = coordSys.getCellHeight();\n for (var i = rangeData.start.time; i <= rangeData.end.time; i = coordSys.getNextNDay(i, 1).time) {\n var point = coordSys.dataToCalendarLayout([i], false).tl;\n // every rect\n var rect = new graphic.Rect({\n shape: {\n x: point[0],\n y: point[1],\n width: sw,\n height: sh\n },\n cursor: 'default',\n style: itemRectStyleModel\n });\n group.add(rect);\n }\n };\n // render separate line\n CalendarView.prototype._renderLines = function (calendarModel, rangeData, orient, group) {\n var self = this;\n var coordSys = calendarModel.coordinateSystem;\n var lineStyleModel = calendarModel.getModel(['splitLine', 'lineStyle']).getLineStyle();\n var show = calendarModel.get(['splitLine', 'show']);\n var lineWidth = lineStyleModel.lineWidth;\n this._tlpoints = [];\n this._blpoints = [];\n this._firstDayOfMonth = [];\n this._firstDayPoints = [];\n var firstDay = rangeData.start;\n for (var i = 0; firstDay.time <= rangeData.end.time; i++) {\n addPoints(firstDay.formatedDate);\n if (i === 0) {\n firstDay = coordSys.getDateInfo(rangeData.start.y + '-' + rangeData.start.m);\n }\n var date = firstDay.date;\n date.setMonth(date.getMonth() + 1);\n firstDay = coordSys.getDateInfo(date);\n }\n addPoints(coordSys.getNextNDay(rangeData.end.time, 1).formatedDate);\n function addPoints(date) {\n self._firstDayOfMonth.push(coordSys.getDateInfo(date));\n self._firstDayPoints.push(coordSys.dataToCalendarLayout([date], false).tl);\n var points = self._getLinePointsOfOneWeek(calendarModel, date, orient);\n self._tlpoints.push(points[0]);\n self._blpoints.push(points[points.length - 1]);\n show && self._drawSplitline(points, lineStyleModel, group);\n }\n // render top/left line\n show && this._drawSplitline(self._getEdgesPoints(self._tlpoints, lineWidth, orient), lineStyleModel, group);\n // render bottom/right line\n show && this._drawSplitline(self._getEdgesPoints(self._blpoints, lineWidth, orient), lineStyleModel, group);\n };\n // get points at both ends\n CalendarView.prototype._getEdgesPoints = function (points, lineWidth, orient) {\n var rs = [points[0].slice(), points[points.length - 1].slice()];\n var idx = orient === 'horizontal' ? 0 : 1;\n // both ends of the line are extend half lineWidth\n rs[0][idx] = rs[0][idx] - lineWidth / 2;\n rs[1][idx] = rs[1][idx] + lineWidth / 2;\n return rs;\n };\n // render split line\n CalendarView.prototype._drawSplitline = function (points, lineStyle, group) {\n var poyline = new graphic.Polyline({\n z2: 20,\n shape: {\n points: points\n },\n style: lineStyle\n });\n group.add(poyline);\n };\n // render month line of one week points\n CalendarView.prototype._getLinePointsOfOneWeek = function (calendarModel, date, orient) {\n var coordSys = calendarModel.coordinateSystem;\n var parsedDate = coordSys.getDateInfo(date);\n var points = [];\n for (var i = 0; i < 7; i++) {\n var tmpD = coordSys.getNextNDay(parsedDate.time, i);\n var point = coordSys.dataToCalendarLayout([tmpD.time], false);\n points[2 * tmpD.day] = point.tl;\n points[2 * tmpD.day + 1] = point[orient === 'horizontal' ? 'bl' : 'tr'];\n }\n return points;\n };\n CalendarView.prototype._formatterLabel = function (formatter, params) {\n if (isString(formatter) && formatter) {\n return formatTplSimple(formatter, params);\n }\n if (isFunction(formatter)) {\n return formatter(params);\n }\n return params.nameMap;\n };\n CalendarView.prototype._yearTextPositionControl = function (textEl, point, orient, position, margin) {\n var x = point[0];\n var y = point[1];\n var aligns = ['center', 'bottom'];\n if (position === 'bottom') {\n y += margin;\n aligns = ['center', 'top'];\n } else if (position === 'left') {\n x -= margin;\n } else if (position === 'right') {\n x += margin;\n aligns = ['center', 'top'];\n } else {\n // top\n y -= margin;\n }\n var rotate = 0;\n if (position === 'left' || position === 'right') {\n rotate = Math.PI / 2;\n }\n return {\n rotation: rotate,\n x: x,\n y: y,\n style: {\n align: aligns[0],\n verticalAlign: aligns[1]\n }\n };\n };\n // render year\n CalendarView.prototype._renderYearText = function (calendarModel, rangeData, orient, group) {\n var yearLabel = calendarModel.getModel('yearLabel');\n if (!yearLabel.get('show')) {\n return;\n }\n var margin = yearLabel.get('margin');\n var pos = yearLabel.get('position');\n if (!pos) {\n pos = orient !== 'horizontal' ? 'top' : 'left';\n }\n var points = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]];\n var xc = (points[0][0] + points[1][0]) / 2;\n var yc = (points[0][1] + points[1][1]) / 2;\n var idx = orient === 'horizontal' ? 0 : 1;\n var posPoints = {\n top: [xc, points[idx][1]],\n bottom: [xc, points[1 - idx][1]],\n left: [points[1 - idx][0], yc],\n right: [points[idx][0], yc]\n };\n var name = rangeData.start.y;\n if (+rangeData.end.y > +rangeData.start.y) {\n name = name + '-' + rangeData.end.y;\n }\n var formatter = yearLabel.get('formatter');\n var params = {\n start: rangeData.start.y,\n end: rangeData.end.y,\n nameMap: name\n };\n var content = this._formatterLabel(formatter, params);\n var yearText = new graphic.Text({\n z2: 30,\n style: createTextStyle(yearLabel, {\n text: content\n }),\n silent: yearLabel.get('silent')\n });\n yearText.attr(this._yearTextPositionControl(yearText, posPoints[pos], orient, pos, margin));\n group.add(yearText);\n };\n CalendarView.prototype._monthTextPositionControl = function (point, isCenter, orient, position, margin) {\n var align = 'left';\n var vAlign = 'top';\n var x = point[0];\n var y = point[1];\n if (orient === 'horizontal') {\n y = y + margin;\n if (isCenter) {\n align = 'center';\n }\n if (position === 'start') {\n vAlign = 'bottom';\n }\n } else {\n x = x + margin;\n if (isCenter) {\n vAlign = 'middle';\n }\n if (position === 'start') {\n align = 'right';\n }\n }\n return {\n x: x,\n y: y,\n align: align,\n verticalAlign: vAlign\n };\n };\n // render month and year text\n CalendarView.prototype._renderMonthText = function (calendarModel, localeModel, orient, group) {\n var monthLabel = calendarModel.getModel('monthLabel');\n if (!monthLabel.get('show')) {\n return;\n }\n var nameMap = monthLabel.get('nameMap');\n var margin = monthLabel.get('margin');\n var pos = monthLabel.get('position');\n var align = monthLabel.get('align');\n var termPoints = [this._tlpoints, this._blpoints];\n if (!nameMap || isString(nameMap)) {\n if (nameMap) {\n // case-sensitive\n localeModel = getLocaleModel(nameMap) || localeModel;\n }\n // PENDING\n // for ZH locale, original form is `一月` but current form is `1月`\n nameMap = localeModel.get(['time', 'monthAbbr']) || [];\n }\n var idx = pos === 'start' ? 0 : 1;\n var axis = orient === 'horizontal' ? 0 : 1;\n margin = pos === 'start' ? -margin : margin;\n var isCenter = align === 'center';\n var labelSilent = monthLabel.get('silent');\n for (var i = 0; i < termPoints[idx].length - 1; i++) {\n var tmp = termPoints[idx][i].slice();\n var firstDay = this._firstDayOfMonth[i];\n if (isCenter) {\n var firstDayPoints = this._firstDayPoints[i];\n tmp[axis] = (firstDayPoints[axis] + termPoints[0][i + 1][axis]) / 2;\n }\n var formatter = monthLabel.get('formatter');\n var name_1 = nameMap[+firstDay.m - 1];\n var params = {\n yyyy: firstDay.y,\n yy: (firstDay.y + '').slice(2),\n MM: firstDay.m,\n M: +firstDay.m,\n nameMap: name_1\n };\n var content = this._formatterLabel(formatter, params);\n var monthText = new graphic.Text({\n z2: 30,\n style: extend(createTextStyle(monthLabel, {\n text: content\n }), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin)),\n silent: labelSilent\n });\n group.add(monthText);\n }\n };\n CalendarView.prototype._weekTextPositionControl = function (point, orient, position, margin, cellSize) {\n var align = 'center';\n var vAlign = 'middle';\n var x = point[0];\n var y = point[1];\n var isStart = position === 'start';\n if (orient === 'horizontal') {\n x = x + margin + (isStart ? 1 : -1) * cellSize[0] / 2;\n align = isStart ? 'right' : 'left';\n } else {\n y = y + margin + (isStart ? 1 : -1) * cellSize[1] / 2;\n vAlign = isStart ? 'bottom' : 'top';\n }\n return {\n x: x,\n y: y,\n align: align,\n verticalAlign: vAlign\n };\n };\n // render weeks\n CalendarView.prototype._renderWeekText = function (calendarModel, localeModel, rangeData, orient, group) {\n var dayLabel = calendarModel.getModel('dayLabel');\n if (!dayLabel.get('show')) {\n return;\n }\n var coordSys = calendarModel.coordinateSystem;\n var pos = dayLabel.get('position');\n var nameMap = dayLabel.get('nameMap');\n var margin = dayLabel.get('margin');\n var firstDayOfWeek = coordSys.getFirstDayOfWeek();\n if (!nameMap || isString(nameMap)) {\n if (nameMap) {\n // case-sensitive\n localeModel = getLocaleModel(nameMap) || localeModel;\n }\n // Use the first letter of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file\n var dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']);\n nameMap = dayOfWeekShort || map(localeModel.get(['time', 'dayOfWeekAbbr']), function (val) {\n return val[0];\n });\n }\n var start = coordSys.getNextNDay(rangeData.end.time, 7 - rangeData.lweek).time;\n var cellSize = [coordSys.getCellWidth(), coordSys.getCellHeight()];\n margin = parsePercent(margin, Math.min(cellSize[1], cellSize[0]));\n if (pos === 'start') {\n start = coordSys.getNextNDay(rangeData.start.time, -(7 + rangeData.fweek)).time;\n margin = -margin;\n }\n var labelSilent = dayLabel.get('silent');\n for (var i = 0; i < 7; i++) {\n var tmpD = coordSys.getNextNDay(start, i);\n var point = coordSys.dataToCalendarLayout([tmpD.time], false).center;\n var day = i;\n day = Math.abs((i + firstDayOfWeek) % 7);\n var weekText = new graphic.Text({\n z2: 30,\n style: extend(createTextStyle(dayLabel, {\n text: nameMap[day]\n }), this._weekTextPositionControl(point, orient, pos, margin, cellSize)),\n silent: labelSilent\n });\n group.add(weekText);\n }\n };\n CalendarView.type = 'calendar';\n return CalendarView;\n}(ComponentView);\nexport default CalendarView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as layout from '../../util/layout.js';\nimport * as numberUtil from '../../util/number.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { expandOrShrinkRect } from '../../util/graphic.js';\nimport { injectCoordSysByOption, simpleCoordSysInjectionProvider } from '../../core/CoordinateSystem.js';\n// (24*60*60*1000)\nvar PROXIMATE_ONE_DAY = 86400000;\nvar Calendar = /** @class */function () {\n function Calendar(calendarModel, ecModel, api) {\n this.type = 'calendar';\n this.dimensions = Calendar.dimensions;\n // Required in createListFromData\n this.getDimensionsInfo = Calendar.getDimensionsInfo;\n this._model = calendarModel;\n this._update(ecModel, api);\n }\n Calendar.getDimensionsInfo = function () {\n return [{\n name: 'time',\n type: 'time'\n }, 'value'];\n };\n Calendar.prototype.getRangeInfo = function () {\n return this._rangeInfo;\n };\n Calendar.prototype.getModel = function () {\n return this._model;\n };\n Calendar.prototype.getRect = function () {\n return this._rect;\n };\n Calendar.prototype.getCellWidth = function () {\n return this._sw;\n };\n Calendar.prototype.getCellHeight = function () {\n return this._sh;\n };\n Calendar.prototype.getOrient = function () {\n return this._orient;\n };\n /**\n * getFirstDayOfWeek\n *\n * @example\n * 0 : start at Sunday\n * 1 : start at Monday\n *\n * @return {number}\n */\n Calendar.prototype.getFirstDayOfWeek = function () {\n return this._firstDayOfWeek;\n };\n /**\n * get date info\n * }\n */\n Calendar.prototype.getDateInfo = function (date) {\n date = numberUtil.parseDate(date);\n var y = date.getFullYear();\n var m = date.getMonth() + 1;\n var mStr = m < 10 ? '0' + m : '' + m;\n var d = date.getDate();\n var dStr = d < 10 ? '0' + d : '' + d;\n var day = date.getDay();\n day = Math.abs((day + 7 - this.getFirstDayOfWeek()) % 7);\n return {\n y: y + '',\n m: mStr,\n d: dStr,\n day: day,\n time: date.getTime(),\n formatedDate: y + '-' + mStr + '-' + dStr,\n date: date\n };\n };\n Calendar.prototype.getNextNDay = function (date, n) {\n n = n || 0;\n if (n === 0) {\n return this.getDateInfo(date);\n }\n date = new Date(this.getDateInfo(date).time);\n date.setDate(date.getDate() + n);\n return this.getDateInfo(date);\n };\n Calendar.prototype._update = function (ecModel, api) {\n this._firstDayOfWeek = +this._model.getModel('dayLabel').get('firstDay');\n this._orient = this._model.get('orient');\n this._lineWidth = this._model.getModel('itemStyle').getItemStyle().lineWidth || 0;\n this._rangeInfo = this._getRangeInfo(this._initRangeOption());\n var weeks = this._rangeInfo.weeks || 1;\n var whNames = ['width', 'height'];\n var cellSize = this._model.getCellSize().slice();\n var layoutParams = this._model.getBoxLayoutParams();\n var cellNumbers = this._orient === 'horizontal' ? [weeks, 7] : [7, weeks];\n zrUtil.each([0, 1], function (idx) {\n if (cellSizeSpecified(cellSize, idx)) {\n layoutParams[whNames[idx]] = cellSize[idx] * cellNumbers[idx];\n }\n });\n var whGlobal = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var calendarRect = this._rect = layout.getLayoutRect(layoutParams, whGlobal);\n zrUtil.each([0, 1], function (idx) {\n if (!cellSizeSpecified(cellSize, idx)) {\n cellSize[idx] = calendarRect[whNames[idx]] / cellNumbers[idx];\n }\n });\n function cellSizeSpecified(cellSize, idx) {\n return cellSize[idx] != null && cellSize[idx] !== 'auto';\n }\n // Has been calculated out number.\n this._sw = cellSize[0];\n this._sh = cellSize[1];\n };\n /**\n * Convert a time data(time, value) item to (x, y) point.\n */\n // TODO Clamp of calendar is not same with cartesian coordinate systems.\n // It will return NaN if data exceeds.\n Calendar.prototype.dataToPoint = function (data, clamp, out) {\n out = out || [];\n zrUtil.isArray(data) && (data = data[0]);\n clamp == null && (clamp = true);\n var dayInfo = this.getDateInfo(data);\n var range = this._rangeInfo;\n var date = dayInfo.formatedDate;\n // if not in range return [NaN, NaN]\n if (clamp && !(dayInfo.time >= range.start.time && dayInfo.time < range.end.time + PROXIMATE_ONE_DAY)) {\n out[0] = out[1] = NaN;\n return out;\n }\n var week = dayInfo.day;\n var nthWeek = this._getRangeInfo([range.start.time, date]).nthWeek;\n if (this._orient === 'vertical') {\n out[0] = this._rect.x + week * this._sw + this._sw / 2;\n out[1] = this._rect.y + nthWeek * this._sh + this._sh / 2;\n } else {\n out[0] = this._rect.x + nthWeek * this._sw + this._sw / 2;\n out[1] = this._rect.y + week * this._sh + this._sh / 2;\n }\n return out;\n };\n /**\n * Convert a (x, y) point to time data\n */\n Calendar.prototype.pointToData = function (point) {\n var date = this.pointToDate(point);\n return date && date.time;\n };\n Calendar.prototype.dataToLayout = function (data, clamp, out) {\n out = out || {};\n var rect = out.rect = out.rect || {};\n var contentRect = out.contentRect = out.contentRect || {};\n var point = this.dataToPoint(data, clamp);\n rect.x = point[0] - this._sw / 2;\n rect.y = point[1] - this._sh / 2;\n rect.width = this._sw;\n rect.height = this._sh;\n BoundingRect.copy(contentRect, rect);\n expandOrShrinkRect(contentRect, this._lineWidth / 2, true, true);\n return out;\n };\n /**\n * Convert a time date item to (x, y) four point.\n */\n Calendar.prototype.dataToCalendarLayout = function (data, clamp) {\n var point = this.dataToPoint(data, clamp);\n return {\n center: point,\n tl: [point[0] - this._sw / 2, point[1] - this._sh / 2],\n tr: [point[0] + this._sw / 2, point[1] - this._sh / 2],\n br: [point[0] + this._sw / 2, point[1] + this._sh / 2],\n bl: [point[0] - this._sw / 2, point[1] + this._sh / 2]\n };\n };\n /**\n * Convert a (x, y) point to time date\n *\n * @param {Array} point point\n * @return {Object} date\n */\n Calendar.prototype.pointToDate = function (point) {\n var nthX = Math.floor((point[0] - this._rect.x) / this._sw) + 1;\n var nthY = Math.floor((point[1] - this._rect.y) / this._sh) + 1;\n var range = this._rangeInfo.range;\n if (this._orient === 'vertical') {\n return this._getDateByWeeksAndDay(nthY, nthX - 1, range);\n }\n return this._getDateByWeeksAndDay(nthX, nthY - 1, range);\n };\n Calendar.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.dataToPoint(value) : null;\n };\n Calendar.prototype.convertToLayout = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.dataToLayout(value) : null;\n };\n Calendar.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.pointToData(pixel) : null;\n };\n Calendar.prototype.containPoint = function (point) {\n console.warn('Not implemented.');\n return false;\n };\n /**\n * initRange\n * Normalize to an [start, end] array\n */\n Calendar.prototype._initRangeOption = function () {\n var range = this._model.get('range');\n var normalizedRange;\n // Convert [1990] to 1990\n if (zrUtil.isArray(range) && range.length === 1) {\n range = range[0];\n }\n if (!zrUtil.isArray(range)) {\n var rangeStr = range.toString();\n // One year.\n if (/^\\d{4}$/.test(rangeStr)) {\n normalizedRange = [rangeStr + '-01-01', rangeStr + '-12-31'];\n }\n // One month\n if (/^\\d{4}[\\/|-]\\d{1,2}$/.test(rangeStr)) {\n var start = this.getDateInfo(rangeStr);\n var firstDay = start.date;\n firstDay.setMonth(firstDay.getMonth() + 1);\n var end = this.getNextNDay(firstDay, -1);\n normalizedRange = [start.formatedDate, end.formatedDate];\n }\n // One day\n if (/^\\d{4}[\\/|-]\\d{1,2}[\\/|-]\\d{1,2}$/.test(rangeStr)) {\n normalizedRange = [rangeStr, rangeStr];\n }\n } else {\n normalizedRange = range;\n }\n if (!normalizedRange) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.logError('Invalid date range.');\n }\n // Not handling it.\n return range;\n }\n var tmp = this._getRangeInfo(normalizedRange);\n if (tmp.start.time > tmp.end.time) {\n normalizedRange.reverse();\n }\n return normalizedRange;\n };\n /**\n * range info\n *\n * @private\n * @param {Array} range range ['2017-01-01', '2017-07-08']\n * If range[0] > range[1], they will not be reversed.\n * @return {Object} obj\n */\n Calendar.prototype._getRangeInfo = function (range) {\n var parsedRange = [this.getDateInfo(range[0]), this.getDateInfo(range[1])];\n var reversed;\n if (parsedRange[0].time > parsedRange[1].time) {\n reversed = true;\n parsedRange.reverse();\n }\n var allDay = Math.floor(parsedRange[1].time / PROXIMATE_ONE_DAY) - Math.floor(parsedRange[0].time / PROXIMATE_ONE_DAY) + 1;\n // Consider case1 (#11677 #10430):\n // Set the system timezone as \"UK\", set the range to `['2016-07-01', '2016-12-31']`\n // Consider case2:\n // Firstly set system timezone as \"Time Zone: America/Toronto\",\n // ```\n // let first = new Date(1478412000000 - 3600 * 1000 * 2.5);\n // let second = new Date(1478412000000);\n // let allDays = Math.floor(second / ONE_DAY) - Math.floor(first / ONE_DAY) + 1;\n // ```\n // will get wrong result because of DST. So we should fix it.\n var date = new Date(parsedRange[0].time);\n var startDateNum = date.getDate();\n var endDateNum = parsedRange[1].date.getDate();\n date.setDate(startDateNum + allDay - 1);\n // The bias can not over a month, so just compare date.\n var dateNum = date.getDate();\n if (dateNum !== endDateNum) {\n var sign = date.getTime() - parsedRange[1].time > 0 ? 1 : -1;\n while ((dateNum = date.getDate()) !== endDateNum && (date.getTime() - parsedRange[1].time) * sign > 0) {\n allDay -= sign;\n date.setDate(dateNum - sign);\n }\n }\n var weeks = Math.floor((allDay + parsedRange[0].day + 6) / 7);\n var nthWeek = reversed ? -weeks + 1 : weeks - 1;\n reversed && parsedRange.reverse();\n return {\n range: [parsedRange[0].formatedDate, parsedRange[1].formatedDate],\n start: parsedRange[0],\n end: parsedRange[1],\n allDay: allDay,\n weeks: weeks,\n // From 0.\n nthWeek: nthWeek,\n fweek: parsedRange[0].day,\n lweek: parsedRange[1].day\n };\n };\n /**\n * get date by nthWeeks and week day in range\n *\n * @private\n * @param {number} nthWeek the week\n * @param {number} day the week day\n * @param {Array} range [d1, d2]\n * @return {Object}\n */\n Calendar.prototype._getDateByWeeksAndDay = function (nthWeek, day, range) {\n var rangeInfo = this._getRangeInfo(range);\n if (nthWeek > rangeInfo.weeks || nthWeek === 0 && day < rangeInfo.fweek || nthWeek === rangeInfo.weeks && day > rangeInfo.lweek) {\n return null;\n }\n var nthDay = (nthWeek - 1) * 7 - rangeInfo.fweek + day;\n var date = new Date(rangeInfo.start.time);\n date.setDate(+rangeInfo.start.d + nthDay);\n return this.getDateInfo(date);\n };\n Calendar.create = function (ecModel, api) {\n var calendarList = [];\n ecModel.eachComponent('calendar', function (calendarModel) {\n var calendar = new Calendar(calendarModel, ecModel, api);\n calendarList.push(calendar);\n calendarModel.coordinateSystem = calendar;\n });\n // Inject coordinate system\n ecModel.eachComponent(function (mainType, componentModel) {\n injectCoordSysByOption({\n targetModel: componentModel,\n coordSysType: 'calendar',\n coordSysProvider: simpleCoordSysInjectionProvider\n });\n });\n return calendarList;\n };\n Calendar.dimensions = ['time', 'value'];\n return Calendar;\n}();\nfunction getCoordSys(finder) {\n var calendarModel = finder.calendarModel;\n var seriesModel = finder.seriesModel;\n var coordSys = calendarModel ? calendarModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem : null;\n return coordSys;\n}\nexport default Calendar;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport CalendarModel from '../../coord/calendar/CalendarModel.js';\nimport CalendarView from './CalendarView.js';\nimport Calendar from '../../coord/calendar/Calendar.js';\nexport function install(registers) {\n registers.registerComponentModel(CalendarModel);\n registers.registerComponentView(CalendarView);\n registers.registerCoordinateSystem('calendar', Calendar);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nimport ComponentModel from '../../model/Component.js';\nimport { copyLayoutParams, mergeLayoutParam } from '../../util/layout.js';\n;\n;\n;\nexport function setKeyInfoToNewElOption(resultItem, newElOption) {\n var existElOption = resultItem.existing;\n // Set id and type after id assigned.\n newElOption.id = resultItem.keyInfo.id;\n !newElOption.type && existElOption && (newElOption.type = existElOption.type);\n // Set parent id if not specified\n if (newElOption.parentId == null) {\n var newElParentOption = newElOption.parentOption;\n if (newElParentOption) {\n newElOption.parentId = newElParentOption.id;\n } else if (existElOption) {\n newElOption.parentId = existElOption.parentId;\n }\n }\n // Clear\n newElOption.parentOption = null;\n}\nfunction isSetLoc(obj, props) {\n var isSet;\n zrUtil.each(props, function (prop) {\n obj[prop] != null && obj[prop] !== 'auto' && (isSet = true);\n });\n return isSet;\n}\nfunction mergeNewElOptionToExist(existList, index, newElOption) {\n // Update existing options, for `getOption` feature.\n var newElOptCopy = zrUtil.extend({}, newElOption);\n var existElOption = existList[index];\n var $action = newElOption.$action || 'merge';\n if ($action === 'merge') {\n if (existElOption) {\n if (process.env.NODE_ENV !== 'production') {\n var newType = newElOption.type;\n zrUtil.assert(!newType || existElOption.type === newType, 'Please set $action: \"replace\" to change `type`');\n }\n // We can ensure that newElOptCopy and existElOption are not\n // the same object, so `merge` will not change newElOptCopy.\n zrUtil.merge(existElOption, newElOptCopy, true);\n // Rigid body, use ignoreSize.\n mergeLayoutParam(existElOption, newElOptCopy, {\n ignoreSize: true\n });\n // Will be used in render.\n copyLayoutParams(newElOption, existElOption);\n // Copy transition info to new option so it can be used in the transition.\n // DO IT AFTER merge\n copyTransitionInfo(newElOption, existElOption);\n copyTransitionInfo(newElOption, existElOption, 'shape');\n copyTransitionInfo(newElOption, existElOption, 'style');\n copyTransitionInfo(newElOption, existElOption, 'extra');\n // Copy clipPath\n newElOption.clipPath = existElOption.clipPath;\n } else {\n existList[index] = newElOptCopy;\n }\n } else if ($action === 'replace') {\n existList[index] = newElOptCopy;\n } else if ($action === 'remove') {\n // null will be cleaned later.\n existElOption && (existList[index] = null);\n }\n}\nvar TRANSITION_PROPS_TO_COPY = ['transition', 'enterFrom', 'leaveTo'];\nvar ROOT_TRANSITION_PROPS_TO_COPY = TRANSITION_PROPS_TO_COPY.concat(['enterAnimation', 'updateAnimation', 'leaveAnimation']);\nfunction copyTransitionInfo(target, source, targetProp) {\n if (targetProp) {\n if (!target[targetProp] && source[targetProp]) {\n // TODO avoid creating this empty object when there is no transition configuration.\n target[targetProp] = {};\n }\n target = target[targetProp];\n source = source[targetProp];\n }\n if (!target || !source) {\n return;\n }\n var props = targetProp ? TRANSITION_PROPS_TO_COPY : ROOT_TRANSITION_PROPS_TO_COPY;\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n if (target[prop] == null && source[prop] != null) {\n target[prop] = source[prop];\n }\n }\n}\nfunction setLayoutInfoToExist(existItem, newElOption) {\n if (!existItem) {\n return;\n }\n existItem.hv = newElOption.hv = [\n // Rigid body, don't care about `width`.\n isSetLoc(newElOption, ['left', 'right']),\n // Rigid body, don't care about `height`.\n isSetLoc(newElOption, ['top', 'bottom'])];\n // Give default group size. Otherwise layout error may occur.\n if (existItem.type === 'group') {\n var existingGroupOpt = existItem;\n var newGroupOpt = newElOption;\n existingGroupOpt.width == null && (existingGroupOpt.width = newGroupOpt.width = 0);\n existingGroupOpt.height == null && (existingGroupOpt.height = newGroupOpt.height = 0);\n }\n}\nvar GraphicComponentModel = /** @class */function (_super) {\n __extends(GraphicComponentModel, _super);\n function GraphicComponentModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GraphicComponentModel.type;\n _this.preventAutoZ = true;\n return _this;\n }\n GraphicComponentModel.prototype.mergeOption = function (option, ecModel) {\n // Prevent default merge to elements\n var elements = this.option.elements;\n this.option.elements = null;\n _super.prototype.mergeOption.call(this, option, ecModel);\n this.option.elements = elements;\n };\n GraphicComponentModel.prototype.optionUpdated = function (newOption, isInit) {\n var thisOption = this.option;\n var newList = (isInit ? thisOption : newOption).elements;\n var existList = thisOption.elements = isInit ? [] : thisOption.elements;\n var flattenedList = [];\n this._flatten(newList, flattenedList, null);\n var mappingResult = modelUtil.mappingToExists(existList, flattenedList, 'normalMerge');\n // Clear elOptionsToUpdate\n var elOptionsToUpdate = this._elOptionsToUpdate = [];\n zrUtil.each(mappingResult, function (resultItem, index) {\n var newElOption = resultItem.newOption;\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(zrUtil.isObject(newElOption) || resultItem.existing, 'Empty graphic option definition');\n }\n if (!newElOption) {\n return;\n }\n elOptionsToUpdate.push(newElOption);\n setKeyInfoToNewElOption(resultItem, newElOption);\n mergeNewElOptionToExist(existList, index, newElOption);\n setLayoutInfoToExist(existList[index], newElOption);\n }, this);\n // Clean\n thisOption.elements = zrUtil.filter(existList, function (item) {\n // $action should be volatile, otherwise option gotten from\n // `getOption` will contain unexpected $action.\n item && delete item.$action;\n return item != null;\n });\n };\n /**\n * Convert\n * [{\n * type: 'group',\n * id: 'xx',\n * children: [{type: 'circle'}, {type: 'polygon'}]\n * }]\n * to\n * [\n * {type: 'group', id: 'xx'},\n * {type: 'circle', parentId: 'xx'},\n * {type: 'polygon', parentId: 'xx'}\n * ]\n */\n GraphicComponentModel.prototype._flatten = function (optionList, result, parentOption) {\n zrUtil.each(optionList, function (option) {\n if (!option) {\n return;\n }\n if (parentOption) {\n option.parentOption = parentOption;\n }\n result.push(option);\n var children = option.children;\n // here we don't judge if option.type is `group`\n // when new option doesn't provide `type`, it will cause that the children can't be updated.\n if (children && children.length) {\n this._flatten(children, result, option);\n }\n // Deleting for JSON output, and for not affecting group creation.\n delete option.children;\n }, this);\n };\n // FIXME\n // Pass to view using payload? setOption has a payload?\n GraphicComponentModel.prototype.useElOptionsToUpdate = function () {\n var els = this._elOptionsToUpdate;\n // Clear to avoid render duplicately when zooming.\n this._elOptionsToUpdate = null;\n return els;\n };\n GraphicComponentModel.type = 'graphic';\n GraphicComponentModel.defaultOption = {\n elements: []\n // parentId: null\n };\n return GraphicComponentModel;\n}(ComponentModel);\nexport { GraphicComponentModel };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport * as modelUtil from '../../util/model.js';\nimport * as graphicUtil from '../../util/graphic.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport { parsePercent } from '../../util/number.js';\nimport ComponentView from '../../view/Component.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { isEC4CompatibleStyle, convertFromEC4CompatibleStyle } from '../../util/styleCompat.js';\nimport { applyLeaveTransition, applyUpdateTransition, isTransitionAll, updateLeaveTo } from '../../animation/customGraphicTransition.js';\nimport { updateProps } from '../../animation/basicTransition.js';\nimport { applyKeyframeAnimation, stopPreviousKeyframeAnimationAndRestore } from '../../animation/customGraphicKeyframeAnimation.js';\nvar nonShapeGraphicElements = {\n // Reserved but not supported in graphic component.\n path: null,\n compoundPath: null,\n // Supported in graphic component.\n group: graphicUtil.Group,\n image: graphicUtil.Image,\n text: graphicUtil.Text\n};\nexport var inner = modelUtil.makeInner();\n// ------------------------\n// View\n// ------------------------\nvar GraphicComponentView = /** @class */function (_super) {\n __extends(GraphicComponentView, _super);\n function GraphicComponentView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GraphicComponentView.type;\n return _this;\n }\n GraphicComponentView.prototype.init = function () {\n this._elMap = zrUtil.createHashMap();\n };\n GraphicComponentView.prototype.render = function (graphicModel, ecModel, api) {\n // Having leveraged between use cases and algorithm complexity, a very\n // simple layout mechanism is used:\n // The size(width/height) can be determined by itself or its parent (not\n // implemented yet), but can not by its children. (Top-down travel)\n // The location(x/y) can be determined by the bounding rect of itself\n // (can including its descendants or not) and the size of its parent.\n // (Bottom-up travel)\n // When `chart.clear()` or `chart.setOption({...}, true)` with the same id,\n // view will be reused.\n if (graphicModel !== this._lastGraphicModel) {\n this._clear();\n }\n this._lastGraphicModel = graphicModel;\n this._updateElements(graphicModel);\n this._relocate(graphicModel, api);\n };\n /**\n * Update graphic elements.\n */\n GraphicComponentView.prototype._updateElements = function (graphicModel) {\n var elOptionsToUpdate = graphicModel.useElOptionsToUpdate();\n if (!elOptionsToUpdate) {\n return;\n }\n var elMap = this._elMap;\n var rootGroup = this.group;\n var globalZ = graphicModel.get('z');\n var globalZLevel = graphicModel.get('zlevel');\n // Top-down tranverse to assign graphic settings to each elements.\n zrUtil.each(elOptionsToUpdate, function (elOption) {\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var elExisting = id != null ? elMap.get(id) : null;\n var parentId = modelUtil.convertOptionIdName(elOption.parentId, null);\n var targetElParent = parentId != null ? elMap.get(parentId) : rootGroup;\n var elType = elOption.type;\n var elOptionStyle = elOption.style;\n if (elType === 'text' && elOptionStyle) {\n // In top/bottom mode, textVerticalAlign should not be used, which cause\n // inaccurately locating.\n if (elOption.hv && elOption.hv[1]) {\n elOptionStyle.textVerticalAlign = elOptionStyle.textBaseline = elOptionStyle.verticalAlign = elOptionStyle.align = null;\n }\n }\n var textContentOption = elOption.textContent;\n var textConfig = elOption.textConfig;\n if (elOptionStyle && isEC4CompatibleStyle(elOptionStyle, elType, !!textConfig, !!textContentOption)) {\n var convertResult = convertFromEC4CompatibleStyle(elOptionStyle, elType, true);\n if (!textConfig && convertResult.textConfig) {\n textConfig = elOption.textConfig = convertResult.textConfig;\n }\n if (!textContentOption && convertResult.textContent) {\n textContentOption = convertResult.textContent;\n }\n }\n // Remove unnecessary props to avoid potential problems.\n var elOptionCleaned = getCleanedElOption(elOption);\n // For simple, do not support parent change, otherwise reorder is needed.\n if (process.env.NODE_ENV !== 'production') {\n elExisting && zrUtil.assert(targetElParent === elExisting.parent, 'Changing parent is not supported.');\n }\n var $action = elOption.$action || 'merge';\n var isMerge = $action === 'merge';\n var isReplace = $action === 'replace';\n if (isMerge) {\n var isInit = !elExisting;\n var el_1 = elExisting;\n if (isInit) {\n el_1 = createEl(id, targetElParent, elOption.type, elMap);\n } else {\n el_1 && (inner(el_1).isNew = false);\n // Stop and restore before update any other attributes.\n stopPreviousKeyframeAnimationAndRestore(el_1);\n }\n if (el_1) {\n applyUpdateTransition(el_1, elOptionCleaned, graphicModel, {\n isInit: isInit\n });\n updateCommonAttrs(el_1, elOption, globalZ, globalZLevel);\n }\n } else if (isReplace) {\n removeEl(elExisting, elOption, elMap, graphicModel);\n var el_2 = createEl(id, targetElParent, elOption.type, elMap);\n if (el_2) {\n applyUpdateTransition(el_2, elOptionCleaned, graphicModel, {\n isInit: true\n });\n updateCommonAttrs(el_2, elOption, globalZ, globalZLevel);\n }\n } else if ($action === 'remove') {\n updateLeaveTo(elExisting, elOption);\n removeEl(elExisting, elOption, elMap, graphicModel);\n }\n var el = elMap.get(id);\n if (el && textContentOption) {\n if (isMerge) {\n var textContentExisting = el.getTextContent();\n textContentExisting ? textContentExisting.attr(textContentOption) : el.setTextContent(new graphicUtil.Text(textContentOption));\n } else if (isReplace) {\n el.setTextContent(new graphicUtil.Text(textContentOption));\n }\n }\n if (el) {\n var clipPathOption = elOption.clipPath;\n if (clipPathOption) {\n var clipPathType = clipPathOption.type;\n var clipPath = void 0;\n var isInit = false;\n if (isMerge) {\n var oldClipPath = el.getClipPath();\n isInit = !oldClipPath || inner(oldClipPath).type !== clipPathType;\n clipPath = isInit ? newEl(clipPathType) : oldClipPath;\n } else if (isReplace) {\n isInit = true;\n clipPath = newEl(clipPathType);\n }\n el.setClipPath(clipPath);\n applyUpdateTransition(clipPath, clipPathOption, graphicModel, {\n isInit: isInit\n });\n applyKeyframeAnimation(clipPath, clipPathOption.keyframeAnimation, graphicModel);\n }\n var elInner = inner(el);\n el.setTextConfig(textConfig);\n elInner.option = elOption;\n setEventData(el, graphicModel, elOption);\n graphicUtil.setTooltipConfig({\n el: el,\n componentModel: graphicModel,\n itemName: el.name,\n itemTooltipOption: elOption.tooltip\n });\n applyKeyframeAnimation(el, elOption.keyframeAnimation, graphicModel);\n }\n });\n };\n /**\n * Locate graphic elements.\n */\n GraphicComponentView.prototype._relocate = function (graphicModel, api) {\n var elOptions = graphicModel.option.elements;\n var rootGroup = this.group;\n var elMap = this._elMap;\n var apiWidth = api.getWidth();\n var apiHeight = api.getHeight();\n var xy = ['x', 'y'];\n // Top-down to calculate percentage width/height of group\n for (var i = 0; i < elOptions.length; i++) {\n var elOption = elOptions[i];\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var el = id != null ? elMap.get(id) : null;\n if (!el || !el.isGroup) {\n continue;\n }\n var parentEl = el.parent;\n var isParentRoot = parentEl === rootGroup;\n // Like 'position:absolut' in css, default 0.\n var elInner = inner(el);\n var parentElInner = inner(parentEl);\n elInner.width = parsePercent(elInner.option.width, isParentRoot ? apiWidth : parentElInner.width) || 0;\n elInner.height = parsePercent(elInner.option.height, isParentRoot ? apiHeight : parentElInner.height) || 0;\n }\n // Bottom-up tranvese all elements (consider ec resize) to locate elements.\n for (var i = elOptions.length - 1; i >= 0; i--) {\n var elOption = elOptions[i];\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var el = id != null ? elMap.get(id) : null;\n if (!el) {\n continue;\n }\n var parentEl = el.parent;\n var parentElInner = inner(parentEl);\n var containerInfo = parentEl === rootGroup ? {\n width: apiWidth,\n height: apiHeight\n } : {\n width: parentElInner.width,\n height: parentElInner.height\n };\n // PENDING\n // Currently, when `bounding: 'all'`, the union bounding rect of the group\n // does not include the rect of [0, 0, group.width, group.height], which\n // is probably weird for users. Should we make a break change for it?\n var layoutPos = {};\n var layouted = layoutUtil.positionElement(el, elOption, containerInfo, null, {\n hv: elOption.hv,\n boundingMode: elOption.bounding\n }, layoutPos);\n if (!inner(el).isNew && layouted) {\n var transition = elOption.transition;\n var animatePos = {};\n for (var k = 0; k < xy.length; k++) {\n var key = xy[k];\n var val = layoutPos[key];\n if (transition && (isTransitionAll(transition) || zrUtil.indexOf(transition, key) >= 0)) {\n animatePos[key] = val;\n } else {\n el[key] = val;\n }\n }\n updateProps(el, animatePos, graphicModel, 0);\n } else {\n el.attr(layoutPos);\n }\n }\n };\n /**\n * Clear all elements.\n */\n GraphicComponentView.prototype._clear = function () {\n var _this = this;\n var elMap = this._elMap;\n elMap.each(function (el) {\n removeEl(el, inner(el).option, elMap, _this._lastGraphicModel);\n });\n this._elMap = zrUtil.createHashMap();\n };\n GraphicComponentView.prototype.dispose = function () {\n this._clear();\n };\n GraphicComponentView.type = 'graphic';\n return GraphicComponentView;\n}(ComponentView);\nexport { GraphicComponentView };\nfunction newEl(graphicType) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(graphicType, 'graphic type MUST be set');\n }\n var Clz = zrUtil.hasOwn(nonShapeGraphicElements, graphicType)\n // Those graphic elements are not shapes. They should not be\n // overwritten by users, so do them first.\n ? nonShapeGraphicElements[graphicType] : graphicUtil.getShapeClass(graphicType);\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(Clz, \"graphic type \" + graphicType + \" can not be found\");\n }\n var el = new Clz({});\n inner(el).type = graphicType;\n return el;\n}\nfunction createEl(id, targetElParent, graphicType, elMap) {\n var el = newEl(graphicType);\n targetElParent.add(el);\n elMap.set(id, el);\n inner(el).id = id;\n inner(el).isNew = true;\n return el;\n}\nfunction removeEl(elExisting, elOption, elMap, graphicModel) {\n var existElParent = elExisting && elExisting.parent;\n if (existElParent) {\n elExisting.type === 'group' && elExisting.traverse(function (el) {\n removeEl(el, elOption, elMap, graphicModel);\n });\n applyLeaveTransition(elExisting, elOption, graphicModel);\n elMap.removeKey(inner(elExisting).id);\n }\n}\nfunction updateCommonAttrs(el, elOption, defaultZ, defaultZlevel) {\n if (!el.isGroup) {\n zrUtil.each([['cursor', Displayable.prototype.cursor],\n // We should not support configure z and zlevel in the element level.\n // But seems we didn't limit it previously. So here still use it to avoid breaking.\n ['zlevel', defaultZlevel || 0], ['z', defaultZ || 0],\n // z2 must not be null/undefined, otherwise sort error may occur.\n ['z2', 0]], function (item) {\n var prop = item[0];\n if (zrUtil.hasOwn(elOption, prop)) {\n el[prop] = zrUtil.retrieve2(elOption[prop], item[1]);\n } else if (el[prop] == null) {\n el[prop] = item[1];\n }\n });\n }\n zrUtil.each(zrUtil.keys(elOption), function (key) {\n // Assign event handlers.\n // PENDING: should enumerate all event names or use pattern matching?\n if (key.indexOf('on') === 0) {\n var val = elOption[key];\n el[key] = zrUtil.isFunction(val) ? val : null;\n }\n });\n if (zrUtil.hasOwn(elOption, 'draggable')) {\n el.draggable = elOption.draggable;\n }\n // Other attributes\n elOption.name != null && (el.name = elOption.name);\n elOption.id != null && (el.id = elOption.id);\n}\n// Remove unnecessary props to avoid potential problems.\nfunction getCleanedElOption(elOption) {\n elOption = zrUtil.extend({}, elOption);\n zrUtil.each(['id', 'parentId', '$action', 'hv', 'bounding', 'textContent', 'clipPath'].concat(layoutUtil.LOCATION_PARAMS), function (name) {\n delete elOption[name];\n });\n return elOption;\n}\nfunction setEventData(el, graphicModel, elOption) {\n var eventData = getECData(el).eventData;\n // Simple optimize for large amount of elements that no need event.\n if (!el.silent && !el.ignore && !eventData) {\n eventData = getECData(el).eventData = {\n componentType: 'graphic',\n componentIndex: graphicModel.componentIndex,\n name: el.name\n };\n }\n // `elOption.info` enables user to mount some info on\n // elements and use them in event handlers.\n if (eventData) {\n eventData.info = elOption.info;\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isArray } from 'zrender/lib/core/util.js';\nimport { GraphicComponentModel } from './GraphicModel.js';\nimport { GraphicComponentView } from './GraphicView.js';\nexport function install(registers) {\n registers.registerComponentModel(GraphicComponentModel);\n registers.registerComponentView(GraphicComponentView);\n registers.registerPreprocessor(function (option) {\n var graphicOption = option.graphic;\n // Convert\n // {graphic: [{left: 10, type: 'circle'}, ...]}\n // or\n // {graphic: {left: 10, type: 'circle'}}\n // to\n // {graphic: [{elements: [{left: 10, type: 'circle'}, ...]}]}\n if (isArray(graphicOption)) {\n if (!graphicOption[0] || !graphicOption[0].elements) {\n option.graphic = [{\n elements: graphicOption\n }];\n } else {\n // Only one graphic instance can be instantiated. (We don't\n // want that too many views are created in echarts._viewMap.)\n option.graphic = [option.graphic[0]];\n }\n } else if (graphicOption && !graphicOption.elements) {\n option.graphic = [{\n elements: [graphicOption]\n }];\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { indexOf, createHashMap, assert } from 'zrender/lib/core/util.js';\nexport var DATA_ZOOM_AXIS_DIMENSIONS = ['x', 'y', 'radius', 'angle', 'single'];\n// Supported coords.\n// FIXME: polar has been broken (but rarely used).\nvar SERIES_COORDS = ['cartesian2d', 'polar', 'singleAxis'];\nexport function isCoordSupported(seriesModel) {\n var coordType = seriesModel.get('coordinateSystem');\n return indexOf(SERIES_COORDS, coordType) >= 0;\n}\nexport function getAxisMainType(axisDim) {\n if (process.env.NODE_ENV !== 'production') {\n assert(axisDim);\n }\n return axisDim + 'Axis';\n}\nexport function getAxisIndexPropName(axisDim) {\n if (process.env.NODE_ENV !== 'production') {\n assert(axisDim);\n }\n return axisDim + 'AxisIndex';\n}\nexport function getAxisIdPropName(axisDim) {\n if (process.env.NODE_ENV !== 'production') {\n assert(axisDim);\n }\n return axisDim + 'AxisId';\n}\n/**\n * If two dataZoomModels has the same axis controlled, we say that they are 'linked'.\n * This function finds all linked dataZoomModels start from the given payload.\n */\nexport function findEffectedDataZooms(ecModel, payload) {\n // Key: `DataZoomAxisDimension`\n var axisRecords = createHashMap();\n var effectedModels = [];\n // Key: uid of dataZoomModel\n var effectedModelMap = createHashMap();\n // Find the dataZooms specified by payload.\n ecModel.eachComponent({\n mainType: 'dataZoom',\n query: payload\n }, function (dataZoomModel) {\n if (!effectedModelMap.get(dataZoomModel.uid)) {\n addToEffected(dataZoomModel);\n }\n });\n // Start from the given dataZoomModels, travel the graph to find\n // all of the linked dataZoom models.\n var foundNewLink;\n do {\n foundNewLink = false;\n ecModel.eachComponent('dataZoom', processSingle);\n } while (foundNewLink);\n function processSingle(dataZoomModel) {\n if (!effectedModelMap.get(dataZoomModel.uid) && isLinked(dataZoomModel)) {\n addToEffected(dataZoomModel);\n foundNewLink = true;\n }\n }\n function addToEffected(dataZoom) {\n effectedModelMap.set(dataZoom.uid, true);\n effectedModels.push(dataZoom);\n markAxisControlled(dataZoom);\n }\n function isLinked(dataZoomModel) {\n var isLink = false;\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n var axisIdxArr = axisRecords.get(axisDim);\n if (axisIdxArr && axisIdxArr[axisIndex]) {\n isLink = true;\n }\n });\n return isLink;\n }\n function markAxisControlled(dataZoomModel) {\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n (axisRecords.get(axisDim) || axisRecords.set(axisDim, []))[axisIndex] = true;\n });\n }\n return effectedModels;\n}\n/**\n * Find the first target coordinate system.\n * Available after model built.\n *\n * @return Like {\n * grid: [\n * {model: coord0, axisModels: [axis1, axis3], coordIndex: 1},\n * {model: coord1, axisModels: [axis0, axis2], coordIndex: 0},\n * ...\n * ], // cartesians must not be null/undefined.\n * polar: [\n * {model: coord0, axisModels: [axis4], coordIndex: 0},\n * ...\n * ], // polars must not be null/undefined.\n * singleAxis: [\n * {model: coord0, axisModels: [], coordIndex: 0}\n * ]\n * }\n */\nexport function collectReferCoordSysModelInfo(dataZoomModel) {\n var ecModel = dataZoomModel.ecModel;\n var coordSysInfoWrap = {\n infoList: [],\n infoMap: createHashMap()\n };\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n var axisModel = ecModel.getComponent(getAxisMainType(axisDim), axisIndex);\n if (!axisModel) {\n return;\n }\n var coordSysModel = axisModel.getCoordSysModel();\n if (!coordSysModel) {\n return;\n }\n var coordSysUid = coordSysModel.uid;\n var coordSysInfo = coordSysInfoWrap.infoMap.get(coordSysUid);\n if (!coordSysInfo) {\n coordSysInfo = {\n model: coordSysModel,\n axisModels: []\n };\n coordSysInfoWrap.infoList.push(coordSysInfo);\n coordSysInfoWrap.infoMap.set(coordSysUid, coordSysInfo);\n }\n coordSysInfo.axisModels.push(axisModel);\n });\n return coordSysInfoWrap;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { each, createHashMap, merge, assert } from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { getAxisMainType, DATA_ZOOM_AXIS_DIMENSIONS } from './helper.js';\nimport { MULTIPLE_REFERRING, SINGLE_REFERRING } from '../../util/model.js';\nvar DataZoomAxisInfo = /** @class */function () {\n function DataZoomAxisInfo() {\n this.indexList = [];\n this.indexMap = [];\n }\n DataZoomAxisInfo.prototype.add = function (axisCmptIdx) {\n // Remove duplication.\n if (!this.indexMap[axisCmptIdx]) {\n this.indexList.push(axisCmptIdx);\n this.indexMap[axisCmptIdx] = true;\n }\n };\n return DataZoomAxisInfo;\n}();\nvar DataZoomModel = /** @class */function (_super) {\n __extends(DataZoomModel, _super);\n function DataZoomModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = DataZoomModel.type;\n _this._autoThrottle = true;\n _this._noTarget = true;\n /**\n * It is `[rangeModeForMin, rangeModeForMax]`.\n * The optional values for `rangeMode`:\n * + `'value'` mode: the axis extent will always be determined by\n * `dataZoom.startValue` and `dataZoom.endValue`, despite\n * how data like and how `axis.min` and `axis.max` are.\n * + `'percent'` mode: `100` represents 100% of the `[dMin, dMax]`,\n * where `dMin` is `axis.min` if `axis.min` specified, otherwise `data.extent[0]`,\n * and `dMax` is `axis.max` if `axis.max` specified, otherwise `data.extent[1]`.\n * Axis extent will be determined by the result of the percent of `[dMin, dMax]`.\n *\n * For example, when users are using dynamic data (update data periodically via `setOption`),\n * if in `'value`' mode, the window will be kept in a fixed value range despite how\n * data are appended, while if in `'percent'` mode, whe window range will be changed alone with\n * the appended data (suppose `axis.min` and `axis.max` are not specified).\n */\n _this._rangePropMode = ['percent', 'percent'];\n return _this;\n }\n DataZoomModel.prototype.init = function (option, parentModel, ecModel) {\n var inputRawOption = retrieveRawOption(option);\n /**\n * Suppose a \"main process\" start at the point that model prepared (that is,\n * model initialized or merged or method called in `action`).\n * We should keep the `main process` idempotent, that is, given a set of values\n * on `option`, we get the same result.\n *\n * But sometimes, values on `option` will be updated for providing users\n * a \"final calculated value\" (`dataZoomProcessor` will do that). Those value\n * should not be the base/input of the `main process`.\n *\n * So in that case we should save and keep the input of the `main process`\n * separately, called `settledOption`.\n *\n * For example, consider the case:\n * (Step_1) brush zoom the grid by `toolbox.dataZoom`,\n * where the original input `option.startValue`, `option.endValue` are earsed by\n * calculated value.\n * (Step)2) click the legend to hide and show a series,\n * where the new range is calculated by the earsed `startValue` and `endValue`,\n * which brings incorrect result.\n */\n this.settledOption = inputRawOption;\n this.mergeDefaultAndTheme(option, ecModel);\n this._doInit(inputRawOption);\n };\n DataZoomModel.prototype.mergeOption = function (newOption) {\n var inputRawOption = retrieveRawOption(newOption);\n // FIX #2591\n merge(this.option, newOption, true);\n merge(this.settledOption, inputRawOption, true);\n this._doInit(inputRawOption);\n };\n DataZoomModel.prototype._doInit = function (inputRawOption) {\n var thisOption = this.option;\n this._setDefaultThrottle(inputRawOption);\n this._updateRangeUse(inputRawOption);\n var settledOption = this.settledOption;\n each([['start', 'startValue'], ['end', 'endValue']], function (names, index) {\n // start/end has higher priority over startValue/endValue if they\n // both set, but we should make chart.setOption({endValue: 1000})\n // effective, rather than chart.setOption({endValue: 1000, end: null}).\n if (this._rangePropMode[index] === 'value') {\n thisOption[names[0]] = settledOption[names[0]] = null;\n }\n // Otherwise do nothing and use the merge result.\n }, this);\n this._resetTarget();\n };\n DataZoomModel.prototype._resetTarget = function () {\n var optionOrient = this.get('orient', true);\n var targetAxisIndexMap = this._targetAxisInfoMap = createHashMap();\n var hasAxisSpecified = this._fillSpecifiedTargetAxis(targetAxisIndexMap);\n if (hasAxisSpecified) {\n this._orient = optionOrient || this._makeAutoOrientByTargetAxis();\n } else {\n this._orient = optionOrient || 'horizontal';\n this._fillAutoTargetAxisByOrient(targetAxisIndexMap, this._orient);\n }\n this._noTarget = true;\n targetAxisIndexMap.each(function (axisInfo) {\n if (axisInfo.indexList.length) {\n this._noTarget = false;\n }\n }, this);\n };\n DataZoomModel.prototype._fillSpecifiedTargetAxis = function (targetAxisIndexMap) {\n var hasAxisSpecified = false;\n each(DATA_ZOOM_AXIS_DIMENSIONS, function (axisDim) {\n var refering = this.getReferringComponents(getAxisMainType(axisDim), MULTIPLE_REFERRING);\n // When user set axisIndex as a empty array, we think that user specify axisIndex\n // but do not want use auto mode. Because empty array may be encountered when\n // some error occurred.\n if (!refering.specified) {\n return;\n }\n hasAxisSpecified = true;\n var axisInfo = new DataZoomAxisInfo();\n each(refering.models, function (axisModel) {\n axisInfo.add(axisModel.componentIndex);\n });\n targetAxisIndexMap.set(axisDim, axisInfo);\n }, this);\n return hasAxisSpecified;\n };\n DataZoomModel.prototype._fillAutoTargetAxisByOrient = function (targetAxisIndexMap, orient) {\n var ecModel = this.ecModel;\n var needAuto = true;\n // Find axis that parallel to dataZoom as default.\n if (needAuto) {\n var axisDim = orient === 'vertical' ? 'y' : 'x';\n var axisModels = ecModel.findComponents({\n mainType: axisDim + 'Axis'\n });\n setParallelAxis(axisModels, axisDim);\n }\n // Find axis that parallel to dataZoom as default.\n if (needAuto) {\n var axisModels = ecModel.findComponents({\n mainType: 'singleAxis',\n filter: function (axisModel) {\n return axisModel.get('orient', true) === orient;\n }\n });\n setParallelAxis(axisModels, 'single');\n }\n function setParallelAxis(axisModels, axisDim) {\n // At least use the first parallel axis as the target axis.\n var axisModel = axisModels[0];\n if (!axisModel) {\n return;\n }\n var axisInfo = new DataZoomAxisInfo();\n axisInfo.add(axisModel.componentIndex);\n targetAxisIndexMap.set(axisDim, axisInfo);\n needAuto = false;\n // Find parallel axes in the same grid.\n if (axisDim === 'x' || axisDim === 'y') {\n var gridModel_1 = axisModel.getReferringComponents('grid', SINGLE_REFERRING).models[0];\n gridModel_1 && each(axisModels, function (axModel) {\n if (axisModel.componentIndex !== axModel.componentIndex && gridModel_1 === axModel.getReferringComponents('grid', SINGLE_REFERRING).models[0]) {\n axisInfo.add(axModel.componentIndex);\n }\n });\n }\n }\n if (needAuto) {\n // If no parallel axis, find the first category axis as default. (Also consider polar).\n each(DATA_ZOOM_AXIS_DIMENSIONS, function (axisDim) {\n if (!needAuto) {\n return;\n }\n var axisModels = ecModel.findComponents({\n mainType: getAxisMainType(axisDim),\n filter: function (axisModel) {\n return axisModel.get('type', true) === 'category';\n }\n });\n if (axisModels[0]) {\n var axisInfo = new DataZoomAxisInfo();\n axisInfo.add(axisModels[0].componentIndex);\n targetAxisIndexMap.set(axisDim, axisInfo);\n needAuto = false;\n }\n }, this);\n }\n };\n DataZoomModel.prototype._makeAutoOrientByTargetAxis = function () {\n var dim;\n // Find the first axis\n this.eachTargetAxis(function (axisDim) {\n !dim && (dim = axisDim);\n }, this);\n return dim === 'y' ? 'vertical' : 'horizontal';\n };\n DataZoomModel.prototype._setDefaultThrottle = function (inputRawOption) {\n // When first time user set throttle, auto throttle ends.\n if (inputRawOption.hasOwnProperty('throttle')) {\n this._autoThrottle = false;\n }\n if (this._autoThrottle) {\n var globalOption = this.ecModel.option;\n this.option.throttle = globalOption.animation && globalOption.animationDurationUpdate > 0 ? 100 : 20;\n }\n };\n DataZoomModel.prototype._updateRangeUse = function (inputRawOption) {\n var rangePropMode = this._rangePropMode;\n var rangeModeInOption = this.get('rangeMode');\n each([['start', 'startValue'], ['end', 'endValue']], function (names, index) {\n var percentSpecified = inputRawOption[names[0]] != null;\n var valueSpecified = inputRawOption[names[1]] != null;\n if (percentSpecified && !valueSpecified) {\n rangePropMode[index] = 'percent';\n } else if (!percentSpecified && valueSpecified) {\n rangePropMode[index] = 'value';\n } else if (rangeModeInOption) {\n rangePropMode[index] = rangeModeInOption[index];\n } else if (percentSpecified) {\n // percentSpecified && valueSpecified\n rangePropMode[index] = 'percent';\n }\n // else remain its original setting.\n });\n };\n DataZoomModel.prototype.noTarget = function () {\n return this._noTarget;\n };\n DataZoomModel.prototype.getFirstTargetAxisModel = function () {\n var firstAxisModel;\n this.eachTargetAxis(function (axisDim, axisIndex) {\n if (firstAxisModel == null) {\n firstAxisModel = this.ecModel.getComponent(getAxisMainType(axisDim), axisIndex);\n }\n }, this);\n return firstAxisModel;\n };\n /**\n * @param {Function} callback param: axisModel, dimNames, axisIndex, dataZoomModel, ecModel\n */\n DataZoomModel.prototype.eachTargetAxis = function (callback, context) {\n this._targetAxisInfoMap.each(function (axisInfo, axisDim) {\n each(axisInfo.indexList, function (axisIndex) {\n callback.call(context, axisDim, axisIndex);\n });\n });\n };\n /**\n * @return If not found, return null/undefined.\n */\n DataZoomModel.prototype.getAxisProxy = function (axisDim, axisIndex) {\n var axisModel = this.getAxisModel(axisDim, axisIndex);\n if (axisModel) {\n return axisModel.__dzAxisProxy;\n }\n };\n /**\n * @return If not found, return null/undefined.\n */\n DataZoomModel.prototype.getAxisModel = function (axisDim, axisIndex) {\n if (process.env.NODE_ENV !== 'production') {\n assert(axisDim && axisIndex != null);\n }\n var axisInfo = this._targetAxisInfoMap.get(axisDim);\n if (axisInfo && axisInfo.indexMap[axisIndex]) {\n return this.ecModel.getComponent(getAxisMainType(axisDim), axisIndex);\n }\n };\n /**\n * If not specified, set to undefined.\n */\n DataZoomModel.prototype.setRawRange = function (opt) {\n var thisOption = this.option;\n var settledOption = this.settledOption;\n each([['start', 'startValue'], ['end', 'endValue']], function (names) {\n // Consider the pair <start, startValue>:\n // If one has value and the other one is `null/undefined`, we both set them\n // to `settledOption`. This strategy enables the feature to clear the original\n // value in `settledOption` to `null/undefined`.\n // But if both of them are `null/undefined`, we do not set them to `settledOption`\n // and keep `settledOption` with the original value. This strategy enables users to\n // only set <end or endValue> but not set <start or startValue> when calling\n // `dispatchAction`.\n // The pair <end, endValue> is treated in the same way.\n if (opt[names[0]] != null || opt[names[1]] != null) {\n thisOption[names[0]] = settledOption[names[0]] = opt[names[0]];\n thisOption[names[1]] = settledOption[names[1]] = opt[names[1]];\n }\n }, this);\n this._updateRangeUse(opt);\n };\n DataZoomModel.prototype.setCalculatedRange = function (opt) {\n var option = this.option;\n each(['start', 'startValue', 'end', 'endValue'], function (name) {\n option[name] = opt[name];\n });\n };\n DataZoomModel.prototype.getPercentRange = function () {\n var axisProxy = this.findRepresentativeAxisProxy();\n if (axisProxy) {\n return axisProxy.getDataPercentWindow();\n }\n };\n /**\n * For example, chart.getModel().getComponent('dataZoom').getValueRange('y', 0);\n *\n * @return [startValue, endValue] value can only be '-' or finite number.\n */\n DataZoomModel.prototype.getValueRange = function (axisDim, axisIndex) {\n if (axisDim == null && axisIndex == null) {\n var axisProxy = this.findRepresentativeAxisProxy();\n if (axisProxy) {\n return axisProxy.getDataValueWindow();\n }\n } else {\n return this.getAxisProxy(axisDim, axisIndex).getDataValueWindow();\n }\n };\n /**\n * @param axisModel If axisModel given, find axisProxy\n * corresponding to the axisModel\n */\n DataZoomModel.prototype.findRepresentativeAxisProxy = function (axisModel) {\n if (axisModel) {\n return axisModel.__dzAxisProxy;\n }\n // Find the first hosted axisProxy\n var firstProxy;\n var axisDimList = this._targetAxisInfoMap.keys();\n for (var i = 0; i < axisDimList.length; i++) {\n var axisDim = axisDimList[i];\n var axisInfo = this._targetAxisInfoMap.get(axisDim);\n for (var j = 0; j < axisInfo.indexList.length; j++) {\n var proxy = this.getAxisProxy(axisDim, axisInfo.indexList[j]);\n if (proxy.hostedBy(this)) {\n return proxy;\n }\n if (!firstProxy) {\n firstProxy = proxy;\n }\n }\n }\n // If no hosted proxy found, still need to return a proxy.\n // This case always happens in toolbox dataZoom, where axes are all hosted by\n // other dataZooms.\n return firstProxy;\n };\n DataZoomModel.prototype.getRangePropMode = function () {\n return this._rangePropMode.slice();\n };\n DataZoomModel.prototype.getOrient = function () {\n if (process.env.NODE_ENV !== 'production') {\n // Should not be called before initialized.\n assert(this._orient);\n }\n return this._orient;\n };\n DataZoomModel.type = 'dataZoom';\n DataZoomModel.dependencies = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'series', 'toolbox'];\n DataZoomModel.defaultOption = {\n // zlevel: 0,\n z: 4,\n filterMode: 'filter',\n start: 0,\n end: 100\n };\n return DataZoomModel;\n}(ComponentModel);\n/**\n * Retrieve those raw params from option, which will be cached separately,\n * because they will be overwritten by normalized/calculated values in the main\n * process.\n */\nfunction retrieveRawOption(option) {\n var ret = {};\n each(['start', 'end', 'startValue', 'endValue', 'throttle'], function (name) {\n option.hasOwnProperty(name) && (ret[name] = option[name]);\n });\n return ret;\n}\nexport default DataZoomModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomModel from './DataZoomModel.js';\nvar SelectDataZoomModel = /** @class */function (_super) {\n __extends(SelectDataZoomModel, _super);\n function SelectDataZoomModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SelectDataZoomModel.type;\n return _this;\n }\n SelectDataZoomModel.type = 'dataZoom.select';\n return SelectDataZoomModel;\n}(DataZoomModel);\nexport default SelectDataZoomModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nvar DataZoomView = /** @class */function (_super) {\n __extends(DataZoomView, _super);\n function DataZoomView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = DataZoomView.type;\n return _this;\n }\n DataZoomView.prototype.render = function (dataZoomModel, ecModel, api, payload) {\n this.dataZoomModel = dataZoomModel;\n this.ecModel = ecModel;\n this.api = api;\n };\n DataZoomView.type = 'dataZoom';\n return DataZoomView;\n}(ComponentView);\nexport default DataZoomView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomView from './DataZoomView.js';\nvar SelectDataZoomView = /** @class */function (_super) {\n __extends(SelectDataZoomView, _super);\n function SelectDataZoomView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SelectDataZoomView.type;\n return _this;\n }\n SelectDataZoomView.type = 'dataZoom.select';\n return SelectDataZoomView;\n}(DataZoomView);\nexport default SelectDataZoomView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as numberUtil from '../../util/number.js';\nimport sliderMove from '../helper/sliderMove.js';\nimport { unionAxisExtentFromData } from '../../coord/axisHelper.js';\nimport { ensureScaleRawExtentInfo } from '../../coord/scaleRawExtentInfo.js';\nimport { getAxisMainType, isCoordSupported } from './helper.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nvar each = zrUtil.each;\nvar asc = numberUtil.asc;\n/**\n * Operate single axis.\n * One axis can only operated by one axis operator.\n * Different dataZoomModels may be defined to operate the same axis.\n * (i.e. 'inside' data zoom and 'slider' data zoom components)\n * So dataZoomModels share one axisProxy in that case.\n */\nvar AxisProxy = /** @class */function () {\n function AxisProxy(dimName, axisIndex, dataZoomModel, ecModel) {\n this._dimName = dimName;\n this._axisIndex = axisIndex;\n this.ecModel = ecModel;\n this._dataZoomModel = dataZoomModel;\n // /**\n // * @readOnly\n // * @private\n // */\n // this.hasSeriesStacked;\n }\n /**\n * Whether the axisProxy is hosted by dataZoomModel.\n */\n AxisProxy.prototype.hostedBy = function (dataZoomModel) {\n return this._dataZoomModel === dataZoomModel;\n };\n /**\n * @return Value can only be NaN or finite value.\n */\n AxisProxy.prototype.getDataValueWindow = function () {\n return this._valueWindow.slice();\n };\n /**\n * @return {Array.<number>}\n */\n AxisProxy.prototype.getDataPercentWindow = function () {\n return this._percentWindow.slice();\n };\n AxisProxy.prototype.getTargetSeriesModels = function () {\n var seriesModels = [];\n this.ecModel.eachSeries(function (seriesModel) {\n if (isCoordSupported(seriesModel)) {\n var axisMainType = getAxisMainType(this._dimName);\n var axisModel = seriesModel.getReferringComponents(axisMainType, SINGLE_REFERRING).models[0];\n if (axisModel && this._axisIndex === axisModel.componentIndex) {\n seriesModels.push(seriesModel);\n }\n }\n }, this);\n return seriesModels;\n };\n AxisProxy.prototype.getAxisModel = function () {\n return this.ecModel.getComponent(this._dimName + 'Axis', this._axisIndex);\n };\n AxisProxy.prototype.getMinMaxSpan = function () {\n return zrUtil.clone(this._minMaxSpan);\n };\n /**\n * Only calculate by given range and this._dataExtent, do not change anything.\n */\n AxisProxy.prototype.calculateDataWindow = function (opt) {\n var dataExtent = this._dataExtent;\n var axisModel = this.getAxisModel();\n var scale = axisModel.axis.scale;\n var rangePropMode = this._dataZoomModel.getRangePropMode();\n var percentExtent = [0, 100];\n var percentWindow = [];\n var valueWindow = [];\n var hasPropModeValue;\n each(['start', 'end'], function (prop, idx) {\n var boundPercent = opt[prop];\n var boundValue = opt[prop + 'Value'];\n // Notice: dataZoom is based either on `percentProp` ('start', 'end') or\n // on `valueProp` ('startValue', 'endValue'). (They are based on the data extent\n // but not min/max of axis, which will be calculated by data window then).\n // The former one is suitable for cases that a dataZoom component controls multiple\n // axes with different unit or extent, and the latter one is suitable for accurate\n // zoom by pixel (e.g., in dataZoomSelect).\n // we use `getRangePropMode()` to mark which prop is used. `rangePropMode` is updated\n // only when setOption or dispatchAction, otherwise it remains its original value.\n // (Why not only record `percentProp` and always map to `valueProp`? Because\n // the map `valueProp` -> `percentProp` -> `valueProp` probably not the original\n // `valueProp`. consider two axes constrolled by one dataZoom. They have different\n // data extent. All of values that are overflow the `dataExtent` will be calculated\n // to percent '100%').\n if (rangePropMode[idx] === 'percent') {\n boundPercent == null && (boundPercent = percentExtent[idx]);\n // Use scale.parse to math round for category or time axis.\n boundValue = scale.parse(numberUtil.linearMap(boundPercent, percentExtent, dataExtent));\n } else {\n hasPropModeValue = true;\n boundValue = boundValue == null ? dataExtent[idx] : scale.parse(boundValue);\n // Calculating `percent` from `value` may be not accurate, because\n // This calculation can not be inversed, because all of values that\n // are overflow the `dataExtent` will be calculated to percent '100%'\n boundPercent = numberUtil.linearMap(boundValue, dataExtent, percentExtent);\n }\n // valueWindow[idx] = round(boundValue);\n // percentWindow[idx] = round(boundPercent);\n // fallback to extent start/end when parsed value or percent is invalid\n valueWindow[idx] = boundValue == null || isNaN(boundValue) ? dataExtent[idx] : boundValue;\n percentWindow[idx] = boundPercent == null || isNaN(boundPercent) ? percentExtent[idx] : boundPercent;\n });\n asc(valueWindow);\n asc(percentWindow);\n // The windows from user calling of `dispatchAction` might be out of the extent,\n // or do not obey the `min/maxSpan`, `min/maxValueSpan`. But we don't restrict window\n // by `zoomLock` here, because we see `zoomLock` just as a interaction constraint,\n // where API is able to initialize/modify the window size even though `zoomLock`\n // specified.\n var spans = this._minMaxSpan;\n hasPropModeValue ? restrictSet(valueWindow, percentWindow, dataExtent, percentExtent, false) : restrictSet(percentWindow, valueWindow, percentExtent, dataExtent, true);\n function restrictSet(fromWindow, toWindow, fromExtent, toExtent, toValue) {\n var suffix = toValue ? 'Span' : 'ValueSpan';\n sliderMove(0, fromWindow, fromExtent, 'all', spans['min' + suffix], spans['max' + suffix]);\n for (var i = 0; i < 2; i++) {\n toWindow[i] = numberUtil.linearMap(fromWindow[i], fromExtent, toExtent, true);\n toValue && (toWindow[i] = scale.parse(toWindow[i]));\n }\n }\n return {\n valueWindow: valueWindow,\n percentWindow: percentWindow\n };\n };\n /**\n * Notice: reset should not be called before series.restoreData() is called,\n * so it is recommended to be called in \"process stage\" but not \"model init\n * stage\".\n */\n AxisProxy.prototype.reset = function (dataZoomModel) {\n if (dataZoomModel !== this._dataZoomModel) {\n return;\n }\n var targetSeries = this.getTargetSeriesModels();\n // Culculate data window and data extent, and record them.\n this._dataExtent = calculateDataExtent(this, this._dimName, targetSeries);\n // `calculateDataWindow` uses min/maxSpan.\n this._updateMinMaxSpan();\n var dataWindow = this.calculateDataWindow(dataZoomModel.settledOption);\n this._valueWindow = dataWindow.valueWindow;\n this._percentWindow = dataWindow.percentWindow;\n // Update axis setting then.\n this._setAxisModel();\n };\n AxisProxy.prototype.filterData = function (dataZoomModel, api) {\n if (dataZoomModel !== this._dataZoomModel) {\n return;\n }\n var axisDim = this._dimName;\n var seriesModels = this.getTargetSeriesModels();\n var filterMode = dataZoomModel.get('filterMode');\n var valueWindow = this._valueWindow;\n if (filterMode === 'none') {\n return;\n }\n // FIXME\n // Toolbox may has dataZoom injected. And if there are stacked bar chart\n // with NaN data, NaN will be filtered and stack will be wrong.\n // So we need to force the mode to be set empty.\n // In fect, it is not a big deal that do not support filterMode-'filter'\n // when using toolbox#dataZoom, utill tooltip#dataZoom support \"single axis\n // selection\" some day, which might need \"adapt to data extent on the\n // otherAxis\", which is disabled by filterMode-'empty'.\n // But currently, stack has been fixed to based on value but not index,\n // so this is not an issue any more.\n // let otherAxisModel = this.getOtherAxisModel();\n // if (dataZoomModel.get('$fromToolbox')\n // && otherAxisModel\n // && otherAxisModel.hasSeriesStacked\n // ) {\n // filterMode = 'empty';\n // }\n // TODO\n // filterMode 'weakFilter' and 'empty' is not optimized for huge data yet.\n each(seriesModels, function (seriesModel) {\n var seriesData = seriesModel.getData();\n var dataDims = seriesData.mapDimensionsAll(axisDim);\n if (!dataDims.length) {\n return;\n }\n if (filterMode === 'weakFilter') {\n var store_1 = seriesData.getStore();\n var dataDimIndices_1 = zrUtil.map(dataDims, function (dim) {\n return seriesData.getDimensionIndex(dim);\n }, seriesData);\n seriesData.filterSelf(function (dataIndex) {\n var leftOut;\n var rightOut;\n var hasValue;\n for (var i = 0; i < dataDims.length; i++) {\n var value = store_1.get(dataDimIndices_1[i], dataIndex);\n var thisHasValue = !isNaN(value);\n var thisLeftOut = value < valueWindow[0];\n var thisRightOut = value > valueWindow[1];\n if (thisHasValue && !thisLeftOut && !thisRightOut) {\n return true;\n }\n thisHasValue && (hasValue = true);\n thisLeftOut && (leftOut = true);\n thisRightOut && (rightOut = true);\n }\n // If both left out and right out, do not filter.\n return hasValue && leftOut && rightOut;\n });\n } else {\n each(dataDims, function (dim) {\n if (filterMode === 'empty') {\n seriesModel.setData(seriesData = seriesData.map(dim, function (value) {\n return !isInWindow(value) ? NaN : value;\n }));\n } else {\n var range = {};\n range[dim] = valueWindow;\n // console.time('select');\n seriesData.selectRange(range);\n // console.timeEnd('select');\n }\n });\n }\n each(dataDims, function (dim) {\n seriesData.setApproximateExtent(valueWindow, dim);\n });\n });\n function isInWindow(value) {\n return value >= valueWindow[0] && value <= valueWindow[1];\n }\n };\n AxisProxy.prototype._updateMinMaxSpan = function () {\n var minMaxSpan = this._minMaxSpan = {};\n var dataZoomModel = this._dataZoomModel;\n var dataExtent = this._dataExtent;\n each(['min', 'max'], function (minMax) {\n var percentSpan = dataZoomModel.get(minMax + 'Span');\n var valueSpan = dataZoomModel.get(minMax + 'ValueSpan');\n valueSpan != null && (valueSpan = this.getAxisModel().axis.scale.parse(valueSpan));\n // minValueSpan and maxValueSpan has higher priority than minSpan and maxSpan\n if (valueSpan != null) {\n percentSpan = numberUtil.linearMap(dataExtent[0] + valueSpan, dataExtent, [0, 100], true);\n } else if (percentSpan != null) {\n valueSpan = numberUtil.linearMap(percentSpan, [0, 100], dataExtent, true) - dataExtent[0];\n }\n minMaxSpan[minMax + 'Span'] = percentSpan;\n minMaxSpan[minMax + 'ValueSpan'] = valueSpan;\n }, this);\n };\n AxisProxy.prototype._setAxisModel = function () {\n var axisModel = this.getAxisModel();\n var percentWindow = this._percentWindow;\n var valueWindow = this._valueWindow;\n if (!percentWindow) {\n return;\n }\n // [0, 500]: arbitrary value, guess axis extent.\n var precision = numberUtil.getPixelPrecision(valueWindow, [0, 500]);\n precision = Math.min(precision, 20);\n // For value axis, if min/max/scale are not set, we just use the extent obtained\n // by series data, which may be a little different from the extent calculated by\n // `axisHelper.getScaleExtent`. But the different just affects the experience a\n // little when zooming. So it will not be fixed until some users require it strongly.\n var rawExtentInfo = axisModel.axis.scale.rawExtentInfo;\n if (percentWindow[0] !== 0) {\n rawExtentInfo.setDeterminedMinMax('min', +valueWindow[0].toFixed(precision));\n }\n if (percentWindow[1] !== 100) {\n rawExtentInfo.setDeterminedMinMax('max', +valueWindow[1].toFixed(precision));\n }\n rawExtentInfo.freeze();\n };\n return AxisProxy;\n}();\nfunction calculateDataExtent(axisProxy, axisDim, seriesModels) {\n var dataExtent = [Infinity, -Infinity];\n each(seriesModels, function (seriesModel) {\n unionAxisExtentFromData(dataExtent, seriesModel.getData(), axisDim);\n });\n // It is important to get \"consistent\" extent when more then one axes is\n // controlled by a `dataZoom`, otherwise those axes will not be synchronized\n // when zooming. But it is difficult to know what is \"consistent\", considering\n // axes have different type or even different meanings (For example, two\n // time axes are used to compare data of the same date in different years).\n // So basically dataZoom just obtains extent by series.data (in category axis\n // extent can be obtained from axis.data).\n // Nevertheless, user can set min/max/scale on axes to make extent of axes\n // consistent.\n var axisModel = axisProxy.getAxisModel();\n var rawExtentResult = ensureScaleRawExtentInfo(axisModel.axis.scale, axisModel, dataExtent).calculate();\n return [rawExtentResult.min, rawExtentResult.max];\n}\nexport default AxisProxy;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap, each } from 'zrender/lib/core/util.js';\nimport { getAxisMainType } from './helper.js';\nimport AxisProxy from './AxisProxy.js';\nvar dataZoomProcessor = {\n // `dataZoomProcessor` will only be performed in needed series. Consider if\n // there is a line series and a pie series, it is better not to update the\n // line series if only pie series is needed to be updated.\n getTargetSeries: function (ecModel) {\n function eachAxisModel(cb) {\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n var axisModel = ecModel.getComponent(getAxisMainType(axisDim), axisIndex);\n cb(axisDim, axisIndex, axisModel, dataZoomModel);\n });\n });\n }\n // FIXME: it brings side-effect to `getTargetSeries`.\n // Prepare axis proxies.\n eachAxisModel(function (axisDim, axisIndex, axisModel, dataZoomModel) {\n // dispose all last axis proxy, in case that some axis are deleted.\n axisModel.__dzAxisProxy = null;\n });\n var proxyList = [];\n eachAxisModel(function (axisDim, axisIndex, axisModel, dataZoomModel) {\n // Different dataZooms may constrol the same axis. In that case,\n // an axisProxy serves both of them.\n if (!axisModel.__dzAxisProxy) {\n // Use the first dataZoomModel as the main model of axisProxy.\n axisModel.__dzAxisProxy = new AxisProxy(axisDim, axisIndex, dataZoomModel, ecModel);\n proxyList.push(axisModel.__dzAxisProxy);\n }\n });\n var seriesModelMap = createHashMap();\n each(proxyList, function (axisProxy) {\n each(axisProxy.getTargetSeriesModels(), function (seriesModel) {\n seriesModelMap.set(seriesModel.uid, seriesModel);\n });\n });\n return seriesModelMap;\n },\n // Consider appendData, where filter should be performed. Because data process is\n // in block mode currently, it is not need to worry about that the overallProgress\n // execute every frame.\n overallReset: function (ecModel, api) {\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n // We calculate window and reset axis here but not in model\n // init stage and not after action dispatch handler, because\n // reset should be called after seriesData.restoreData.\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n dataZoomModel.getAxisProxy(axisDim, axisIndex).reset(dataZoomModel);\n });\n // Caution: data zoom filtering is order sensitive when using\n // percent range and no min/max/scale set on axis.\n // For example, we have dataZoom definition:\n // [\n // {xAxisIndex: 0, start: 30, end: 70},\n // {yAxisIndex: 0, start: 20, end: 80}\n // ]\n // In this case, [20, 80] of y-dataZoom should be based on data\n // that have filtered by x-dataZoom using range of [30, 70],\n // but should not be based on full raw data. Thus sliding\n // x-dataZoom will change both ranges of xAxis and yAxis,\n // while sliding y-dataZoom will only change the range of yAxis.\n // So we should filter x-axis after reset x-axis immediately,\n // and then reset y-axis and filter y-axis.\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n dataZoomModel.getAxisProxy(axisDim, axisIndex).filterData(dataZoomModel, api);\n });\n });\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n // Fullfill all of the range props so that user\n // is able to get them from chart.getOption().\n var axisProxy = dataZoomModel.findRepresentativeAxisProxy();\n if (axisProxy) {\n var percentRange = axisProxy.getDataPercentWindow();\n var valueRange = axisProxy.getDataValueWindow();\n dataZoomModel.setCalculatedRange({\n start: percentRange[0],\n end: percentRange[1],\n startValue: valueRange[0],\n endValue: valueRange[1]\n });\n }\n });\n }\n};\nexport default dataZoomProcessor;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { findEffectedDataZooms } from './helper.js';\nimport { each } from 'zrender/lib/core/util.js';\nexport default function installDataZoomAction(registers) {\n registers.registerAction('dataZoom', function (payload, ecModel) {\n var effectedModels = findEffectedDataZooms(ecModel, payload);\n each(effectedModels, function (dataZoomModel) {\n dataZoomModel.setRawRange({\n start: payload.start,\n end: payload.end,\n startValue: payload.startValue,\n endValue: payload.endValue\n });\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport dataZoomProcessor from './dataZoomProcessor.js';\nimport installDataZoomAction from './dataZoomAction.js';\nvar installed = false;\nexport default function installCommon(registers) {\n if (installed) {\n return;\n }\n installed = true;\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, dataZoomProcessor);\n installDataZoomAction(registers);\n registers.registerSubTypeDefaulter('dataZoom', function () {\n // Default 'slider' when no type specified.\n return 'slider';\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport SelectZoomModel from './SelectZoomModel.js';\nimport SelectZoomView from './SelectZoomView.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n registers.registerComponentModel(SelectZoomModel);\n registers.registerComponentView(SelectZoomView);\n installCommon(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nvar ToolboxFeature = /** @class */function () {\n function ToolboxFeature() {}\n return ToolboxFeature;\n}();\nexport { ToolboxFeature };\nvar features = {};\nexport function registerFeature(name, ctor) {\n features[name] = ctor;\n}\nexport function getFeature(name) {\n return features[name];\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as featureManager from './featureManager.js';\nimport ComponentModel from '../../model/Component.js';\nimport tokens from '../../visual/tokens.js';\nvar ToolboxModel = /** @class */function (_super) {\n __extends(ToolboxModel, _super);\n function ToolboxModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ToolboxModel.type;\n return _this;\n }\n ToolboxModel.prototype.optionUpdated = function () {\n _super.prototype.optionUpdated.apply(this, arguments);\n var ecModel = this.ecModel;\n zrUtil.each(this.option.feature, function (featureOpt, featureName) {\n var Feature = featureManager.getFeature(featureName);\n if (Feature) {\n if (Feature.getDefaultOption) {\n Feature.defaultOption = Feature.getDefaultOption(ecModel);\n }\n zrUtil.merge(featureOpt, Feature.defaultOption);\n }\n });\n };\n ToolboxModel.type = 'toolbox';\n ToolboxModel.layoutMode = {\n type: 'box',\n ignoreSize: true\n };\n ToolboxModel.defaultOption = {\n show: true,\n z: 6,\n // zlevel: 0,\n orient: 'horizontal',\n left: 'right',\n top: 'top',\n // right\n // bottom\n backgroundColor: 'transparent',\n borderColor: tokens.color.border,\n borderRadius: 0,\n borderWidth: 0,\n padding: tokens.size.m,\n itemSize: 15,\n itemGap: tokens.size.s,\n showTitle: true,\n iconStyle: {\n borderColor: tokens.color.accent50,\n color: 'none'\n },\n emphasis: {\n iconStyle: {\n borderColor: tokens.color.accent50\n }\n },\n // textStyle: {},\n // feature\n tooltip: {\n show: false,\n position: 'bottom'\n }\n };\n return ToolboxModel;\n}(ComponentModel);\nexport default ToolboxModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as formatUtil from '../../util/format.js';\nimport * as graphic from '../../util/graphic.js';\n;\nexport function makeBackground(rect, componentModel) {\n var padding = formatUtil.normalizeCssArray(componentModel.get('padding'));\n var style = componentModel.getItemStyle(['color', 'opacity']);\n style.fill = componentModel.get('backgroundColor');\n var bgRect = new graphic.Rect({\n shape: {\n x: rect.x - padding[3],\n y: rect.y - padding[0],\n width: rect.width + padding[1] + padding[3],\n height: rect.height + padding[0] + padding[2],\n r: componentModel.get('borderRadius')\n },\n style: style,\n silent: true,\n z2: -1\n });\n // FIXME\n // `subPixelOptimizeRect` may bring some gap between edge of viewpart\n // and background rect when setting like `left: 0`, `top: 0`.\n // graphic.subPixelOptimizeRect(rect);\n return bgRect;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport * as graphic from '../../util/graphic.js';\nimport { enterEmphasis, leaveEmphasis } from '../../util/states.js';\nimport Model from '../../model/Model.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport * as listComponentHelper from '../helper/listComponent.js';\nimport ComponentView from '../../view/Component.js';\nimport { ToolboxFeature, getFeature } from './featureManager.js';\nimport { getUID } from '../../util/component.js';\nimport ZRText from 'zrender/lib/graphic/Text.js';\nimport { getFont } from '../../label/labelStyle.js';\nimport { box, createBoxLayoutReference, getLayoutRect, positionElement } from '../../util/layout.js';\nimport tokens from '../../visual/tokens.js';\nvar ToolboxView = /** @class */function (_super) {\n __extends(ToolboxView, _super);\n function ToolboxView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ToolboxView.prototype.render = function (toolboxModel, ecModel, api, payload) {\n var group = this.group;\n group.removeAll();\n if (!toolboxModel.get('show')) {\n return;\n }\n var itemSize = +toolboxModel.get('itemSize');\n var isVertical = toolboxModel.get('orient') === 'vertical';\n var featureOpts = toolboxModel.get('feature') || {};\n var features = this._features || (this._features = {});\n var featureNames = [];\n zrUtil.each(featureOpts, function (opt, name) {\n featureNames.push(name);\n });\n new DataDiffer(this._featureNames || [], featureNames).add(processFeature).update(processFeature).remove(zrUtil.curry(processFeature, null)).execute();\n // Keep for diff.\n this._featureNames = featureNames;\n function processFeature(newIndex, oldIndex) {\n var featureName = featureNames[newIndex];\n var oldName = featureNames[oldIndex];\n var featureOpt = featureOpts[featureName];\n var featureModel = new Model(featureOpt, toolboxModel, toolboxModel.ecModel);\n var feature;\n // FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?\n if (payload && payload.newTitle != null && payload.featureName === featureName) {\n featureOpt.title = payload.newTitle;\n }\n if (featureName && !oldName) {\n // Create\n if (isUserFeatureName(featureName)) {\n feature = {\n onclick: featureModel.option.onclick,\n featureName: featureName\n };\n } else {\n var Feature = getFeature(featureName);\n if (!Feature) {\n return;\n }\n feature = new Feature();\n }\n features[featureName] = feature;\n } else {\n feature = features[oldName];\n // If feature does not exist.\n if (!feature) {\n return;\n }\n }\n feature.uid = getUID('toolbox-feature');\n feature.model = featureModel;\n feature.ecModel = ecModel;\n feature.api = api;\n var isToolboxFeature = feature instanceof ToolboxFeature;\n if (!featureName && oldName) {\n isToolboxFeature && feature.dispose && feature.dispose(ecModel, api);\n return;\n }\n if (!featureModel.get('show') || isToolboxFeature && feature.unusable) {\n isToolboxFeature && feature.remove && feature.remove(ecModel, api);\n return;\n }\n createIconPaths(featureModel, feature, featureName);\n featureModel.setIconStatus = function (iconName, status) {\n var option = this.option;\n var iconPaths = this.iconPaths;\n option.iconStatus = option.iconStatus || {};\n option.iconStatus[iconName] = status;\n if (iconPaths[iconName]) {\n (status === 'emphasis' ? enterEmphasis : leaveEmphasis)(iconPaths[iconName]);\n }\n };\n if (feature instanceof ToolboxFeature) {\n if (feature.render) {\n feature.render(featureModel, ecModel, api, payload);\n }\n }\n }\n function createIconPaths(featureModel, feature, featureName) {\n var iconStyleModel = featureModel.getModel('iconStyle');\n var iconStyleEmphasisModel = featureModel.getModel(['emphasis', 'iconStyle']);\n // If one feature has multiple icons, they are organized as\n // {\n // icon: {\n // foo: '',\n // bar: ''\n // },\n // title: {\n // foo: '',\n // bar: ''\n // }\n // }\n var icons = feature instanceof ToolboxFeature && feature.getIcons ? feature.getIcons() : featureModel.get('icon');\n var titles = featureModel.get('title') || {};\n var iconsMap;\n var titlesMap;\n if (zrUtil.isString(icons)) {\n iconsMap = {};\n iconsMap[featureName] = icons;\n } else {\n iconsMap = icons;\n }\n if (zrUtil.isString(titles)) {\n titlesMap = {};\n titlesMap[featureName] = titles;\n } else {\n titlesMap = titles;\n }\n var iconPaths = featureModel.iconPaths = {};\n zrUtil.each(iconsMap, function (iconStr, iconName) {\n var path = graphic.createIcon(iconStr, {}, {\n x: -itemSize / 2,\n y: -itemSize / 2,\n width: itemSize,\n height: itemSize\n }); // TODO handling image\n path.setStyle(iconStyleModel.getItemStyle());\n var pathEmphasisState = path.ensureState('emphasis');\n pathEmphasisState.style = iconStyleEmphasisModel.getItemStyle();\n // Text position calculation\n // TODO: extract `textStyle` from `iconStyle` and use `createTextStyle`\n var textContent = new ZRText({\n style: {\n text: titlesMap[iconName],\n align: iconStyleEmphasisModel.get('textAlign'),\n borderRadius: iconStyleEmphasisModel.get('textBorderRadius'),\n padding: iconStyleEmphasisModel.get('textPadding'),\n fill: null,\n font: getFont({\n fontStyle: iconStyleEmphasisModel.get('textFontStyle'),\n fontFamily: iconStyleEmphasisModel.get('textFontFamily'),\n fontSize: iconStyleEmphasisModel.get('textFontSize'),\n fontWeight: iconStyleEmphasisModel.get('textFontWeight')\n }, ecModel)\n },\n ignore: true\n });\n path.setTextContent(textContent);\n graphic.setTooltipConfig({\n el: path,\n componentModel: toolboxModel,\n itemName: iconName,\n formatterParamsExtra: {\n title: titlesMap[iconName]\n }\n });\n path.__title = titlesMap[iconName];\n path.on('mouseover', function () {\n // Should not reuse above hoverStyle, which might be modified.\n var hoverStyle = iconStyleEmphasisModel.getItemStyle();\n var defaultTextPosition = isVertical ? toolboxModel.get('right') == null && toolboxModel.get('left') !== 'right' ? 'right' : 'left' : toolboxModel.get('bottom') == null && toolboxModel.get('top') !== 'bottom' ? 'bottom' : 'top';\n textContent.setStyle({\n fill: iconStyleEmphasisModel.get('textFill') || hoverStyle.fill || hoverStyle.stroke || tokens.color.neutral99,\n backgroundColor: iconStyleEmphasisModel.get('textBackgroundColor')\n });\n path.setTextConfig({\n position: iconStyleEmphasisModel.get('textPosition') || defaultTextPosition\n });\n textContent.ignore = !toolboxModel.get('showTitle');\n // Use enterEmphasis and leaveEmphasis provide by ec.\n // There are flags managed by the echarts.\n api.enterEmphasis(this);\n }).on('mouseout', function () {\n if (featureModel.get(['iconStatus', iconName]) !== 'emphasis') {\n api.leaveEmphasis(this);\n }\n textContent.hide();\n });\n (featureModel.get(['iconStatus', iconName]) === 'emphasis' ? enterEmphasis : leaveEmphasis)(path);\n group.add(path);\n path.on('click', zrUtil.bind(feature.onclick, feature, ecModel, api, iconName));\n iconPaths[iconName] = path;\n });\n }\n var refContainer = createBoxLayoutReference(toolboxModel, api).refContainer;\n var boxLayoutParams = toolboxModel.getBoxLayoutParams();\n var padding = toolboxModel.get('padding');\n var viewRect = getLayoutRect(boxLayoutParams, refContainer, padding);\n box(toolboxModel.get('orient'), group, toolboxModel.get('itemGap'), viewRect.width, viewRect.height);\n positionElement(group, boxLayoutParams, refContainer, padding);\n // Render background after group is layout\n // FIXME\n group.add(listComponentHelper.makeBackground(group.getBoundingRect(), toolboxModel));\n // Adjust icon title positions to avoid them out of screen\n isVertical || group.eachChild(function (icon) {\n var titleText = icon.__title;\n // const hoverStyle = icon.hoverStyle;\n // TODO simplify code?\n var emphasisState = icon.ensureState('emphasis');\n var emphasisTextConfig = emphasisState.textConfig || (emphasisState.textConfig = {});\n var textContent = icon.getTextContent();\n var emphasisTextState = textContent && textContent.ensureState('emphasis');\n // May be background element\n if (emphasisTextState && !zrUtil.isFunction(emphasisTextState) && titleText) {\n var emphasisTextStyle = emphasisTextState.style || (emphasisTextState.style = {});\n var rect = textContain.getBoundingRect(titleText, ZRText.makeFont(emphasisTextStyle));\n var offsetX = icon.x + group.x;\n var offsetY = icon.y + group.y + itemSize;\n var needPutOnTop = false;\n if (offsetY + rect.height > api.getHeight()) {\n emphasisTextConfig.position = 'top';\n needPutOnTop = true;\n }\n var topOffset = needPutOnTop ? -5 - rect.height : itemSize + 10;\n if (offsetX + rect.width / 2 > api.getWidth()) {\n emphasisTextConfig.position = ['100%', topOffset];\n emphasisTextStyle.align = 'right';\n } else if (offsetX - rect.width / 2 < 0) {\n emphasisTextConfig.position = [0, topOffset];\n emphasisTextStyle.align = 'left';\n }\n }\n });\n };\n ToolboxView.prototype.updateView = function (toolboxModel, ecModel, api, payload) {\n zrUtil.each(this._features, function (feature) {\n feature instanceof ToolboxFeature && feature.updateView && feature.updateView(feature.model, ecModel, api, payload);\n });\n };\n // updateLayout(toolboxModel, ecModel, api, payload) {\n // zrUtil.each(this._features, function (feature) {\n // feature.updateLayout && feature.updateLayout(feature.model, ecModel, api, payload);\n // });\n // },\n ToolboxView.prototype.remove = function (ecModel, api) {\n zrUtil.each(this._features, function (feature) {\n feature instanceof ToolboxFeature && feature.remove && feature.remove(ecModel, api);\n });\n this.group.removeAll();\n };\n ToolboxView.prototype.dispose = function (ecModel, api) {\n zrUtil.each(this._features, function (feature) {\n feature instanceof ToolboxFeature && feature.dispose && feature.dispose(ecModel, api);\n });\n };\n ToolboxView.type = 'toolbox';\n return ToolboxView;\n}(ComponentView);\nfunction isUserFeatureName(featureName) {\n return featureName.indexOf('my') === 0;\n}\nexport default ToolboxView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/* global window, Uint8Array, document */\nimport env from 'zrender/lib/core/env.js';\nimport { ToolboxFeature } from '../featureManager.js';\nimport tokens from '../../../visual/tokens.js';\nvar SaveAsImage = /** @class */function (_super) {\n __extends(SaveAsImage, _super);\n function SaveAsImage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SaveAsImage.prototype.onclick = function (ecModel, api) {\n var model = this.model;\n var title = model.get('name') || ecModel.get('title.0.text') || 'echarts';\n var isSvg = api.getZr().painter.getType() === 'svg';\n var type = isSvg ? 'svg' : model.get('type', true) || 'png';\n var url = api.getConnectedDataURL({\n type: type,\n backgroundColor: model.get('backgroundColor', true) || ecModel.get('backgroundColor') || tokens.color.neutral00,\n connectedBackgroundColor: model.get('connectedBackgroundColor'),\n excludeComponents: model.get('excludeComponents'),\n pixelRatio: model.get('pixelRatio')\n });\n var browser = env.browser;\n // Chrome, Firefox, New Edge\n if (typeof MouseEvent === 'function' && (browser.newEdge || !browser.ie && !browser.edge)) {\n var $a = document.createElement('a');\n $a.download = title + '.' + type;\n $a.target = '_blank';\n $a.href = url;\n var evt = new MouseEvent('click', {\n // some micro front-end framework, window maybe is a Proxy\n view: document.defaultView,\n bubbles: true,\n cancelable: false\n });\n $a.dispatchEvent(evt);\n }\n // IE or old Edge\n else {\n // @ts-ignore\n if (window.navigator.msSaveOrOpenBlob || isSvg) {\n var parts = url.split(',');\n // data:[<mime type>][;charset=<charset>][;base64],<encoded data>\n var base64Encoded = parts[0].indexOf('base64') > -1;\n var bstr = isSvg\n // should decode the svg data uri first\n ? decodeURIComponent(parts[1]) : parts[1];\n // only `atob` when the data uri is encoded with base64\n // otherwise, like `svg` data uri exported by zrender,\n // there will be an error, for it's not encoded with base64.\n // (just a url-encoded string through `encodeURIComponent`)\n base64Encoded && (bstr = window.atob(bstr));\n var filename = title + '.' + type;\n // @ts-ignore\n if (window.navigator.msSaveOrOpenBlob) {\n var n = bstr.length;\n var u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n var blob = new Blob([u8arr]); // @ts-ignore\n window.navigator.msSaveOrOpenBlob(blob, filename);\n } else {\n var frame = document.createElement('iframe');\n document.body.appendChild(frame);\n var cw = frame.contentWindow;\n var doc = cw.document;\n doc.open('image/svg+xml', 'replace');\n doc.write(bstr);\n doc.close();\n cw.focus();\n doc.execCommand('SaveAs', true, filename);\n document.body.removeChild(frame);\n }\n } else {\n var lang = model.get('lang');\n var html = '' + '<body style=\"margin:0;\">' + '<img src=\"' + url + '\" style=\"max-width:100%;\" title=\"' + (lang && lang[0] || '') + '\" />' + '</body>';\n var tab = window.open();\n tab.document.write(html);\n tab.document.title = title;\n }\n }\n };\n SaveAsImage.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n icon: 'M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0',\n title: ecModel.getLocaleModel().get(['toolbox', 'saveAsImage', 'title']),\n type: 'png',\n // Default use option.backgroundColor\n // backgroundColor: '#fff',\n connectedBackgroundColor: tokens.color.neutral00,\n name: '',\n excludeComponents: ['toolbox'],\n // use current pixel ratio of device by default\n // pixelRatio: 1,\n lang: ecModel.getLocaleModel().get(['toolbox', 'saveAsImage', 'lang'])\n };\n return defaultOption;\n };\n return SaveAsImage;\n}(ToolboxFeature);\nexport default SaveAsImage;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as echarts from '../../../core/echarts.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { ToolboxFeature } from '../featureManager.js';\nimport { SINGLE_REFERRING } from '../../../util/model.js';\nvar INNER_STACK_KEYWORD = '__ec_magicType_stack__';\nvar ICON_TYPES = ['line', 'bar', 'stack'];\n// stack and tiled appears in pair for the title\nvar TITLE_TYPES = ['line', 'bar', 'stack', 'tiled'];\nvar radioTypes = [['line', 'bar'], ['stack']];\nvar MagicType = /** @class */function (_super) {\n __extends(MagicType, _super);\n function MagicType() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MagicType.prototype.getIcons = function () {\n var model = this.model;\n var availableIcons = model.get('icon');\n var icons = {};\n zrUtil.each(model.get('type'), function (type) {\n if (availableIcons[type]) {\n icons[type] = availableIcons[type];\n }\n });\n return icons;\n };\n MagicType.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n type: [],\n // Icon group\n icon: {\n line: 'M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4',\n bar: 'M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7',\n // eslint-disable-next-line\n stack: 'M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z' // jshint ignore:line\n },\n // `line`, `bar`, `stack`, `tiled`\n title: ecModel.getLocaleModel().get(['toolbox', 'magicType', 'title']),\n option: {},\n seriesIndex: {}\n };\n return defaultOption;\n };\n MagicType.prototype.onclick = function (ecModel, api, type) {\n var model = this.model;\n var seriesIndex = model.get(['seriesIndex', type]);\n // Not supported magicType\n if (!seriesOptGenreator[type]) {\n return;\n }\n var newOption = {\n series: []\n };\n var generateNewSeriesTypes = function (seriesModel) {\n var seriesType = seriesModel.subType;\n var seriesId = seriesModel.id;\n var newSeriesOpt = seriesOptGenreator[type](seriesType, seriesId, seriesModel, model);\n if (newSeriesOpt) {\n // PENDING If merge original option?\n zrUtil.defaults(newSeriesOpt, seriesModel.option);\n newOption.series.push(newSeriesOpt);\n }\n // Modify boundaryGap\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type === 'cartesian2d' && (type === 'line' || type === 'bar')) {\n var categoryAxis = coordSys.getAxesByScale('ordinal')[0];\n if (categoryAxis) {\n var axisDim = categoryAxis.dim;\n var axisType = axisDim + 'Axis';\n var axisModel = seriesModel.getReferringComponents(axisType, SINGLE_REFERRING).models[0];\n var axisIndex = axisModel.componentIndex;\n newOption[axisType] = newOption[axisType] || [];\n for (var i = 0; i <= axisIndex; i++) {\n newOption[axisType][axisIndex] = newOption[axisType][axisIndex] || {};\n }\n newOption[axisType][axisIndex].boundaryGap = type === 'bar';\n }\n }\n };\n zrUtil.each(radioTypes, function (radio) {\n if (zrUtil.indexOf(radio, type) >= 0) {\n zrUtil.each(radio, function (item) {\n model.setIconStatus(item, 'normal');\n });\n }\n });\n model.setIconStatus(type, 'emphasis');\n ecModel.eachComponent({\n mainType: 'series',\n query: seriesIndex == null ? null : {\n seriesIndex: seriesIndex\n }\n }, generateNewSeriesTypes);\n var newTitle;\n var currentType = type;\n // Change title of stack\n if (type === 'stack') {\n // use titles in model instead of ecModel\n // as stack and tiled appears in pair, just flip them\n // no need of checking stack state\n newTitle = zrUtil.merge({\n stack: model.option.title.tiled,\n tiled: model.option.title.stack\n }, model.option.title);\n if (model.get(['iconStatus', type]) !== 'emphasis') {\n currentType = 'tiled';\n }\n }\n api.dispatchAction({\n type: 'changeMagicType',\n currentType: currentType,\n newOption: newOption,\n newTitle: newTitle,\n featureName: 'magicType'\n });\n };\n return MagicType;\n}(ToolboxFeature);\nvar seriesOptGenreator = {\n 'line': function (seriesType, seriesId, seriesModel, model) {\n if (seriesType === 'bar') {\n return zrUtil.merge({\n id: seriesId,\n type: 'line',\n // Preserve data related option\n data: seriesModel.get('data'),\n stack: seriesModel.get('stack'),\n markPoint: seriesModel.get('markPoint'),\n markLine: seriesModel.get('markLine')\n }, model.get(['option', 'line']) || {}, true);\n }\n },\n 'bar': function (seriesType, seriesId, seriesModel, model) {\n if (seriesType === 'line') {\n return zrUtil.merge({\n id: seriesId,\n type: 'bar',\n // Preserve data related option\n data: seriesModel.get('data'),\n stack: seriesModel.get('stack'),\n markPoint: seriesModel.get('markPoint'),\n markLine: seriesModel.get('markLine')\n }, model.get(['option', 'bar']) || {}, true);\n }\n },\n 'stack': function (seriesType, seriesId, seriesModel, model) {\n var isStack = seriesModel.get('stack') === INNER_STACK_KEYWORD;\n if (seriesType === 'line' || seriesType === 'bar') {\n model.setIconStatus('stack', isStack ? 'normal' : 'emphasis');\n return zrUtil.merge({\n id: seriesId,\n stack: isStack ? '' : INNER_STACK_KEYWORD\n }, model.get(['option', 'stack']) || {}, true);\n }\n }\n};\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'changeMagicType',\n event: 'magicTypeChanged',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n ecModel.mergeOption(payload.newOption);\n});\nexport default MagicType;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/* global document */\nimport * as echarts from '../../../core/echarts.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { ToolboxFeature } from '../featureManager.js';\nimport { addEventListener } from 'zrender/lib/core/event.js';\nimport { warn } from '../../../util/log.js';\nimport tokens from '../../../visual/tokens.js';\n/* global document */\nvar BLOCK_SPLITER = new Array(60).join('-');\nvar ITEM_SPLITER = '\\t';\n/**\n * Group series into two types\n * 1. on category axis, like line, bar\n * 2. others, like scatter, pie\n */\nfunction groupSeries(ecModel) {\n var seriesGroupByCategoryAxis = {};\n var otherSeries = [];\n var meta = [];\n ecModel.eachRawSeries(function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && (coordSys.type === 'cartesian2d' || coordSys.type === 'polar')) {\n // TODO: TYPE Consider polar? Include polar may increase unecessary bundle size.\n var baseAxis = coordSys.getBaseAxis();\n if (baseAxis.type === 'category') {\n var key = baseAxis.dim + '_' + baseAxis.index;\n if (!seriesGroupByCategoryAxis[key]) {\n seriesGroupByCategoryAxis[key] = {\n categoryAxis: baseAxis,\n valueAxis: coordSys.getOtherAxis(baseAxis),\n series: []\n };\n meta.push({\n axisDim: baseAxis.dim,\n axisIndex: baseAxis.index\n });\n }\n seriesGroupByCategoryAxis[key].series.push(seriesModel);\n } else {\n otherSeries.push(seriesModel);\n }\n } else {\n otherSeries.push(seriesModel);\n }\n });\n return {\n seriesGroupByCategoryAxis: seriesGroupByCategoryAxis,\n other: otherSeries,\n meta: meta\n };\n}\n/**\n * Assemble content of series on cateogory axis\n * @inner\n */\nfunction assembleSeriesWithCategoryAxis(groups) {\n var tables = [];\n zrUtil.each(groups, function (group, key) {\n var categoryAxis = group.categoryAxis;\n var valueAxis = group.valueAxis;\n var valueAxisDim = valueAxis.dim;\n var headers = [' '].concat(zrUtil.map(group.series, function (series) {\n return series.name;\n }));\n // @ts-ignore TODO Polar\n var columns = [categoryAxis.model.getCategories()];\n zrUtil.each(group.series, function (series) {\n var rawData = series.getRawData();\n columns.push(series.getRawData().mapArray(rawData.mapDimension(valueAxisDim), function (val) {\n return val;\n }));\n });\n // Assemble table content\n var lines = [headers.join(ITEM_SPLITER)];\n for (var i = 0; i < columns[0].length; i++) {\n var items = [];\n for (var j = 0; j < columns.length; j++) {\n items.push(columns[j][i]);\n }\n lines.push(items.join(ITEM_SPLITER));\n }\n tables.push(lines.join('\\n'));\n });\n return tables.join('\\n\\n' + BLOCK_SPLITER + '\\n\\n');\n}\n/**\n * Assemble content of other series\n */\nfunction assembleOtherSeries(series) {\n return zrUtil.map(series, function (series) {\n var data = series.getRawData();\n var lines = [series.name];\n var vals = [];\n data.each(data.dimensions, function () {\n var argLen = arguments.length;\n var dataIndex = arguments[argLen - 1];\n var name = data.getName(dataIndex);\n for (var i = 0; i < argLen - 1; i++) {\n vals[i] = arguments[i];\n }\n lines.push((name ? name + ITEM_SPLITER : '') + vals.join(ITEM_SPLITER));\n });\n return lines.join('\\n');\n }).join('\\n\\n' + BLOCK_SPLITER + '\\n\\n');\n}\nfunction getContentFromModel(ecModel) {\n var result = groupSeries(ecModel);\n return {\n value: zrUtil.filter([assembleSeriesWithCategoryAxis(result.seriesGroupByCategoryAxis), assembleOtherSeries(result.other)], function (str) {\n return !!str.replace(/[\\n\\t\\s]/g, '');\n }).join('\\n\\n' + BLOCK_SPLITER + '\\n\\n'),\n meta: result.meta\n };\n}\nfunction trim(str) {\n return str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n}\n/**\n * If a block is tsv format\n */\nfunction isTSVFormat(block) {\n // Simple method to find out if a block is tsv format\n var firstLine = block.slice(0, block.indexOf('\\n'));\n if (firstLine.indexOf(ITEM_SPLITER) >= 0) {\n return true;\n }\n}\nvar itemSplitRegex = new RegExp('[' + ITEM_SPLITER + ']+', 'g');\n/**\n * @param {string} tsv\n * @return {Object}\n */\nfunction parseTSVContents(tsv) {\n var tsvLines = tsv.split(/\\n+/g);\n var headers = trim(tsvLines.shift()).split(itemSplitRegex);\n var categories = [];\n var series = zrUtil.map(headers, function (header) {\n return {\n name: header,\n data: []\n };\n });\n for (var i = 0; i < tsvLines.length; i++) {\n var items = trim(tsvLines[i]).split(itemSplitRegex);\n categories.push(items.shift());\n for (var j = 0; j < items.length; j++) {\n series[j] && (series[j].data[i] = items[j]);\n }\n }\n return {\n series: series,\n categories: categories\n };\n}\nfunction parseListContents(str) {\n var lines = str.split(/\\n+/g);\n var seriesName = trim(lines.shift());\n var data = [];\n for (var i = 0; i < lines.length; i++) {\n // if line is empty, ignore it.\n // there is a case that a user forgot to delete `\\n`.\n var line = trim(lines[i]);\n if (!line) {\n continue;\n }\n var items = line.split(itemSplitRegex);\n var name_1 = '';\n var value = void 0;\n var hasName = false;\n if (isNaN(items[0])) {\n // First item is name\n hasName = true;\n name_1 = items[0];\n items = items.slice(1);\n data[i] = {\n name: name_1,\n value: []\n };\n value = data[i].value;\n } else {\n value = data[i] = [];\n }\n for (var j = 0; j < items.length; j++) {\n value.push(+items[j]);\n }\n if (value.length === 1) {\n hasName ? data[i].value = value[0] : data[i] = value[0];\n }\n }\n return {\n name: seriesName,\n data: data\n };\n}\nfunction parseContents(str, blockMetaList) {\n var blocks = str.split(new RegExp('\\n*' + BLOCK_SPLITER + '\\n*', 'g'));\n var newOption = {\n series: []\n };\n zrUtil.each(blocks, function (block, idx) {\n if (isTSVFormat(block)) {\n var result = parseTSVContents(block);\n var blockMeta = blockMetaList[idx];\n var axisKey = blockMeta.axisDim + 'Axis';\n if (blockMeta) {\n newOption[axisKey] = newOption[axisKey] || [];\n newOption[axisKey][blockMeta.axisIndex] = {\n data: result.categories\n };\n newOption.series = newOption.series.concat(result.series);\n }\n } else {\n var result = parseListContents(block);\n newOption.series.push(result);\n }\n });\n return newOption;\n}\nvar DataView = /** @class */function (_super) {\n __extends(DataView, _super);\n function DataView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DataView.prototype.onclick = function (ecModel, api) {\n // FIXME: better way?\n setTimeout(function () {\n api.dispatchAction({\n type: 'hideTip'\n });\n });\n var container = api.getDom();\n var model = this.model;\n if (this._dom) {\n container.removeChild(this._dom);\n }\n var root = document.createElement('div');\n // use padding to avoid 5px whitespace\n root.style.cssText = 'position:absolute;top:0;bottom:0;left:0;right:0;padding:5px';\n root.style.backgroundColor = model.get('backgroundColor') || tokens.color.neutral00;\n // Create elements\n var header = document.createElement('h4');\n var lang = model.get('lang') || [];\n header.innerHTML = lang[0] || model.get('title');\n header.style.cssText = 'margin:10px 20px';\n header.style.color = model.get('textColor');\n var viewMain = document.createElement('div');\n var textarea = document.createElement('textarea');\n viewMain.style.cssText = 'overflow:auto';\n var optionToContent = model.get('optionToContent');\n var contentToOption = model.get('contentToOption');\n var result = getContentFromModel(ecModel);\n if (zrUtil.isFunction(optionToContent)) {\n var htmlOrDom = optionToContent(api.getOption());\n if (zrUtil.isString(htmlOrDom)) {\n viewMain.innerHTML = htmlOrDom;\n } else if (zrUtil.isDom(htmlOrDom)) {\n viewMain.appendChild(htmlOrDom);\n }\n } else {\n // Use default textarea\n textarea.readOnly = model.get('readOnly');\n var style = textarea.style;\n // eslint-disable-next-line max-len\n style.cssText = 'display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none';\n style.color = model.get('textColor');\n style.borderColor = model.get('textareaBorderColor');\n style.backgroundColor = model.get('textareaColor');\n textarea.value = result.value;\n viewMain.appendChild(textarea);\n }\n var blockMetaList = result.meta;\n var buttonContainer = document.createElement('div');\n buttonContainer.style.cssText = 'position:absolute;bottom:5px;left:0;right:0';\n // eslint-disable-next-line max-len\n var buttonStyle = 'float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px';\n var closeButton = document.createElement('div');\n var refreshButton = document.createElement('div');\n buttonStyle += ';background-color:' + model.get('buttonColor');\n buttonStyle += ';color:' + model.get('buttonTextColor');\n var self = this;\n function close() {\n container.removeChild(root);\n self._dom = null;\n }\n addEventListener(closeButton, 'click', close);\n addEventListener(refreshButton, 'click', function () {\n if (contentToOption == null && optionToContent != null || contentToOption != null && optionToContent == null) {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n warn('It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored.');\n }\n close();\n return;\n }\n var newOption;\n try {\n if (zrUtil.isFunction(contentToOption)) {\n newOption = contentToOption(viewMain, api.getOption());\n } else {\n newOption = parseContents(textarea.value, blockMetaList);\n }\n } catch (e) {\n close();\n throw new Error('Data view format error ' + e);\n }\n if (newOption) {\n api.dispatchAction({\n type: 'changeDataView',\n newOption: newOption\n });\n }\n close();\n });\n closeButton.innerHTML = lang[1];\n refreshButton.innerHTML = lang[2];\n refreshButton.style.cssText = closeButton.style.cssText = buttonStyle;\n !model.get('readOnly') && buttonContainer.appendChild(refreshButton);\n buttonContainer.appendChild(closeButton);\n root.appendChild(header);\n root.appendChild(viewMain);\n root.appendChild(buttonContainer);\n viewMain.style.height = container.clientHeight - 80 + 'px';\n container.appendChild(root);\n this._dom = root;\n };\n DataView.prototype.remove = function (ecModel, api) {\n this._dom && api.getDom().removeChild(this._dom);\n };\n DataView.prototype.dispose = function (ecModel, api) {\n this.remove(ecModel, api);\n };\n DataView.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n readOnly: false,\n optionToContent: null,\n contentToOption: null,\n // eslint-disable-next-line\n icon: 'M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28',\n title: ecModel.getLocaleModel().get(['toolbox', 'dataView', 'title']),\n lang: ecModel.getLocaleModel().get(['toolbox', 'dataView', 'lang']),\n backgroundColor: tokens.color.background,\n textColor: tokens.color.primary,\n textareaColor: tokens.color.background,\n textareaBorderColor: tokens.color.border,\n buttonColor: tokens.color.accent50,\n buttonTextColor: tokens.color.neutral00\n };\n return defaultOption;\n };\n return DataView;\n}(ToolboxFeature);\n/**\n * @inner\n */\nfunction tryMergeDataOption(newData, originalData) {\n return zrUtil.map(newData, function (newVal, idx) {\n var original = originalData && originalData[idx];\n if (zrUtil.isObject(original) && !zrUtil.isArray(original)) {\n var newValIsObject = zrUtil.isObject(newVal) && !zrUtil.isArray(newVal);\n if (!newValIsObject) {\n newVal = {\n value: newVal\n };\n }\n // original data has name but new data has no name\n var shouldDeleteName = original.name != null && newVal.name == null;\n // Original data has option\n newVal = zrUtil.defaults(newVal, original);\n shouldDeleteName && delete newVal.name;\n return newVal;\n } else {\n return newVal;\n }\n });\n}\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'changeDataView',\n event: 'dataViewChanged',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n var newSeriesOptList = [];\n zrUtil.each(payload.newOption.series, function (seriesOpt) {\n var seriesModel = ecModel.getSeriesByName(seriesOpt.name)[0];\n if (!seriesModel) {\n // New created series\n // Geuss the series type\n newSeriesOptList.push(zrUtil.extend({\n // Default is scatter\n type: 'scatter'\n }, seriesOpt));\n } else {\n var originalData = seriesModel.get('data');\n newSeriesOptList.push({\n name: seriesOpt.name,\n data: tryMergeDataOption(seriesOpt.data, originalData)\n });\n }\n });\n ecModel.mergeOption(zrUtil.defaults({\n series: newSeriesOptList\n }, payload.newOption));\n});\nexport default DataView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nvar each = zrUtil.each;\nvar inner = makeInner();\n/**\n * @param ecModel\n * @param newSnapshot key is dataZoomId\n */\nexport function push(ecModel, newSnapshot) {\n var storedSnapshots = getStoreSnapshots(ecModel);\n // If previous dataZoom can not be found,\n // complete an range with current range.\n each(newSnapshot, function (batchItem, dataZoomId) {\n var i = storedSnapshots.length - 1;\n for (; i >= 0; i--) {\n var snapshot = storedSnapshots[i];\n if (snapshot[dataZoomId]) {\n break;\n }\n }\n if (i < 0) {\n // No origin range set, create one by current range.\n var dataZoomModel = ecModel.queryComponents({\n mainType: 'dataZoom',\n subType: 'select',\n id: dataZoomId\n })[0];\n if (dataZoomModel) {\n var percentRange = dataZoomModel.getPercentRange();\n storedSnapshots[0][dataZoomId] = {\n dataZoomId: dataZoomId,\n start: percentRange[0],\n end: percentRange[1]\n };\n }\n }\n });\n storedSnapshots.push(newSnapshot);\n}\nexport function pop(ecModel) {\n var storedSnapshots = getStoreSnapshots(ecModel);\n var head = storedSnapshots[storedSnapshots.length - 1];\n storedSnapshots.length > 1 && storedSnapshots.pop();\n // Find top for all dataZoom.\n var snapshot = {};\n each(head, function (batchItem, dataZoomId) {\n for (var i = storedSnapshots.length - 1; i >= 0; i--) {\n batchItem = storedSnapshots[i][dataZoomId];\n if (batchItem) {\n snapshot[dataZoomId] = batchItem;\n break;\n }\n }\n });\n return snapshot;\n}\nexport function clear(ecModel) {\n inner(ecModel).snapshots = null;\n}\nexport function count(ecModel) {\n return getStoreSnapshots(ecModel).length;\n}\n/**\n * History length of each dataZoom may be different.\n * this._history[0] is used to store origin range.\n */\nfunction getStoreSnapshots(ecModel) {\n var store = inner(ecModel);\n if (!store.snapshots) {\n store.snapshots = [{}];\n }\n return store.snapshots;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as echarts from '../../../core/echarts.js';\nimport * as history from '../../dataZoom/history.js';\nimport { ToolboxFeature } from '../featureManager.js';\nvar RestoreOption = /** @class */function (_super) {\n __extends(RestoreOption, _super);\n function RestoreOption() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n RestoreOption.prototype.onclick = function (ecModel, api) {\n history.clear(ecModel);\n api.dispatchAction({\n type: 'restore',\n from: this.uid\n });\n };\n RestoreOption.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n // eslint-disable-next-line\n icon: 'M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5',\n title: ecModel.getLocaleModel().get(['toolbox', 'restore', 'title'])\n };\n return defaultOption;\n };\n return RestoreOption;\n}(ToolboxFeature);\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'restore',\n event: 'restore',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n ecModel.resetOption('recreate');\n});\nexport default RestoreOption;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, indexOf, curry, assert, map, createHashMap } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as brushHelper from './brushHelper.js';\nimport { parseFinder as modelUtilParseFinder } from '../../util/model.js';\n// FIXME\n// how to genarialize to more coordinate systems.\nvar INCLUDE_FINDER_MAIN_TYPES = ['grid', 'xAxis', 'yAxis', 'geo', 'graph', 'polar', 'radiusAxis', 'angleAxis', 'bmap'];\nvar BrushTargetManager = /** @class */function () {\n /**\n * @param finder contains Index/Id/Name of xAxis/yAxis/geo/grid\n * Each can be {number|Array.<number>}. like: {xAxisIndex: [3, 4]}\n * @param opt.include include coordinate system types.\n */\n function BrushTargetManager(finder, ecModel, opt) {\n var _this = this;\n this._targetInfoList = [];\n var foundCpts = parseFinder(ecModel, finder);\n each(targetInfoBuilders, function (builder, type) {\n if (!opt || !opt.include || indexOf(opt.include, type) >= 0) {\n builder(foundCpts, _this._targetInfoList);\n }\n });\n }\n BrushTargetManager.prototype.setOutputRanges = function (areas, ecModel) {\n this.matchOutputRanges(areas, ecModel, function (area, coordRange, coordSys) {\n (area.coordRanges || (area.coordRanges = [])).push(coordRange);\n // area.coordRange is the first of area.coordRanges\n if (!area.coordRange) {\n area.coordRange = coordRange;\n // In 'category' axis, coord to pixel is not reversible, so we can not\n // rebuild range by coordRange accrately, which may bring trouble when\n // brushing only one item. So we use __rangeOffset to rebuilding range\n // by coordRange. And this it only used in brush component so it is no\n // need to be adapted to coordRanges.\n var result = coordConvert[area.brushType](0, coordSys, coordRange);\n area.__rangeOffset = {\n offset: diffProcessor[area.brushType](result.values, area.range, [1, 1]),\n xyMinMax: result.xyMinMax\n };\n }\n });\n return areas;\n };\n BrushTargetManager.prototype.matchOutputRanges = function (areas, ecModel, cb) {\n each(areas, function (area) {\n var targetInfo = this.findTargetInfo(area, ecModel);\n if (targetInfo && targetInfo !== true) {\n each(targetInfo.coordSyses, function (coordSys) {\n var result = coordConvert[area.brushType](1, coordSys, area.range, true);\n cb(area, result.values, coordSys, ecModel);\n });\n }\n }, this);\n };\n /**\n * the `areas` is `BrushModel.areas`.\n * Called in layout stage.\n * convert `area.coordRange` to global range and set panelId to `area.range`.\n */\n BrushTargetManager.prototype.setInputRanges = function (areas, ecModel) {\n each(areas, function (area) {\n var targetInfo = this.findTargetInfo(area, ecModel);\n if (process.env.NODE_ENV !== 'production') {\n assert(!targetInfo || targetInfo === true || area.coordRange, 'coordRange must be specified when coord index specified.');\n assert(!targetInfo || targetInfo !== true || area.range, 'range must be specified in global brush.');\n }\n area.range = area.range || [];\n // convert coordRange to global range and set panelId.\n if (targetInfo && targetInfo !== true) {\n area.panelId = targetInfo.panelId;\n // (1) area.range should always be calculate from coordRange but does\n // not keep its original value, for the sake of the dataZoom scenario,\n // where area.coordRange remains unchanged but area.range may be changed.\n // (2) Only support converting one coordRange to pixel range in brush\n // component. So do not consider `coordRanges`.\n // (3) About __rangeOffset, see comment above.\n var result = coordConvert[area.brushType](0, targetInfo.coordSys, area.coordRange);\n var rangeOffset = area.__rangeOffset;\n area.range = rangeOffset ? diffProcessor[area.brushType](result.values, rangeOffset.offset, getScales(result.xyMinMax, rangeOffset.xyMinMax)) : result.values;\n }\n }, this);\n };\n BrushTargetManager.prototype.makePanelOpts = function (api, getDefaultBrushType) {\n return map(this._targetInfoList, function (targetInfo) {\n var rect = targetInfo.getPanelRect();\n return {\n panelId: targetInfo.panelId,\n defaultBrushType: getDefaultBrushType ? getDefaultBrushType(targetInfo) : null,\n clipPath: brushHelper.makeRectPanelClipPath(rect),\n isTargetByCursor: brushHelper.makeRectIsTargetByCursor(rect, api, targetInfo.coordSysModel),\n getLinearBrushOtherExtent: brushHelper.makeLinearBrushOtherExtent(rect)\n };\n });\n };\n BrushTargetManager.prototype.controlSeries = function (area, seriesModel, ecModel) {\n // Check whether area is bound in coord, and series do not belong to that coord.\n // If do not do this check, some brush (like lineX) will controll all axes.\n var targetInfo = this.findTargetInfo(area, ecModel);\n return targetInfo === true || targetInfo && indexOf(targetInfo.coordSyses, seriesModel.coordinateSystem) >= 0;\n };\n /**\n * If return Object, a coord found.\n * If return true, global found.\n * Otherwise nothing found.\n */\n BrushTargetManager.prototype.findTargetInfo = function (area, ecModel) {\n var targetInfoList = this._targetInfoList;\n var foundCpts = parseFinder(ecModel, area);\n for (var i = 0; i < targetInfoList.length; i++) {\n var targetInfo = targetInfoList[i];\n var areaPanelId = area.panelId;\n if (areaPanelId) {\n if (targetInfo.panelId === areaPanelId) {\n return targetInfo;\n }\n } else {\n for (var j = 0; j < targetInfoMatchers.length; j++) {\n if (targetInfoMatchers[j](foundCpts, targetInfo)) {\n return targetInfo;\n }\n }\n }\n }\n return true;\n };\n return BrushTargetManager;\n}();\nfunction formatMinMax(minMax) {\n minMax[0] > minMax[1] && minMax.reverse();\n return minMax;\n}\nfunction parseFinder(ecModel, finder) {\n return modelUtilParseFinder(ecModel, finder, {\n includeMainTypes: INCLUDE_FINDER_MAIN_TYPES\n });\n}\nvar targetInfoBuilders = {\n grid: function (foundCpts, targetInfoList) {\n var xAxisModels = foundCpts.xAxisModels;\n var yAxisModels = foundCpts.yAxisModels;\n var gridModels = foundCpts.gridModels;\n // Remove duplicated.\n var gridModelMap = createHashMap();\n var xAxesHas = {};\n var yAxesHas = {};\n if (!xAxisModels && !yAxisModels && !gridModels) {\n return;\n }\n each(xAxisModels, function (axisModel) {\n var gridModel = axisModel.axis.grid.model;\n gridModelMap.set(gridModel.id, gridModel);\n xAxesHas[gridModel.id] = true;\n });\n each(yAxisModels, function (axisModel) {\n var gridModel = axisModel.axis.grid.model;\n gridModelMap.set(gridModel.id, gridModel);\n yAxesHas[gridModel.id] = true;\n });\n each(gridModels, function (gridModel) {\n gridModelMap.set(gridModel.id, gridModel);\n xAxesHas[gridModel.id] = true;\n yAxesHas[gridModel.id] = true;\n });\n gridModelMap.each(function (gridModel) {\n var grid = gridModel.coordinateSystem;\n var cartesians = [];\n each(grid.getCartesians(), function (cartesian, index) {\n if (indexOf(xAxisModels, cartesian.getAxis('x').model) >= 0 || indexOf(yAxisModels, cartesian.getAxis('y').model) >= 0) {\n cartesians.push(cartesian);\n }\n });\n targetInfoList.push({\n panelId: 'grid--' + gridModel.id,\n gridModel: gridModel,\n coordSysModel: gridModel,\n // Use the first one as the representitive coordSys.\n coordSys: cartesians[0],\n coordSyses: cartesians,\n getPanelRect: panelRectBuilders.grid,\n xAxisDeclared: xAxesHas[gridModel.id],\n yAxisDeclared: yAxesHas[gridModel.id]\n });\n });\n },\n geo: function (foundCpts, targetInfoList) {\n each(foundCpts.geoModels, function (geoModel) {\n var coordSys = geoModel.coordinateSystem;\n targetInfoList.push({\n panelId: 'geo--' + geoModel.id,\n geoModel: geoModel,\n coordSysModel: geoModel,\n coordSys: coordSys,\n coordSyses: [coordSys],\n getPanelRect: panelRectBuilders.geo\n });\n });\n }\n};\nvar targetInfoMatchers = [\n// grid\nfunction (foundCpts, targetInfo) {\n var xAxisModel = foundCpts.xAxisModel;\n var yAxisModel = foundCpts.yAxisModel;\n var gridModel = foundCpts.gridModel;\n !gridModel && xAxisModel && (gridModel = xAxisModel.axis.grid.model);\n !gridModel && yAxisModel && (gridModel = yAxisModel.axis.grid.model);\n return gridModel && gridModel === targetInfo.gridModel;\n},\n// geo\nfunction (foundCpts, targetInfo) {\n var geoModel = foundCpts.geoModel;\n return geoModel && geoModel === targetInfo.geoModel;\n}];\nvar panelRectBuilders = {\n grid: function () {\n // grid is not Transformable.\n return this.coordSys.master.getRect().clone();\n },\n geo: function () {\n var coordSys = this.coordSys;\n var rect = coordSys.getBoundingRect().clone();\n // geo roam and zoom transform\n rect.applyTransform(graphic.getTransform(coordSys));\n return rect;\n }\n};\nvar coordConvert = {\n lineX: curry(axisConvert, 0),\n lineY: curry(axisConvert, 1),\n rect: function (to, coordSys, rangeOrCoordRange, clamp) {\n var xminymin = to ? coordSys.pointToData([rangeOrCoordRange[0][0], rangeOrCoordRange[1][0]], clamp) : coordSys.dataToPoint([rangeOrCoordRange[0][0], rangeOrCoordRange[1][0]], clamp);\n var xmaxymax = to ? coordSys.pointToData([rangeOrCoordRange[0][1], rangeOrCoordRange[1][1]], clamp) : coordSys.dataToPoint([rangeOrCoordRange[0][1], rangeOrCoordRange[1][1]], clamp);\n var values = [formatMinMax([xminymin[0], xmaxymax[0]]), formatMinMax([xminymin[1], xmaxymax[1]])];\n return {\n values: values,\n xyMinMax: values\n };\n },\n polygon: function (to, coordSys, rangeOrCoordRange, clamp) {\n var xyMinMax = [[Infinity, -Infinity], [Infinity, -Infinity]];\n var values = map(rangeOrCoordRange, function (item) {\n var p = to ? coordSys.pointToData(item, clamp) : coordSys.dataToPoint(item, clamp);\n xyMinMax[0][0] = Math.min(xyMinMax[0][0], p[0]);\n xyMinMax[1][0] = Math.min(xyMinMax[1][0], p[1]);\n xyMinMax[0][1] = Math.max(xyMinMax[0][1], p[0]);\n xyMinMax[1][1] = Math.max(xyMinMax[1][1], p[1]);\n return p;\n });\n return {\n values: values,\n xyMinMax: xyMinMax\n };\n }\n};\nfunction axisConvert(axisNameIndex, to, coordSys, rangeOrCoordRange) {\n if (process.env.NODE_ENV !== 'production') {\n assert(coordSys.type === 'cartesian2d', 'lineX/lineY brush is available only in cartesian2d.');\n }\n var axis = coordSys.getAxis(['x', 'y'][axisNameIndex]);\n var values = formatMinMax(map([0, 1], function (i) {\n return to ? axis.coordToData(axis.toLocalCoord(rangeOrCoordRange[i]), true) : axis.toGlobalCoord(axis.dataToCoord(rangeOrCoordRange[i]));\n }));\n var xyMinMax = [];\n xyMinMax[axisNameIndex] = values;\n xyMinMax[1 - axisNameIndex] = [NaN, NaN];\n return {\n values: values,\n xyMinMax: xyMinMax\n };\n}\nvar diffProcessor = {\n lineX: curry(axisDiffProcessor, 0),\n lineY: curry(axisDiffProcessor, 1),\n rect: function (values, refer, scales) {\n return [[values[0][0] - scales[0] * refer[0][0], values[0][1] - scales[0] * refer[0][1]], [values[1][0] - scales[1] * refer[1][0], values[1][1] - scales[1] * refer[1][1]]];\n },\n polygon: function (values, refer, scales) {\n return map(values, function (item, idx) {\n return [item[0] - scales[0] * refer[idx][0], item[1] - scales[1] * refer[idx][1]];\n });\n }\n};\nfunction axisDiffProcessor(axisNameIndex, values, refer, scales) {\n return [values[0] - scales[axisNameIndex] * refer[0], values[1] - scales[axisNameIndex] * refer[1]];\n}\n// We have to process scale caused by dataZoom manually,\n// although it might be not accurate.\n// Return [0~1, 0~1]\nfunction getScales(xyMinMaxCurr, xyMinMaxOrigin) {\n var sizeCurr = getSize(xyMinMaxCurr);\n var sizeOrigin = getSize(xyMinMaxOrigin);\n var scales = [sizeCurr[0] / sizeOrigin[0], sizeCurr[1] / sizeOrigin[1]];\n isNaN(scales[0]) && (scales[0] = 1);\n isNaN(scales[1]) && (scales[1] = 1);\n return scales;\n}\nfunction getSize(xyMinMax) {\n return xyMinMax ? [xyMinMax[0][1] - xyMinMax[0][0], xyMinMax[1][1] - xyMinMax[1][0]] : [NaN, NaN];\n}\nexport default BrushTargetManager;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// TODO depends on DataZoom and Brush\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BrushController from '../../helper/BrushController.js';\nimport BrushTargetManager from '../../helper/BrushTargetManager.js';\nimport * as history from '../../dataZoom/history.js';\nimport sliderMove from '../../helper/sliderMove.js';\nimport { ToolboxFeature } from '../featureManager.js';\nimport { makeInternalComponentId, parseFinder } from '../../../util/model.js';\nimport { registerInternalOptionCreator } from '../../../model/internalComponentCreator.js';\nimport tokens from '../../../visual/tokens.js';\nvar each = zrUtil.each;\nvar DATA_ZOOM_ID_BASE = makeInternalComponentId('toolbox-dataZoom_');\nvar ICON_TYPES = ['zoom', 'back'];\nvar DataZoomFeature = /** @class */function (_super) {\n __extends(DataZoomFeature, _super);\n function DataZoomFeature() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DataZoomFeature.prototype.render = function (featureModel, ecModel, api, payload) {\n if (!this._brushController) {\n this._brushController = new BrushController(api.getZr());\n this._brushController.on('brush', zrUtil.bind(this._onBrush, this)).mount();\n }\n updateZoomBtnStatus(featureModel, ecModel, this, payload, api);\n updateBackBtnStatus(featureModel, ecModel);\n };\n DataZoomFeature.prototype.onclick = function (ecModel, api, type) {\n handlers[type].call(this);\n };\n DataZoomFeature.prototype.remove = function (ecModel, api) {\n this._brushController && this._brushController.unmount();\n };\n DataZoomFeature.prototype.dispose = function (ecModel, api) {\n this._brushController && this._brushController.dispose();\n };\n DataZoomFeature.prototype._onBrush = function (eventParam) {\n var areas = eventParam.areas;\n if (!eventParam.isEnd || !areas.length) {\n return;\n }\n var snapshot = {};\n var ecModel = this.ecModel;\n this._brushController.updateCovers([]); // remove cover\n var brushTargetManager = new BrushTargetManager(makeAxisFinder(this.model), ecModel, {\n include: ['grid']\n });\n brushTargetManager.matchOutputRanges(areas, ecModel, function (area, coordRange, coordSys) {\n if (coordSys.type !== 'cartesian2d') {\n return;\n }\n var brushType = area.brushType;\n if (brushType === 'rect') {\n setBatch('x', coordSys, coordRange[0]);\n setBatch('y', coordSys, coordRange[1]);\n } else {\n setBatch({\n lineX: 'x',\n lineY: 'y'\n }[brushType], coordSys, coordRange);\n }\n });\n history.push(ecModel, snapshot);\n this._dispatchZoomAction(snapshot);\n function setBatch(dimName, coordSys, minMax) {\n var axis = coordSys.getAxis(dimName);\n var axisModel = axis.model;\n var dataZoomModel = findDataZoom(dimName, axisModel, ecModel);\n // Restrict range.\n var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy(axisModel).getMinMaxSpan();\n if (minMaxSpan.minValueSpan != null || minMaxSpan.maxValueSpan != null) {\n minMax = sliderMove(0, minMax.slice(), axis.scale.getExtent(), 0, minMaxSpan.minValueSpan, minMaxSpan.maxValueSpan);\n }\n dataZoomModel && (snapshot[dataZoomModel.id] = {\n dataZoomId: dataZoomModel.id,\n startValue: minMax[0],\n endValue: minMax[1]\n });\n }\n function findDataZoom(dimName, axisModel, ecModel) {\n var found;\n ecModel.eachComponent({\n mainType: 'dataZoom',\n subType: 'select'\n }, function (dzModel) {\n var has = dzModel.getAxisModel(dimName, axisModel.componentIndex);\n has && (found = dzModel);\n });\n return found;\n }\n };\n ;\n DataZoomFeature.prototype._dispatchZoomAction = function (snapshot) {\n var batch = [];\n // Convert from hash map to array.\n each(snapshot, function (batchItem, dataZoomId) {\n batch.push(zrUtil.clone(batchItem));\n });\n batch.length && this.api.dispatchAction({\n type: 'dataZoom',\n from: this.uid,\n batch: batch\n });\n };\n DataZoomFeature.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n filterMode: 'filter',\n // Icon group\n icon: {\n zoom: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1',\n back: 'M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26'\n },\n // `zoom`, `back`\n title: ecModel.getLocaleModel().get(['toolbox', 'dataZoom', 'title']),\n brushStyle: {\n borderWidth: 0,\n color: tokens.color.backgroundTint\n }\n };\n return defaultOption;\n };\n return DataZoomFeature;\n}(ToolboxFeature);\nvar handlers = {\n zoom: function () {\n var nextActive = !this._isZoomActive;\n this.api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'dataZoomSelect',\n dataZoomSelectActive: nextActive\n });\n },\n back: function () {\n this._dispatchZoomAction(history.pop(this.ecModel));\n }\n};\nfunction makeAxisFinder(dzFeatureModel) {\n var setting = {\n xAxisIndex: dzFeatureModel.get('xAxisIndex', true),\n yAxisIndex: dzFeatureModel.get('yAxisIndex', true),\n xAxisId: dzFeatureModel.get('xAxisId', true),\n yAxisId: dzFeatureModel.get('yAxisId', true)\n };\n // If both `xAxisIndex` `xAxisId` not set, it means 'all'.\n // If both `yAxisIndex` `yAxisId` not set, it means 'all'.\n // Some old cases set like this below to close yAxis control but leave xAxis control:\n // `{ feature: { dataZoom: { yAxisIndex: false } }`.\n if (setting.xAxisIndex == null && setting.xAxisId == null) {\n setting.xAxisIndex = 'all';\n }\n if (setting.yAxisIndex == null && setting.yAxisId == null) {\n setting.yAxisIndex = 'all';\n }\n return setting;\n}\nfunction updateBackBtnStatus(featureModel, ecModel) {\n featureModel.setIconStatus('back', history.count(ecModel) > 1 ? 'emphasis' : 'normal');\n}\nfunction updateZoomBtnStatus(featureModel, ecModel, view, payload, api) {\n var zoomActive = view._isZoomActive;\n if (payload && payload.type === 'takeGlobalCursor') {\n zoomActive = payload.key === 'dataZoomSelect' ? payload.dataZoomSelectActive : false;\n }\n view._isZoomActive = zoomActive;\n featureModel.setIconStatus('zoom', zoomActive ? 'emphasis' : 'normal');\n var brushTargetManager = new BrushTargetManager(makeAxisFinder(featureModel), ecModel, {\n include: ['grid']\n });\n var panels = brushTargetManager.makePanelOpts(api, function (targetInfo) {\n return targetInfo.xAxisDeclared && !targetInfo.yAxisDeclared ? 'lineX' : !targetInfo.xAxisDeclared && targetInfo.yAxisDeclared ? 'lineY' : 'rect';\n });\n view._brushController.setPanels(panels).enableBrush(zoomActive && panels.length ? {\n brushType: 'auto',\n brushStyle: featureModel.getModel('brushStyle').getItemStyle()\n } : false);\n}\nregisterInternalOptionCreator('dataZoom', function (ecModel) {\n var toolboxModel = ecModel.getComponent('toolbox', 0);\n var featureDataZoomPath = ['feature', 'dataZoom'];\n if (!toolboxModel || toolboxModel.get(featureDataZoomPath) == null) {\n return;\n }\n var dzFeatureModel = toolboxModel.getModel(featureDataZoomPath);\n var dzOptions = [];\n var finder = makeAxisFinder(dzFeatureModel);\n var finderResult = parseFinder(ecModel, finder);\n each(finderResult.xAxisModels, function (axisModel) {\n return buildInternalOptions(axisModel, 'xAxis', 'xAxisIndex');\n });\n each(finderResult.yAxisModels, function (axisModel) {\n return buildInternalOptions(axisModel, 'yAxis', 'yAxisIndex');\n });\n function buildInternalOptions(axisModel, axisMainType, axisIndexPropName) {\n var axisIndex = axisModel.componentIndex;\n var newOpt = {\n type: 'select',\n $fromToolbox: true,\n // Default to be filter\n filterMode: dzFeatureModel.get('filterMode', true) || 'filter',\n // Id for merge mapping.\n id: DATA_ZOOM_ID_BASE + axisMainType + axisIndex\n };\n newOpt[axisIndexPropName] = axisIndex;\n dzOptions.push(newOpt);\n }\n return dzOptions;\n});\nexport default DataZoomFeature;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installDataZoomSelect } from '../../component/dataZoom/installDataZoomSelect.js';\nimport ToolboxModel from './ToolboxModel.js';\nimport ToolboxView from './ToolboxView.js';\n// TODOD: REGISTER IN INSTALL\nimport { registerFeature } from './featureManager.js';\nimport SaveAsImage from './feature/SaveAsImage.js';\nimport MagicType from './feature/MagicType.js';\nimport DataView from './feature/DataView.js';\nimport Restore from './feature/Restore.js';\nimport DataZoom from './feature/DataZoom.js';\nexport function install(registers) {\n registers.registerComponentModel(ToolboxModel);\n registers.registerComponentView(ToolboxView);\n registerFeature('saveAsImage', SaveAsImage);\n registerFeature('magicType', MagicType);\n registerFeature('dataView', DataView);\n registerFeature('dataZoom', DataZoom);\n registerFeature('restore', Restore);\n use(installDataZoomSelect);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nimport tokens from '../../visual/tokens.js';\nvar TooltipModel = /** @class */function (_super) {\n __extends(TooltipModel, _super);\n function TooltipModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TooltipModel.type;\n return _this;\n }\n TooltipModel.type = 'tooltip';\n TooltipModel.dependencies = ['axisPointer'];\n TooltipModel.defaultOption = {\n // zlevel: 0,\n z: 60,\n show: true,\n // tooltip main content\n showContent: true,\n // 'trigger' only works on coordinate system.\n // 'item' | 'axis' | 'none'\n trigger: 'item',\n // 'click' | 'mousemove' | 'none'\n triggerOn: 'mousemove|click',\n alwaysShowContent: false,\n renderMode: 'auto',\n // whether restraint content inside viewRect.\n // If renderMode: 'richText', default true.\n // If renderMode: 'html', defaults to `false` (for backward compat).\n confine: null,\n showDelay: 0,\n hideDelay: 100,\n // Animation transition time, unit is second\n transitionDuration: 0.4,\n displayTransition: true,\n enterable: false,\n backgroundColor: tokens.color.neutral00,\n // box shadow\n shadowBlur: 10,\n shadowColor: 'rgba(0, 0, 0, .2)',\n shadowOffsetX: 1,\n shadowOffsetY: 2,\n // tooltip border radius, unit is px, default is 4\n borderRadius: 4,\n // tooltip border width, unit is px, default is 0 (no border)\n borderWidth: 1,\n defaultBorderColor: tokens.color.border,\n // Tooltip inside padding, default is 5 for all direction\n // Array is allowed to set up, right, bottom, left, same with css\n // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`.\n padding: null,\n // Extra css text\n extraCssText: '',\n // axis indicator, trigger by axis\n axisPointer: {\n // default is line\n // legal values: 'line' | 'shadow' | 'cross'\n type: 'line',\n // Valid when type is line, appoint tooltip line locate on which line. Optional\n // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto'\n // default is 'auto', chose the axis which type is category.\n // for multiply y axis, cartesian coord chose x axis, polar chose angle axis\n axis: 'auto',\n animation: 'auto',\n animationDurationUpdate: 200,\n animationEasingUpdate: 'exponentialOut',\n crossStyle: {\n color: tokens.color.borderShade,\n width: 1,\n type: 'dashed',\n // TODO formatter\n textStyle: {}\n }\n // lineStyle and shadowStyle should not be specified here,\n // otherwise it will always override those styles on option.axisPointer.\n },\n textStyle: {\n color: tokens.color.tertiary,\n fontSize: 14\n }\n };\n return TooltipModel;\n}(ComponentModel);\nexport default TooltipModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { toCamelCase } from '../../util/format.js';\nimport env from 'zrender/lib/core/env.js';\n/* global document */\nexport function shouldTooltipConfine(tooltipModel) {\n var confineOption = tooltipModel.get('confine');\n return confineOption != null ? !!confineOption\n // In richText mode, the outside part can not be visible.\n : tooltipModel.get('renderMode') === 'richText';\n}\nfunction testStyle(styleProps) {\n if (!env.domSupported) {\n return;\n }\n var style = document.documentElement.style;\n for (var i = 0, len = styleProps.length; i < len; i++) {\n if (styleProps[i] in style) {\n return styleProps[i];\n }\n }\n}\nexport var TRANSFORM_VENDOR = testStyle(['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\nexport var TRANSITION_VENDOR = testStyle(['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\nexport function toCSSVendorPrefix(styleVendor, styleProp) {\n if (!styleVendor) {\n return styleProp;\n }\n styleProp = toCamelCase(styleProp, true);\n var idx = styleVendor.indexOf(styleProp);\n styleVendor = idx === -1 ? styleProp : \"-\" + styleVendor.slice(0, idx) + \"-\" + styleProp;\n return styleVendor.toLowerCase();\n}\nexport function getComputedStyle(el, style) {\n var stl = el.currentStyle || document.defaultView && document.defaultView.getComputedStyle(el);\n return stl ? style ? stl[style] : stl : null;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isString, indexOf, each, bind, isFunction, isArray, isDom, retrieve2 } from 'zrender/lib/core/util.js';\nimport { normalizeEvent } from 'zrender/lib/core/event.js';\nimport { transformLocalCoord, transformLocalCoordClear } from 'zrender/lib/core/dom.js';\nimport env from 'zrender/lib/core/env.js';\nimport { convertToColorString, toCamelCase, normalizeCssArray } from '../../util/format.js';\nimport { shouldTooltipConfine, toCSSVendorPrefix, getComputedStyle, TRANSFORM_VENDOR, TRANSITION_VENDOR } from './helper.js';\nimport { getPaddingFromTooltipModel } from './tooltipMarkup.js';\n/* global document, window */\nvar CSS_TRANSITION_VENDOR = toCSSVendorPrefix(TRANSITION_VENDOR, 'transition');\nvar CSS_TRANSFORM_VENDOR = toCSSVendorPrefix(TRANSFORM_VENDOR, 'transform');\n// eslint-disable-next-line\nvar gCssText = \"position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;\" + (env.transform3dSupported ? 'will-change:transform;' : '');\nfunction mirrorPos(pos) {\n pos = pos === 'left' ? 'right' : pos === 'right' ? 'left' : pos === 'top' ? 'bottom' : 'top';\n return pos;\n}\nfunction assembleArrow(tooltipModel, borderColor, arrowPosition) {\n if (!isString(arrowPosition) || arrowPosition === 'inside') {\n return '';\n }\n var backgroundColor = tooltipModel.get('backgroundColor');\n var borderWidth = tooltipModel.get('borderWidth');\n borderColor = convertToColorString(borderColor);\n var arrowPos = mirrorPos(arrowPosition);\n var arrowSize = Math.max(Math.round(borderWidth) * 1.5, 6);\n var positionStyle = '';\n var transformStyle = CSS_TRANSFORM_VENDOR + ':';\n var rotateDeg;\n if (indexOf(['left', 'right'], arrowPos) > -1) {\n positionStyle += 'top:50%';\n transformStyle += \"translateY(-50%) rotate(\" + (rotateDeg = arrowPos === 'left' ? -225 : -45) + \"deg)\";\n } else {\n positionStyle += 'left:50%';\n transformStyle += \"translateX(-50%) rotate(\" + (rotateDeg = arrowPos === 'top' ? 225 : 45) + \"deg)\";\n }\n var rotateRadian = rotateDeg * Math.PI / 180;\n var arrowWH = arrowSize + borderWidth;\n var rotatedWH = arrowWH * Math.abs(Math.cos(rotateRadian)) + arrowWH * Math.abs(Math.sin(rotateRadian));\n var arrowOffset = Math.round(((rotatedWH - Math.SQRT2 * borderWidth) / 2 + Math.SQRT2 * borderWidth - (rotatedWH - arrowWH) / 2) * 100) / 100;\n positionStyle += \";\" + arrowPos + \":-\" + arrowOffset + \"px\";\n var borderStyle = borderColor + \" solid \" + borderWidth + \"px;\";\n var styleCss = [\"position:absolute;width:\" + arrowSize + \"px;height:\" + arrowSize + \"px;z-index:-1;\", positionStyle + \";\" + transformStyle + \";\", \"border-bottom:\" + borderStyle, \"border-right:\" + borderStyle, \"background-color:\" + backgroundColor + \";\"];\n return \"<div style=\\\"\" + styleCss.join('') + \"\\\"></div>\";\n}\nfunction assembleTransition(duration, onlyFadeTransition, enableDisplayTransition) {\n var transitionCurve = 'cubic-bezier(0.23,1,0.32,1)';\n var transitionOption = '';\n var transitionText = '';\n if (enableDisplayTransition) {\n transitionOption = \" \" + duration / 2 + \"s \" + transitionCurve;\n transitionText = \"opacity\" + transitionOption + \",visibility\" + transitionOption;\n }\n if (!onlyFadeTransition) {\n transitionOption = \" \" + duration + \"s \" + transitionCurve;\n transitionText += (transitionText.length ? ',' : '') + (env.transformSupported ? \"\" + CSS_TRANSFORM_VENDOR + transitionOption : \",left\" + transitionOption + \",top\" + transitionOption);\n }\n return CSS_TRANSITION_VENDOR + ':' + transitionText;\n}\nfunction assembleTransform(x, y, toString) {\n // If using float on style, the final width of the dom might\n // keep changing slightly while mouse move. So `toFixed(0)` them.\n var x0 = x.toFixed(0) + 'px';\n var y0 = y.toFixed(0) + 'px';\n // not support transform, use `left` and `top` instead.\n if (!env.transformSupported) {\n return toString ? \"top:\" + y0 + \";left:\" + x0 + \";\" : [['top', y0], ['left', x0]];\n }\n // support transform\n var is3d = env.transform3dSupported;\n var translate = \"translate\" + (is3d ? '3d' : '') + \"(\" + x0 + \",\" + y0 + (is3d ? ',0' : '') + \")\";\n return toString ? 'top:0;left:0;' + CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [['top', 0], ['left', 0], [TRANSFORM_VENDOR, translate]];\n}\n/**\n * @param {Object} textStyle\n * @return {string}\n * @inner\n */\nfunction assembleFont(textStyleModel) {\n var cssText = [];\n var fontSize = textStyleModel.get('fontSize');\n var color = textStyleModel.getTextColor();\n color && cssText.push('color:' + color);\n cssText.push('font:' + textStyleModel.getFont());\n // @ts-ignore, leave it to the tooltip refactor.\n var lineHeight = retrieve2(textStyleModel.get('lineHeight'), Math.round(fontSize * 3 / 2));\n fontSize && cssText.push('line-height:' + lineHeight + 'px');\n var shadowColor = textStyleModel.get('textShadowColor');\n var shadowBlur = textStyleModel.get('textShadowBlur') || 0;\n var shadowOffsetX = textStyleModel.get('textShadowOffsetX') || 0;\n var shadowOffsetY = textStyleModel.get('textShadowOffsetY') || 0;\n shadowColor && shadowBlur && cssText.push('text-shadow:' + shadowOffsetX + 'px ' + shadowOffsetY + 'px ' + shadowBlur + 'px ' + shadowColor);\n each(['decoration', 'align'], function (name) {\n var val = textStyleModel.get(name);\n val && cssText.push('text-' + name + ':' + val);\n });\n return cssText.join(';');\n}\nfunction assembleCssText(tooltipModel, enableTransition, onlyFadeTransition, enableDisplayTransition) {\n var cssText = [];\n var transitionDuration = tooltipModel.get('transitionDuration');\n var backgroundColor = tooltipModel.get('backgroundColor');\n var shadowBlur = tooltipModel.get('shadowBlur');\n var shadowColor = tooltipModel.get('shadowColor');\n var shadowOffsetX = tooltipModel.get('shadowOffsetX');\n var shadowOffsetY = tooltipModel.get('shadowOffsetY');\n var textStyleModel = tooltipModel.getModel('textStyle');\n var padding = getPaddingFromTooltipModel(tooltipModel, 'html');\n var boxShadow = shadowOffsetX + \"px \" + shadowOffsetY + \"px \" + shadowBlur + \"px \" + shadowColor;\n cssText.push('box-shadow:' + boxShadow);\n // Animation transition. Do not animate when transitionDuration <= 0.\n enableTransition && transitionDuration > 0 && cssText.push(assembleTransition(transitionDuration, onlyFadeTransition, enableDisplayTransition));\n if (backgroundColor) {\n cssText.push('background-color:' + backgroundColor);\n }\n // Border style\n each(['width', 'color', 'radius'], function (name) {\n var borderName = 'border-' + name;\n var camelCase = toCamelCase(borderName);\n var val = tooltipModel.get(camelCase);\n val != null && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px'));\n });\n // Text style\n cssText.push(assembleFont(textStyleModel));\n // Padding\n if (padding != null) {\n cssText.push('padding:' + normalizeCssArray(padding).join('px ') + 'px');\n }\n return cssText.join(';') + ';';\n}\n// If not able to make, do not modify the input `out`.\nfunction makeStyleCoord(out, zr, container, zrX, zrY) {\n var zrPainter = zr && zr.painter;\n if (container) {\n var zrViewportRoot = zrPainter && zrPainter.getViewportRoot();\n if (zrViewportRoot) {\n // Some APPs might use scale on body, so we support CSS transform here.\n transformLocalCoord(out, zrViewportRoot, container, zrX, zrY);\n }\n } else {\n out[0] = zrX;\n out[1] = zrY;\n // xy should be based on canvas root. But tooltipContent is\n // the sibling of canvas root. So padding of ec container\n // should be considered here.\n var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset();\n if (viewportRootOffset) {\n out[0] += viewportRootOffset.offsetLeft;\n out[1] += viewportRootOffset.offsetTop;\n }\n }\n out[2] = out[0] / zr.getWidth();\n out[3] = out[1] / zr.getHeight();\n}\nvar TooltipHTMLContent = /** @class */function () {\n function TooltipHTMLContent(api, opt) {\n this._show = false;\n this._styleCoord = [0, 0, 0, 0];\n this._enterable = true;\n this._alwaysShowContent = false;\n this._firstShow = true;\n this._longHide = true;\n if (env.wxa) {\n return null;\n }\n var el = document.createElement('div');\n // TODO: TYPE\n el.domBelongToZr = true;\n this.el = el;\n var zr = this._zr = api.getZr();\n var appendTo = opt.appendTo;\n var container = appendTo && (isString(appendTo) ? document.querySelector(appendTo) : isDom(appendTo) ? appendTo : isFunction(appendTo) && appendTo(api.getDom()));\n makeStyleCoord(this._styleCoord, zr, container, api.getWidth() / 2, api.getHeight() / 2);\n (container || api.getDom()).appendChild(el);\n this._api = api;\n this._container = container;\n // FIXME\n // Is it needed to trigger zr event manually if\n // the browser do not support `pointer-events: none`.\n var self = this;\n el.onmouseenter = function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n self._inContent = true;\n };\n el.onmousemove = function (e) {\n e = e || window.event;\n if (!self._enterable) {\n // `pointer-events: none` is set to tooltip content div\n // if `enterable` is set as `false`, and `el.onmousemove`\n // can not be triggered. But in browser that do not\n // support `pointer-events`, we need to do this:\n // Try trigger zrender event to avoid mouse\n // in and out shape too frequently\n var handler = zr.handler;\n var zrViewportRoot = zr.painter.getViewportRoot();\n normalizeEvent(zrViewportRoot, e, true);\n handler.dispatch('mousemove', e);\n }\n };\n el.onmouseleave = function () {\n // set `_inContent` to `false` before `hideLater`\n self._inContent = false;\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n };\n }\n /**\n * Update when tooltip is rendered\n */\n TooltipHTMLContent.prototype.update = function (tooltipModel) {\n // FIXME\n // Move this logic to ec main?\n if (!this._container) {\n var container = this._api.getDom();\n var position = getComputedStyle(container, 'position');\n var domStyle = container.style;\n if (domStyle.position !== 'absolute' && position !== 'absolute') {\n domStyle.position = 'relative';\n }\n }\n // move tooltip if chart resized\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveIfResized();\n // update alwaysShowContent\n this._alwaysShowContent = alwaysShowContent;\n this._enableDisplayTransition = tooltipModel.get('displayTransition') && tooltipModel.get('transitionDuration') > 0;\n // update className\n this.el.className = tooltipModel.get('className') || '';\n // Hide the tooltip\n // PENDING\n // this.hide();\n };\n TooltipHTMLContent.prototype.show = function (tooltipModel, nearPointColor) {\n clearTimeout(this._hideTimeout);\n clearTimeout(this._longHideTimeout);\n var el = this.el;\n var style = el.style;\n var styleCoord = this._styleCoord;\n if (!el.innerHTML) {\n style.display = 'none';\n } else {\n style.cssText = gCssText + assembleCssText(tooltipModel, !this._firstShow, this._longHide, this._enableDisplayTransition)\n // initial transform\n + assembleTransform(styleCoord[0], styleCoord[1], true) + (\"border-color:\" + convertToColorString(nearPointColor) + \";\") + (tooltipModel.get('extraCssText') || '')\n // If mouse occasionally move over the tooltip, a mouseout event will be\n // triggered by canvas, and cause some unexpectable result like dragging\n // stop, \"unfocusAdjacency\". Here `pointer-events: none` is used to solve\n // it. Although it is not supported by IE8~IE10, fortunately it is a rare\n // scenario.\n + (\";pointer-events:\" + (this._enterable ? 'auto' : 'none'));\n }\n this._show = true;\n this._firstShow = false;\n this._longHide = false;\n };\n TooltipHTMLContent.prototype.setContent = function (content, markers, tooltipModel, borderColor, arrowPosition) {\n var el = this.el;\n if (content == null) {\n el.innerHTML = '';\n return;\n }\n var arrow = '';\n if (isString(arrowPosition) && tooltipModel.get('trigger') === 'item' && !shouldTooltipConfine(tooltipModel)) {\n arrow = assembleArrow(tooltipModel, borderColor, arrowPosition);\n }\n if (isString(content)) {\n el.innerHTML = content + arrow;\n } else if (content) {\n // Clear previous\n el.innerHTML = '';\n if (!isArray(content)) {\n content = [content];\n }\n for (var i = 0; i < content.length; i++) {\n if (isDom(content[i]) && content[i].parentNode !== el) {\n el.appendChild(content[i]);\n }\n }\n // no arrow if empty\n if (arrow && el.childNodes.length) {\n // no need to create a new parent element, but it's not supported by IE 10 and older.\n // const arrowEl = document.createRange().createContextualFragment(arrow);\n var arrowEl = document.createElement('div');\n arrowEl.innerHTML = arrow;\n el.appendChild(arrowEl);\n }\n }\n };\n TooltipHTMLContent.prototype.setEnterable = function (enterable) {\n this._enterable = enterable;\n };\n TooltipHTMLContent.prototype.getSize = function () {\n var el = this.el;\n return el ? [el.offsetWidth, el.offsetHeight] : [0, 0];\n };\n TooltipHTMLContent.prototype.moveTo = function (zrX, zrY) {\n if (!this.el) {\n return;\n }\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, this._container, zrX, zrY);\n if (styleCoord[0] != null && styleCoord[1] != null) {\n var style_1 = this.el.style;\n var transforms = assembleTransform(styleCoord[0], styleCoord[1]);\n each(transforms, function (transform) {\n style_1[transform[0]] = transform[1];\n });\n }\n };\n /**\n * when `alwaysShowContent` is true,\n * move the tooltip after chart resized\n */\n TooltipHTMLContent.prototype._moveIfResized = function () {\n // The ratio of left to width\n var ratioX = this._styleCoord[2];\n // The ratio of top to height\n var ratioY = this._styleCoord[3];\n this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight());\n };\n TooltipHTMLContent.prototype.hide = function () {\n var _this = this;\n var style = this.el.style;\n if (this._enableDisplayTransition) {\n style.visibility = 'hidden';\n style.opacity = '0';\n } else {\n style.display = 'none';\n }\n env.transform3dSupported && (style.willChange = '');\n this._show = false;\n this._longHideTimeout = setTimeout(function () {\n return _this._longHide = true;\n }, 500);\n };\n TooltipHTMLContent.prototype.hideLater = function (time) {\n if (this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent) {\n if (time) {\n this._hideDelay = time;\n // Set show false to avoid invoke hideLater multiple times\n this._show = false;\n this._hideTimeout = setTimeout(bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n };\n TooltipHTMLContent.prototype.isShow = function () {\n return this._show;\n };\n TooltipHTMLContent.prototype.dispose = function () {\n clearTimeout(this._hideTimeout);\n clearTimeout(this._longHideTimeout);\n var zr = this._zr;\n transformLocalCoordClear(zr && zr.painter && zr.painter.getViewportRoot(), this._container);\n var el = this.el;\n if (el) {\n el.onmouseenter = el.onmousemove = el.onmouseleave = null;\n var parentNode = el.parentNode;\n parentNode && parentNode.removeChild(el);\n }\n this.el = this._container = null;\n };\n return TooltipHTMLContent;\n}();\nexport default TooltipHTMLContent;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ZRText from 'zrender/lib/graphic/Text.js';\nimport { getPaddingFromTooltipModel } from './tooltipMarkup.js';\nimport { throwError } from '../../util/log.js';\nvar TooltipRichContent = /** @class */function () {\n function TooltipRichContent(api) {\n this._show = false;\n this._styleCoord = [0, 0, 0, 0];\n this._alwaysShowContent = false;\n this._enterable = true;\n this._zr = api.getZr();\n makeStyleCoord(this._styleCoord, this._zr, api.getWidth() / 2, api.getHeight() / 2);\n }\n /**\n * Update when tooltip is rendered\n */\n TooltipRichContent.prototype.update = function (tooltipModel) {\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveIfResized();\n // update alwaysShowContent\n this._alwaysShowContent = alwaysShowContent;\n };\n TooltipRichContent.prototype.show = function () {\n if (this._hideTimeout) {\n clearTimeout(this._hideTimeout);\n }\n this.el.show();\n this._show = true;\n };\n /**\n * Set tooltip content\n */\n TooltipRichContent.prototype.setContent = function (content, markupStyleCreator, tooltipModel, borderColor, arrowPosition) {\n var _this = this;\n if (zrUtil.isObject(content)) {\n throwError(process.env.NODE_ENV !== 'production' ? 'Passing DOM nodes as content is not supported in richText tooltip!' : '');\n }\n if (this.el) {\n this._zr.remove(this.el);\n }\n var textStyleModel = tooltipModel.getModel('textStyle');\n this.el = new ZRText({\n style: {\n rich: markupStyleCreator.richTextStyles,\n text: content,\n lineHeight: 22,\n borderWidth: 1,\n borderColor: borderColor,\n textShadowColor: textStyleModel.get('textShadowColor'),\n fill: tooltipModel.get(['textStyle', 'color']),\n padding: getPaddingFromTooltipModel(tooltipModel, 'richText'),\n verticalAlign: 'top',\n align: 'left'\n },\n z: tooltipModel.get('z')\n });\n zrUtil.each(['backgroundColor', 'borderRadius', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY'], function (propName) {\n _this.el.style[propName] = tooltipModel.get(propName);\n });\n zrUtil.each(['textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY'], function (propName) {\n _this.el.style[propName] = textStyleModel.get(propName) || 0;\n });\n this._zr.add(this.el);\n var self = this;\n this.el.on('mouseover', function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n self._inContent = true;\n });\n this.el.on('mouseout', function () {\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n self._inContent = false;\n });\n };\n TooltipRichContent.prototype.setEnterable = function (enterable) {\n this._enterable = enterable;\n };\n TooltipRichContent.prototype.getSize = function () {\n var el = this.el;\n var bounding = this.el.getBoundingRect();\n // bounding rect does not include shadow. For renderMode richText,\n // if overflow, it will be cut. So calculate them accurately.\n var shadowOuterSize = calcShadowOuterSize(el.style);\n return [bounding.width + shadowOuterSize.left + shadowOuterSize.right, bounding.height + shadowOuterSize.top + shadowOuterSize.bottom];\n };\n TooltipRichContent.prototype.moveTo = function (x, y) {\n var el = this.el;\n if (el) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, x, y);\n x = styleCoord[0];\n y = styleCoord[1];\n var style = el.style;\n var borderWidth = mathMaxWith0(style.borderWidth || 0);\n var shadowOuterSize = calcShadowOuterSize(style);\n // rich text x, y do not include border.\n el.x = x + borderWidth + shadowOuterSize.left;\n el.y = y + borderWidth + shadowOuterSize.top;\n el.markRedraw();\n }\n };\n /**\n * when `alwaysShowContent` is true,\n * move the tooltip after chart resized\n */\n TooltipRichContent.prototype._moveIfResized = function () {\n // The ratio of left to width\n var ratioX = this._styleCoord[2];\n // The ratio of top to height\n var ratioY = this._styleCoord[3];\n this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight());\n };\n TooltipRichContent.prototype.hide = function () {\n if (this.el) {\n this.el.hide();\n }\n this._show = false;\n };\n TooltipRichContent.prototype.hideLater = function (time) {\n if (this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent) {\n if (time) {\n this._hideDelay = time;\n // Set show false to avoid invoke hideLater multiple times\n this._show = false;\n this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n };\n TooltipRichContent.prototype.isShow = function () {\n return this._show;\n };\n TooltipRichContent.prototype.dispose = function () {\n this._zr.remove(this.el);\n };\n return TooltipRichContent;\n}();\nfunction mathMaxWith0(val) {\n return Math.max(0, val);\n}\nfunction calcShadowOuterSize(style) {\n var shadowBlur = mathMaxWith0(style.shadowBlur || 0);\n var shadowOffsetX = mathMaxWith0(style.shadowOffsetX || 0);\n var shadowOffsetY = mathMaxWith0(style.shadowOffsetY || 0);\n return {\n left: mathMaxWith0(shadowBlur - shadowOffsetX),\n right: mathMaxWith0(shadowBlur + shadowOffsetX),\n top: mathMaxWith0(shadowBlur - shadowOffsetY),\n bottom: mathMaxWith0(shadowBlur + shadowOffsetY)\n };\n}\nfunction makeStyleCoord(out, zr, zrX, zrY) {\n out[0] = zrX;\n out[1] = zrY;\n out[2] = out[0] / zr.getWidth();\n out[3] = out[1] / zr.getHeight();\n}\nexport default TooltipRichContent;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport { __extends } from \"tslib\";\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { bind, each, clone, trim, isString, isFunction, isArray, isObject, extend } from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport TooltipHTMLContent from './TooltipHTMLContent.js';\nimport TooltipRichContent from './TooltipRichContent.js';\nimport { convertToColorString, encodeHTML, formatTpl } from '../../util/format.js';\nimport { parsePercent } from '../../util/number.js';\nimport { Rect } from '../../util/graphic.js';\nimport findPointFromSeries from '../axisPointer/findPointFromSeries.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport Model from '../../model/Model.js';\nimport * as globalListener from '../axisPointer/globalListener.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport * as axisPointerViewHelper from '../axisPointer/viewHelper.js';\nimport { getTooltipRenderMode, preParseFinder, queryReferringComponents } from '../../util/model.js';\nimport ComponentView from '../../view/Component.js';\nimport { format as timeFormat } from '../../util/time.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { shouldTooltipConfine } from './helper.js';\nimport { normalizeTooltipFormatResult } from '../../model/mixin/dataFormat.js';\nimport { createTooltipMarkup, buildTooltipMarkup, TooltipMarkupStyleCreator } from './tooltipMarkup.js';\nimport { findEventDispatcher } from '../../util/event.js';\nimport { clear, createOrUpdate } from '../../util/throttle.js';\nvar proxyRect = new Rect({\n shape: {\n x: -1,\n y: -1,\n width: 2,\n height: 2\n }\n});\nvar TooltipView = /** @class */function (_super) {\n __extends(TooltipView, _super);\n function TooltipView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TooltipView.type;\n return _this;\n }\n TooltipView.prototype.init = function (ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n var tooltipModel = ecModel.getComponent('tooltip');\n var renderMode = this._renderMode = getTooltipRenderMode(tooltipModel.get('renderMode'));\n this._tooltipContent = renderMode === 'richText' ? new TooltipRichContent(api) : new TooltipHTMLContent(api, {\n appendTo: tooltipModel.get('appendToBody', true) ? 'body' : tooltipModel.get('appendTo', true)\n });\n };\n TooltipView.prototype.render = function (tooltipModel, ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n // Reset\n this.group.removeAll();\n this._tooltipModel = tooltipModel;\n this._ecModel = ecModel;\n this._api = api;\n var tooltipContent = this._tooltipContent;\n tooltipContent.update(tooltipModel);\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n this._initGlobalListener();\n this._keepShow();\n // PENDING\n // `mousemove` event will be triggered very frequently when the mouse moves fast,\n // which causes that the `updatePosition` function was also called frequently.\n // In Chrome with devtools open and Firefox, tooltip looks laggy and shakes. See #14695 #16101\n // To avoid frequent triggering,\n // consider throttling it in 50ms when transition is enabled\n if (this._renderMode !== 'richText' && tooltipModel.get('transitionDuration')) {\n createOrUpdate(this, '_updatePosition', 50, 'fixRate');\n } else {\n clear(this, '_updatePosition');\n }\n };\n TooltipView.prototype._initGlobalListener = function () {\n var tooltipModel = this._tooltipModel;\n var triggerOn = tooltipModel.get('triggerOn');\n globalListener.register('itemTooltip', this._api, bind(function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none') {\n if (triggerOn.indexOf(currTrigger) >= 0) {\n this._tryShow(e, dispatchAction);\n } else if (currTrigger === 'leave') {\n this._hide(dispatchAction);\n }\n }\n }, this));\n };\n TooltipView.prototype._keepShow = function () {\n var tooltipModel = this._tooltipModel;\n var ecModel = this._ecModel;\n var api = this._api;\n var triggerOn = tooltipModel.get('triggerOn');\n // Try to keep the tooltip show when refreshing\n if (this._lastX != null && this._lastY != null\n // When user is willing to control tooltip totally using API,\n // self.manuallyShowTip({x, y}) might cause tooltip hide,\n // which is not expected.\n && triggerOn !== 'none' && triggerOn !== 'click') {\n var self_1 = this;\n clearTimeout(this._refreshUpdateTimeout);\n this._refreshUpdateTimeout = setTimeout(function () {\n // Show tip next tick after other charts are rendered\n // In case highlight action has wrong result\n // FIXME\n !api.isDisposed() && self_1.manuallyShowTip(tooltipModel, ecModel, api, {\n x: self_1._lastX,\n y: self_1._lastY,\n dataByCoordSys: self_1._lastDataByCoordSys\n });\n });\n }\n };\n /**\n * Show tip manually by\n * dispatchAction({\n * type: 'showTip',\n * x: 10,\n * y: 10\n * });\n * Or\n * dispatchAction({\n * type: 'showTip',\n * seriesIndex: 0,\n * dataIndex or dataIndexInside or name\n * });\n *\n * TODO Batch\n */\n TooltipView.prototype.manuallyShowTip = function (tooltipModel, ecModel, api, payload) {\n if (payload.from === this.uid || env.node || !api.getDom()) {\n return;\n }\n var dispatchAction = makeDispatchAction(payload, api);\n // Reset ticket\n this._ticket = '';\n // When triggered from axisPointer.\n var dataByCoordSys = payload.dataByCoordSys;\n var cmptRef = findComponentReference(payload, ecModel, api);\n if (cmptRef) {\n var rect = cmptRef.el.getBoundingRect().clone();\n rect.applyTransform(cmptRef.el.transform);\n this._tryShow({\n offsetX: rect.x + rect.width / 2,\n offsetY: rect.y + rect.height / 2,\n target: cmptRef.el,\n position: payload.position,\n // When manully trigger, the mouse is not on the el, so we'd better to\n // position tooltip on the bottom of the el and display arrow is possible.\n positionDefault: 'bottom'\n }, dispatchAction);\n } else if (payload.tooltip && payload.x != null && payload.y != null) {\n var el = proxyRect;\n el.x = payload.x;\n el.y = payload.y;\n el.update();\n getECData(el).tooltipConfig = {\n name: null,\n option: payload.tooltip\n };\n // Manually show tooltip while view is not using zrender elements.\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n target: el\n }, dispatchAction);\n } else if (dataByCoordSys) {\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n dataByCoordSys: dataByCoordSys,\n tooltipOption: payload.tooltipOption\n }, dispatchAction);\n } else if (payload.seriesIndex != null) {\n if (this._manuallyAxisShowTip(tooltipModel, ecModel, api, payload)) {\n return;\n }\n var pointInfo = findPointFromSeries(payload, ecModel);\n var cx = pointInfo.point[0];\n var cy = pointInfo.point[1];\n if (cx != null && cy != null) {\n this._tryShow({\n offsetX: cx,\n offsetY: cy,\n target: pointInfo.el,\n position: payload.position,\n // When manully trigger, the mouse is not on the el, so we'd better to\n // position tooltip on the bottom of the el and display arrow is possible.\n positionDefault: 'bottom'\n }, dispatchAction);\n }\n } else if (payload.x != null && payload.y != null) {\n // FIXME\n // should wrap dispatchAction like `axisPointer/globalListener` ?\n api.dispatchAction({\n type: 'updateAxisPointer',\n x: payload.x,\n y: payload.y\n });\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n target: api.getZr().findHover(payload.x, payload.y).target\n }, dispatchAction);\n }\n };\n TooltipView.prototype.manuallyHideTip = function (tooltipModel, ecModel, api, payload) {\n var tooltipContent = this._tooltipContent;\n if (this._tooltipModel) {\n tooltipContent.hideLater(this._tooltipModel.get('hideDelay'));\n }\n this._lastX = this._lastY = this._lastDataByCoordSys = null;\n if (payload.from !== this.uid) {\n this._hide(makeDispatchAction(payload, api));\n }\n };\n // Be compatible with previous design, that is, when tooltip.type is 'axis' and\n // dispatchAction 'showTip' with seriesIndex and dataIndex will trigger axis pointer\n // and tooltip.\n TooltipView.prototype._manuallyAxisShowTip = function (tooltipModel, ecModel, api, payload) {\n var seriesIndex = payload.seriesIndex;\n var dataIndex = payload.dataIndex;\n // @ts-ignore\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo;\n if (seriesIndex == null || dataIndex == null || coordSysAxesInfo == null) {\n return;\n }\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n if (!seriesModel) {\n return;\n }\n var data = seriesModel.getData();\n var tooltipCascadedModel = buildTooltipModel([data.getItemModel(dataIndex), seriesModel, (seriesModel.coordinateSystem || {}).model], this._tooltipModel);\n if (tooltipCascadedModel.get('trigger') !== 'axis') {\n return;\n }\n api.dispatchAction({\n type: 'updateAxisPointer',\n seriesIndex: seriesIndex,\n dataIndex: dataIndex,\n position: payload.position\n });\n return true;\n };\n TooltipView.prototype._tryShow = function (e, dispatchAction) {\n var el = e.target;\n var tooltipModel = this._tooltipModel;\n if (!tooltipModel) {\n return;\n }\n // Save mouse x, mouse y. So we can try to keep showing the tip if chart is refreshed\n this._lastX = e.offsetX;\n this._lastY = e.offsetY;\n var dataByCoordSys = e.dataByCoordSys;\n if (dataByCoordSys && dataByCoordSys.length) {\n this._showAxisTooltip(dataByCoordSys, e);\n } else if (el) {\n var ecData = getECData(el);\n if (ecData.ssrType === 'legend') {\n // Don't trigger tooltip for legend tooltip item\n return;\n }\n this._lastDataByCoordSys = null;\n var seriesDispatcher_1;\n var cmptDispatcher_1;\n findEventDispatcher(el, function (target) {\n if (target.tooltipDisabled) {\n seriesDispatcher_1 = cmptDispatcher_1 = null;\n return true;\n }\n if (seriesDispatcher_1 || cmptDispatcher_1) {\n return;\n }\n // Always show item tooltip if mouse is on the element with dataIndex\n if (getECData(target).dataIndex != null) {\n seriesDispatcher_1 = target;\n }\n // Tooltip provided directly. Like legend.\n else if (getECData(target).tooltipConfig != null) {\n cmptDispatcher_1 = target;\n }\n }, true);\n if (seriesDispatcher_1) {\n this._showSeriesItemTooltip(e, seriesDispatcher_1, dispatchAction);\n } else if (cmptDispatcher_1) {\n this._showComponentItemTooltip(e, cmptDispatcher_1, dispatchAction);\n } else {\n this._hide(dispatchAction);\n }\n } else {\n this._lastDataByCoordSys = null;\n this._hide(dispatchAction);\n }\n };\n TooltipView.prototype._showOrMove = function (tooltipModel, cb) {\n // showDelay is used in this case: tooltip.enterable is set\n // as true. User intent to move mouse into tooltip and click\n // something. `showDelay` makes it easier to enter the content\n // but tooltip do not move immediately.\n var delay = tooltipModel.get('showDelay');\n cb = bind(cb, this);\n clearTimeout(this._showTimout);\n delay > 0 ? this._showTimout = setTimeout(cb, delay) : cb();\n };\n TooltipView.prototype._showAxisTooltip = function (dataByCoordSys, e) {\n var ecModel = this._ecModel;\n var globalTooltipModel = this._tooltipModel;\n var point = [e.offsetX, e.offsetY];\n var singleTooltipModel = buildTooltipModel([e.tooltipOption], globalTooltipModel);\n var renderMode = this._renderMode;\n var cbParamsList = [];\n var articleMarkup = createTooltipMarkup('section', {\n blocks: [],\n noHeader: true\n });\n // Only for legacy: `Serise['formatTooltip']` returns a string.\n var markupTextArrLegacy = [];\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n each(dataByCoordSys, function (itemCoordSys) {\n each(itemCoordSys.dataByAxis, function (axisItem) {\n var axisModel = ecModel.getComponent(axisItem.axisDim + 'Axis', axisItem.axisIndex);\n var axisValue = axisItem.value;\n if (!axisModel || axisValue == null) {\n return;\n }\n // FIXME: when using `tooltip.trigger: 'axis'`, the precision of the axis value displayed in tooltip\n // should match the original series values rather than using the default stretegy in Interval.ts\n // (getPrecision(interval) + 2); otherwise it may cuase confusion.\n var axisValueLabel = axisPointerViewHelper.getValueLabel(axisValue, axisModel.axis, ecModel, axisItem.seriesDataIndices, axisItem.valueLabelOpt);\n var axisSectionMarkup = createTooltipMarkup('section', {\n header: axisValueLabel,\n noHeader: !trim(axisValueLabel),\n sortBlocks: true,\n blocks: []\n });\n articleMarkup.blocks.push(axisSectionMarkup);\n each(axisItem.seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var cbParams = series.getDataParams(dataIndex);\n // Can't find data.\n if (cbParams.dataIndex < 0) {\n return;\n }\n cbParams.axisDim = axisItem.axisDim;\n cbParams.axisIndex = axisItem.axisIndex;\n cbParams.axisType = axisItem.axisType;\n cbParams.axisId = axisItem.axisId;\n cbParams.axisValue = axisHelper.getAxisRawValue(axisModel.axis, {\n value: axisValue\n });\n cbParams.axisValueLabel = axisValueLabel;\n // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n cbParams.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(cbParams.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(series.formatTooltip(dataIndex, true, null));\n var frag = seriesTooltipResult.frag;\n if (frag) {\n var valueFormatter = buildTooltipModel([series], globalTooltipModel).get('valueFormatter');\n axisSectionMarkup.blocks.push(valueFormatter ? extend({\n valueFormatter: valueFormatter\n }, frag) : frag);\n }\n if (seriesTooltipResult.text) {\n markupTextArrLegacy.push(seriesTooltipResult.text);\n }\n cbParamsList.push(cbParams);\n });\n });\n });\n // In most cases, the second axis is displays upper on the first one.\n // So we reverse it to look better.\n articleMarkup.blocks.reverse();\n markupTextArrLegacy.reverse();\n var positionExpr = e.position;\n var orderMode = singleTooltipModel.get('order');\n var builtMarkupText = buildTooltipMarkup(articleMarkup, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), singleTooltipModel.get('textStyle'));\n builtMarkupText && markupTextArrLegacy.unshift(builtMarkupText);\n var blockBreak = renderMode === 'richText' ? '\\n\\n' : '<br/>';\n var allMarkupText = markupTextArrLegacy.join(blockBreak);\n this._showOrMove(singleTooltipModel, function () {\n if (this._updateContentNotChangedOnAxis(dataByCoordSys, cbParamsList)) {\n this._updatePosition(singleTooltipModel, positionExpr, point[0], point[1], this._tooltipContent, cbParamsList);\n } else {\n this._showTooltipContent(singleTooltipModel, allMarkupText, cbParamsList, Math.random() + '', point[0], point[1], positionExpr, null, markupStyleCreator);\n }\n });\n // Do not trigger events here, because this branch only be entered\n // from dispatchAction.\n };\n TooltipView.prototype._showSeriesItemTooltip = function (e, dispatcher, dispatchAction) {\n var ecModel = this._ecModel;\n var ecData = getECData(dispatcher);\n // Use dataModel in element if possible\n // Used when mouseover on a element like markPoint or edge\n // In which case, the data is not main data in series.\n var seriesIndex = ecData.seriesIndex;\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n // For example, graph link.\n var dataModel = ecData.dataModel || seriesModel;\n var dataIndex = ecData.dataIndex;\n var dataType = ecData.dataType;\n var data = dataModel.getData(dataType);\n var renderMode = this._renderMode;\n var positionDefault = e.positionDefault;\n var tooltipModel = buildTooltipModel([data.getItemModel(dataIndex), dataModel, seriesModel && (seriesModel.coordinateSystem || {}).model], this._tooltipModel, positionDefault ? {\n position: positionDefault\n } : null);\n var tooltipTrigger = tooltipModel.get('trigger');\n if (tooltipTrigger != null && tooltipTrigger !== 'item') {\n return;\n }\n var params = dataModel.getDataParams(dataIndex, dataType);\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n params.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(params.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(dataModel.formatTooltip(dataIndex, false, dataType));\n var orderMode = tooltipModel.get('order');\n var valueFormatter = tooltipModel.get('valueFormatter');\n var frag = seriesTooltipResult.frag;\n var markupText = frag ? buildTooltipMarkup(valueFormatter ? extend({\n valueFormatter: valueFormatter\n }, frag) : frag, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), tooltipModel.get('textStyle')) : seriesTooltipResult.text;\n var asyncTicket = 'item_' + dataModel.name + '_' + dataIndex;\n this._showOrMove(tooltipModel, function () {\n this._showTooltipContent(tooltipModel, markupText, params, asyncTicket, e.offsetX, e.offsetY, e.position, e.target, markupStyleCreator);\n });\n // FIXME\n // duplicated showtip if manuallyShowTip is called from dispatchAction.\n dispatchAction({\n type: 'showTip',\n dataIndexInside: dataIndex,\n dataIndex: data.getRawIndex(dataIndex),\n seriesIndex: seriesIndex,\n from: this.uid\n });\n };\n TooltipView.prototype._showComponentItemTooltip = function (e, el, dispatchAction) {\n var isHTMLRenderMode = this._renderMode === 'html';\n var ecData = getECData(el);\n var tooltipConfig = ecData.tooltipConfig;\n var tooltipOpt = tooltipConfig.option || {};\n var encodeHTMLContent = tooltipOpt.encodeHTMLContent;\n if (isString(tooltipOpt)) {\n var content = tooltipOpt;\n tooltipOpt = {\n content: content,\n // Fixed formatter\n formatter: content\n };\n // when `tooltipConfig.option` is a string rather than an object,\n // we can't know if the content needs to be encoded\n // for the sake of security, encode it by default.\n encodeHTMLContent = true;\n }\n if (encodeHTMLContent && isHTMLRenderMode && tooltipOpt.content) {\n // clone might be unnecessary?\n tooltipOpt = clone(tooltipOpt);\n tooltipOpt.content = encodeHTML(tooltipOpt.content);\n }\n var tooltipModelCascade = [tooltipOpt];\n var cmpt = this._ecModel.getComponent(ecData.componentMainType, ecData.componentIndex);\n if (cmpt) {\n tooltipModelCascade.push(cmpt);\n }\n // In most cases, component tooltip formatter has different params with series tooltip formatter,\n // so that they cannot share the same formatter. Since the global tooltip formatter is used for series\n // by convention, we do not use it as the default formatter for component.\n tooltipModelCascade.push({\n formatter: tooltipOpt.content\n });\n var positionDefault = e.positionDefault;\n var subTooltipModel = buildTooltipModel(tooltipModelCascade, this._tooltipModel, positionDefault ? {\n position: positionDefault\n } : null);\n var defaultHtml = subTooltipModel.get('content');\n var asyncTicket = Math.random() + '';\n // PENDING: this case do not support richText style yet.\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n // Do not check whether `trigger` is 'none' here, because `trigger`\n // only works on coordinate system. In fact, we have not found case\n // that requires setting `trigger` nothing on component yet.\n this._showOrMove(subTooltipModel, function () {\n // Use formatterParams from element defined in component\n // Avoid users modify it.\n var formatterParams = clone(subTooltipModel.get('formatterParams') || {});\n this._showTooltipContent(subTooltipModel, defaultHtml, formatterParams, asyncTicket, e.offsetX, e.offsetY, e.position, el, markupStyleCreator);\n });\n // If not dispatch showTip, tip may be hide triggered by axis.\n dispatchAction({\n type: 'showTip',\n from: this.uid\n });\n };\n TooltipView.prototype._showTooltipContent = function (\n // Use Model<TooltipOption> insteadof TooltipModel because this model may be from series or other options.\n // Instead of top level tooltip.\n tooltipModel, defaultHtml, params, asyncTicket, x, y, positionExpr, el, markupStyleCreator) {\n // Reset ticket\n this._ticket = '';\n if (!tooltipModel.get('showContent') || !tooltipModel.get('show')) {\n return;\n }\n var tooltipContent = this._tooltipContent;\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n var formatter = tooltipModel.get('formatter');\n positionExpr = positionExpr || tooltipModel.get('position');\n var html = defaultHtml;\n var nearPoint = this._getNearestPoint([x, y], params, tooltipModel.get('trigger'), tooltipModel.get('borderColor'), tooltipModel.get('defaultBorderColor', true));\n var nearPointColor = nearPoint.color;\n if (formatter) {\n if (isString(formatter)) {\n var useUTC = tooltipModel.ecModel.get('useUTC');\n var params0 = isArray(params) ? params[0] : params;\n var isTimeAxis = params0 && params0.axisType && params0.axisType.indexOf('time') >= 0;\n html = formatter;\n if (isTimeAxis) {\n html = timeFormat(params0.axisValue, html, useUTC);\n }\n html = formatTpl(html, params, true);\n } else if (isFunction(formatter)) {\n var callback = bind(function (cbTicket, html) {\n if (cbTicket === this._ticket) {\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n }\n }, this);\n this._ticket = asyncTicket;\n html = formatter(params, asyncTicket, callback);\n } else {\n html = formatter;\n }\n }\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n tooltipContent.show(tooltipModel, nearPointColor);\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n };\n TooltipView.prototype._getNearestPoint = function (point, tooltipDataParams, trigger, borderColor, defaultBorderColor) {\n if (trigger === 'axis' || isArray(tooltipDataParams)) {\n return {\n color: borderColor || defaultBorderColor\n };\n }\n if (!isArray(tooltipDataParams)) {\n return {\n color: borderColor || tooltipDataParams.color || tooltipDataParams.borderColor\n };\n }\n };\n TooltipView.prototype._updatePosition = function (tooltipModel, positionExpr, x,\n // Mouse x\n y,\n // Mouse y\n content, params, el) {\n var viewWidth = this._api.getWidth();\n var viewHeight = this._api.getHeight();\n positionExpr = positionExpr || tooltipModel.get('position');\n var contentSize = content.getSize();\n var align = tooltipModel.get('align');\n var vAlign = tooltipModel.get('verticalAlign');\n var rect = el && el.getBoundingRect().clone();\n el && rect.applyTransform(el.transform);\n if (isFunction(positionExpr)) {\n // Callback of position can be an array or a string specify the position\n positionExpr = positionExpr([x, y], params, content.el, rect, {\n viewSize: [viewWidth, viewHeight],\n contentSize: contentSize.slice()\n });\n }\n if (isArray(positionExpr)) {\n x = parsePercent(positionExpr[0], viewWidth);\n y = parsePercent(positionExpr[1], viewHeight);\n } else if (isObject(positionExpr)) {\n var boxLayoutPosition = positionExpr;\n boxLayoutPosition.width = contentSize[0];\n boxLayoutPosition.height = contentSize[1];\n var layoutRect = getLayoutRect(boxLayoutPosition, {\n width: viewWidth,\n height: viewHeight\n });\n x = layoutRect.x;\n y = layoutRect.y;\n align = null;\n // When positionExpr is left/top/right/bottom,\n // align and verticalAlign will not work.\n vAlign = null;\n }\n // Specify tooltip position by string 'top' 'bottom' 'left' 'right' around graphic element\n else if (isString(positionExpr) && el) {\n var pos = calcTooltipPosition(positionExpr, rect, contentSize, tooltipModel.get('borderWidth'));\n x = pos[0];\n y = pos[1];\n } else {\n var pos = refixTooltipPosition(x, y, content, viewWidth, viewHeight, align ? null : 20, vAlign ? null : 20);\n x = pos[0];\n y = pos[1];\n }\n align && (x -= isCenterAlign(align) ? contentSize[0] / 2 : align === 'right' ? contentSize[0] : 0);\n vAlign && (y -= isCenterAlign(vAlign) ? contentSize[1] / 2 : vAlign === 'bottom' ? contentSize[1] : 0);\n if (shouldTooltipConfine(tooltipModel)) {\n var pos = confineTooltipPosition(x, y, content, viewWidth, viewHeight);\n x = pos[0];\n y = pos[1];\n }\n content.moveTo(x, y);\n };\n // FIXME\n // Should we remove this but leave this to user?\n TooltipView.prototype._updateContentNotChangedOnAxis = function (dataByCoordSys, cbParamsList) {\n var lastCoordSys = this._lastDataByCoordSys;\n var lastCbParamsList = this._cbParamsList;\n var contentNotChanged = !!lastCoordSys && lastCoordSys.length === dataByCoordSys.length;\n contentNotChanged && each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) {\n var lastDataByAxis = lastItemCoordSys.dataByAxis || [];\n var thisItemCoordSys = dataByCoordSys[indexCoordSys] || {};\n var thisDataByAxis = thisItemCoordSys.dataByAxis || [];\n contentNotChanged = contentNotChanged && lastDataByAxis.length === thisDataByAxis.length;\n contentNotChanged && each(lastDataByAxis, function (lastItem, indexAxis) {\n var thisItem = thisDataByAxis[indexAxis] || {};\n var lastIndices = lastItem.seriesDataIndices || [];\n var newIndices = thisItem.seriesDataIndices || [];\n contentNotChanged = contentNotChanged && lastItem.value === thisItem.value && lastItem.axisType === thisItem.axisType && lastItem.axisId === thisItem.axisId && lastIndices.length === newIndices.length;\n contentNotChanged && each(lastIndices, function (lastIdxItem, j) {\n var newIdxItem = newIndices[j];\n contentNotChanged = contentNotChanged && lastIdxItem.seriesIndex === newIdxItem.seriesIndex && lastIdxItem.dataIndex === newIdxItem.dataIndex;\n });\n // check is cbParams data value changed\n lastCbParamsList && each(lastItem.seriesDataIndices, function (idxItem) {\n var seriesIdx = idxItem.seriesIndex;\n var cbParams = cbParamsList[seriesIdx];\n var lastCbParams = lastCbParamsList[seriesIdx];\n if (cbParams && lastCbParams && lastCbParams.data !== cbParams.data) {\n contentNotChanged = false;\n }\n });\n });\n });\n this._lastDataByCoordSys = dataByCoordSys;\n this._cbParamsList = cbParamsList;\n return !!contentNotChanged;\n };\n TooltipView.prototype._hide = function (dispatchAction) {\n // Do not directly hideLater here, because this behavior may be prevented\n // in dispatchAction when showTip is dispatched.\n // FIXME\n // duplicated hideTip if manuallyHideTip is called from dispatchAction.\n this._lastDataByCoordSys = null;\n dispatchAction({\n type: 'hideTip',\n from: this.uid\n });\n };\n TooltipView.prototype.dispose = function (ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n clear(this, '_updatePosition');\n this._tooltipContent.dispose();\n globalListener.unregister('itemTooltip', api);\n };\n TooltipView.type = 'tooltip';\n return TooltipView;\n}(ComponentView);\n/**\n * From top to bottom. (the last one should be globalTooltipModel);\n */\nfunction buildTooltipModel(modelCascade, globalTooltipModel, defaultTooltipOption) {\n // Last is always tooltip model.\n var ecModel = globalTooltipModel.ecModel;\n var resultModel;\n if (defaultTooltipOption) {\n resultModel = new Model(defaultTooltipOption, ecModel, ecModel);\n resultModel = new Model(globalTooltipModel.option, resultModel, ecModel);\n } else {\n resultModel = globalTooltipModel;\n }\n for (var i = modelCascade.length - 1; i >= 0; i--) {\n var tooltipOpt = modelCascade[i];\n if (tooltipOpt) {\n if (tooltipOpt instanceof Model) {\n tooltipOpt = tooltipOpt.get('tooltip', true);\n }\n // In each data item tooltip can be simply write:\n // {\n // value: 10,\n // tooltip: 'Something you need to know'\n // }\n if (isString(tooltipOpt)) {\n tooltipOpt = {\n formatter: tooltipOpt\n };\n }\n if (tooltipOpt) {\n resultModel = new Model(tooltipOpt, resultModel, ecModel);\n }\n }\n }\n return resultModel;\n}\nfunction makeDispatchAction(payload, api) {\n return payload.dispatchAction || bind(api.dispatchAction, api);\n}\nfunction refixTooltipPosition(x, y, content, viewWidth, viewHeight, gapH, gapV) {\n var size = content.getSize();\n var width = size[0];\n var height = size[1];\n if (gapH != null) {\n // Add extra 2 pixels for this case:\n // At present the \"values\" in default tooltip are using CSS `float: right`.\n // When the right edge of the tooltip box is on the right side of the\n // viewport, the `float` layout might push the \"values\" to the second line.\n if (x + width + gapH + 2 > viewWidth) {\n x -= width + gapH;\n } else {\n x += gapH;\n }\n }\n if (gapV != null) {\n if (y + height + gapV > viewHeight) {\n y -= height + gapV;\n } else {\n y += gapV;\n }\n }\n return [x, y];\n}\nfunction confineTooltipPosition(x, y, content, viewWidth, viewHeight) {\n var size = content.getSize();\n var width = size[0];\n var height = size[1];\n x = Math.min(x + width, viewWidth) - width;\n y = Math.min(y + height, viewHeight) - height;\n x = Math.max(x, 0);\n y = Math.max(y, 0);\n return [x, y];\n}\nfunction calcTooltipPosition(position, rect, contentSize, borderWidth) {\n var domWidth = contentSize[0];\n var domHeight = contentSize[1];\n var offset = Math.ceil(Math.SQRT2 * borderWidth) + 8;\n var x = 0;\n var y = 0;\n var rectWidth = rect.width;\n var rectHeight = rect.height;\n switch (position) {\n case 'inside':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'top':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y - domHeight - offset;\n break;\n case 'bottom':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight + offset;\n break;\n case 'left':\n x = rect.x - domWidth - offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'right':\n x = rect.x + rectWidth + offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n }\n return [x, y];\n}\nfunction isCenterAlign(align) {\n return align === 'center' || align === 'middle';\n}\n/**\n * Find target component by payload like:\n * ```js\n * { legendId: 'some_id', name: 'xxx' }\n * { toolboxIndex: 1, name: 'xxx' }\n * { geoName: 'some_name', name: 'xxx' }\n * ```\n * PENDING: at present only\n *\n * If not found, return null/undefined.\n */\nfunction findComponentReference(payload, ecModel, api) {\n var queryOptionMap = preParseFinder(payload).queryOptionMap;\n var componentMainType = queryOptionMap.keys()[0];\n if (!componentMainType || componentMainType === 'series') {\n return;\n }\n var queryResult = queryReferringComponents(ecModel, componentMainType, queryOptionMap.get(componentMainType), {\n useDefault: false,\n enableAll: false,\n enableNone: false\n });\n var model = queryResult.models[0];\n if (!model) {\n return;\n }\n var view = api.getViewOfComponentModel(model);\n var el;\n view.group.traverse(function (subEl) {\n var tooltipConfig = getECData(subEl).tooltipConfig;\n if (tooltipConfig && tooltipConfig.name === payload.name) {\n el = subEl;\n return true; // stop\n }\n });\n if (el) {\n return {\n componentMainType: componentMainType,\n componentIndex: model.componentIndex,\n el: el\n };\n }\n}\nexport default TooltipView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport { use } from '../../extension.js';\nimport TooltipModel from './TooltipModel.js';\nimport TooltipView from './TooltipView.js';\nimport { noop } from 'zrender/lib/core/util.js';\nexport function install(registers) {\n use(installAxisPointer);\n registers.registerComponentModel(TooltipModel);\n registers.registerComponentView(TooltipView);\n /**\n * @action\n * @property {string} type\n * @property {number} seriesIndex\n * @property {number} dataIndex\n * @property {number} [x]\n * @property {number} [y]\n */\n registers.registerAction({\n type: 'showTip',\n event: 'showTip',\n update: 'tooltip:manuallyShowTip'\n }, noop);\n registers.registerAction({\n type: 'hideTip',\n event: 'hideTip',\n update: 'tooltip:manuallyHideTip'\n }, noop);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { normalizeToArray } from '../../util/model.js';\nvar DEFAULT_TOOLBOX_BTNS = ['rect', 'polygon', 'keep', 'clear'];\nexport default function brushPreprocessor(option, isNew) {\n var brushComponents = normalizeToArray(option ? option.brush : []);\n if (!brushComponents.length) {\n return;\n }\n var brushComponentSpecifiedBtns = [];\n zrUtil.each(brushComponents, function (brushOpt) {\n var tbs = brushOpt.hasOwnProperty('toolbox') ? brushOpt.toolbox : [];\n if (tbs instanceof Array) {\n brushComponentSpecifiedBtns = brushComponentSpecifiedBtns.concat(tbs);\n }\n });\n var toolbox = option && option.toolbox;\n if (zrUtil.isArray(toolbox)) {\n toolbox = toolbox[0];\n }\n if (!toolbox) {\n toolbox = {\n feature: {}\n };\n option.toolbox = [toolbox];\n }\n var toolboxFeature = toolbox.feature || (toolbox.feature = {});\n var toolboxBrush = toolboxFeature.brush || (toolboxFeature.brush = {});\n var brushTypes = toolboxBrush.type || (toolboxBrush.type = []);\n brushTypes.push.apply(brushTypes, brushComponentSpecifiedBtns);\n removeDuplicate(brushTypes);\n if (isNew && !brushTypes.length) {\n brushTypes.push.apply(brushTypes, DEFAULT_TOOLBOX_BTNS);\n }\n}\nfunction removeDuplicate(arr) {\n var map = {};\n zrUtil.each(arr, function (val) {\n map[val] = 1;\n });\n arr.length = 0;\n zrUtil.each(map, function (flag, val) {\n arr.push(val);\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * @file Visual solution, for consistent option specification.\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapping from './VisualMapping.js';\nimport { getItemVisualFromData, setItemVisualFromData } from './helper.js';\nvar each = zrUtil.each;\nfunction hasKeys(obj) {\n if (obj) {\n for (var name_1 in obj) {\n if (obj.hasOwnProperty(name_1)) {\n return true;\n }\n }\n }\n}\nexport function createVisualMappings(option, stateList, supplementVisualOption) {\n var visualMappings = {};\n each(stateList, function (state) {\n var mappings = visualMappings[state] = createMappings();\n each(option[state], function (visualData, visualType) {\n if (!VisualMapping.isValidType(visualType)) {\n return;\n }\n var mappingOption = {\n type: visualType,\n visual: visualData\n };\n supplementVisualOption && supplementVisualOption(mappingOption, state);\n mappings[visualType] = new VisualMapping(mappingOption);\n // Prepare a alpha for opacity, for some case that opacity\n // is not supported, such as rendering using gradient color.\n if (visualType === 'opacity') {\n mappingOption = zrUtil.clone(mappingOption);\n mappingOption.type = 'colorAlpha';\n mappings.__hidden.__alphaForOpacity = new VisualMapping(mappingOption);\n }\n });\n });\n return visualMappings;\n function createMappings() {\n var Creater = function () {};\n // Make sure hidden fields will not be visited by\n // object iteration (with hasOwnProperty checking).\n Creater.prototype.__hidden = Creater.prototype;\n var obj = new Creater();\n return obj;\n }\n}\nexport function replaceVisualOption(thisOption, newOption, keys) {\n // Visual attributes merge is not supported, otherwise it\n // brings overcomplicated merge logic. See #2853. So if\n // newOption has anyone of these keys, all of these keys\n // will be reset. Otherwise, all keys remain.\n var has;\n zrUtil.each(keys, function (key) {\n if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) {\n has = true;\n }\n });\n has && zrUtil.each(keys, function (key) {\n if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) {\n thisOption[key] = zrUtil.clone(newOption[key]);\n } else {\n delete thisOption[key];\n }\n });\n}\n/**\n * @param stateList\n * @param visualMappings\n * @param list\n * @param getValueState param: valueOrIndex, return: state.\n * @param scope Scope for getValueState\n * @param dimension Concrete dimension, if used.\n */\n// ???! handle brush?\nexport function applyVisual(stateList, visualMappings, data, getValueState, scope, dimension) {\n var visualTypesMap = {};\n zrUtil.each(stateList, function (state) {\n var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]);\n visualTypesMap[state] = visualTypes;\n });\n var dataIndex;\n function getVisual(key) {\n return getItemVisualFromData(data, dataIndex, key);\n }\n function setVisual(key, value) {\n setItemVisualFromData(data, dataIndex, key, value);\n }\n if (dimension == null) {\n data.each(eachItem);\n } else {\n data.each([dimension], eachItem);\n }\n function eachItem(valueOrIndex, index) {\n dataIndex = dimension == null ? valueOrIndex // First argument is index\n : index;\n var rawDataItem = data.getRawDataItem(dataIndex);\n // Consider performance\n // @ts-ignore\n if (rawDataItem && rawDataItem.visualMap === false) {\n return;\n }\n var valueState = getValueState.call(scope, valueOrIndex);\n var mappings = visualMappings[valueState];\n var visualTypes = visualTypesMap[valueState];\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n mappings[type] && mappings[type].applyVisual(valueOrIndex, getVisual, setVisual);\n }\n }\n}\n/**\n * @param data\n * @param stateList\n * @param visualMappings <state, Object.<visualType, module:echarts/visual/VisualMapping>>\n * @param getValueState param: valueOrIndex, return: state.\n * @param dim dimension or dimension index.\n */\nexport function incrementalApplyVisual(stateList, visualMappings, getValueState, dim) {\n var visualTypesMap = {};\n zrUtil.each(stateList, function (state) {\n var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]);\n visualTypesMap[state] = visualTypes;\n });\n return {\n progress: function progress(params, data) {\n var dimIndex;\n if (dim != null) {\n dimIndex = data.getDimensionIndex(dim);\n }\n function getVisual(key) {\n return getItemVisualFromData(data, dataIndex, key);\n }\n function setVisual(key, value) {\n setItemVisualFromData(data, dataIndex, key, value);\n }\n var dataIndex;\n var store = data.getStore();\n while ((dataIndex = params.next()) != null) {\n var rawDataItem = data.getRawDataItem(dataIndex);\n // Consider performance\n // @ts-ignore\n if (rawDataItem && rawDataItem.visualMap === false) {\n continue;\n }\n var value = dim != null ? store.get(dimIndex, dataIndex) : dataIndex;\n var valueState = getValueState(value);\n var mappings = visualMappings[valueState];\n var visualTypes = visualTypesMap[valueState];\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n mappings[type] && mappings[type].applyVisual(value, getVisual, setVisual);\n }\n }\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as polygonContain from 'zrender/lib/contain/polygon.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { linePolygonIntersect } from '../../util/graphic.js';\nexport function makeBrushCommonSelectorForSeries(area) {\n var brushType = area.brushType;\n // Do not use function binding or curry for performance.\n var selectors = {\n point: function (itemLayout) {\n return selector[brushType].point(itemLayout, selectors, area);\n },\n rect: function (itemLayout) {\n return selector[brushType].rect(itemLayout, selectors, area);\n }\n };\n return selectors;\n}\nvar selector = {\n lineX: getLineSelectors(0),\n lineY: getLineSelectors(1),\n rect: {\n point: function (itemLayout, selectors, area) {\n return itemLayout && area.boundingRect.contain(itemLayout[0], itemLayout[1]);\n },\n rect: function (itemLayout, selectors, area) {\n return itemLayout && area.boundingRect.intersect(itemLayout);\n }\n },\n polygon: {\n point: function (itemLayout, selectors, area) {\n return itemLayout && area.boundingRect.contain(itemLayout[0], itemLayout[1]) && polygonContain.contain(area.range, itemLayout[0], itemLayout[1]);\n },\n rect: function (itemLayout, selectors, area) {\n var points = area.range;\n if (!itemLayout || points.length <= 1) {\n return false;\n }\n var x = itemLayout.x;\n var y = itemLayout.y;\n var width = itemLayout.width;\n var height = itemLayout.height;\n var p = points[0];\n if (polygonContain.contain(points, x, y) || polygonContain.contain(points, x + width, y) || polygonContain.contain(points, x, y + height) || polygonContain.contain(points, x + width, y + height) || BoundingRect.create(itemLayout).contain(p[0], p[1]) || linePolygonIntersect(x, y, x + width, y, points) || linePolygonIntersect(x, y, x, y + height, points) || linePolygonIntersect(x + width, y, x + width, y + height, points) || linePolygonIntersect(x, y + height, x + width, y + height, points)) {\n return true;\n }\n }\n }\n};\nfunction getLineSelectors(xyIndex) {\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n return {\n point: function (itemLayout, selectors, area) {\n if (itemLayout) {\n var range = area.range;\n var p = itemLayout[xyIndex];\n return inLineRange(p, range);\n }\n },\n rect: function (itemLayout, selectors, area) {\n if (itemLayout) {\n var range = area.range;\n var layoutRange = [itemLayout[xy[xyIndex]], itemLayout[xy[xyIndex]] + itemLayout[wh[xyIndex]]];\n layoutRange[1] < layoutRange[0] && layoutRange.reverse();\n return inLineRange(layoutRange[0], range) || inLineRange(layoutRange[1], range) || inLineRange(range[0], layoutRange) || inLineRange(range[1], layoutRange);\n }\n }\n };\n}\nfunction inLineRange(p, range) {\n return range[0] <= p && p <= range[1];\n}\nexport default selector;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport { makeBrushCommonSelectorForSeries } from './selector.js';\nimport * as throttleUtil from '../../util/throttle.js';\nimport BrushTargetManager from '../helper/BrushTargetManager.js';\nvar STATE_LIST = ['inBrush', 'outOfBrush'];\nvar DISPATCH_METHOD = '__ecBrushSelect';\nvar DISPATCH_FLAG = '__ecInBrushSelectEvent';\n;\nexport function layoutCovers(ecModel) {\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n var brushTargetManager = brushModel.brushTargetManager = new BrushTargetManager(brushModel.option, ecModel);\n brushTargetManager.setInputRanges(brushModel.areas, ecModel);\n });\n}\n/**\n * Register the visual encoding if this modules required.\n */\nexport default function brushVisual(ecModel, api, payload) {\n var brushSelected = [];\n var throttleType;\n var throttleDelay;\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n payload && payload.type === 'takeGlobalCursor' && brushModel.setBrushOption(payload.key === 'brush' ? payload.brushOption : {\n brushType: false\n });\n });\n layoutCovers(ecModel);\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel, brushIndex) {\n var thisBrushSelected = {\n brushId: brushModel.id,\n brushIndex: brushIndex,\n brushName: brushModel.name,\n areas: zrUtil.clone(brushModel.areas),\n selected: []\n };\n // Every brush component exists in event params, convenient\n // for user to find by index.\n brushSelected.push(thisBrushSelected);\n var brushOption = brushModel.option;\n var brushLink = brushOption.brushLink;\n var linkedSeriesMap = [];\n var selectedDataIndexForLink = [];\n var rangeInfoBySeries = [];\n var hasBrushExists = false;\n if (!brushIndex) {\n // Only the first throttle setting works.\n throttleType = brushOption.throttleType;\n throttleDelay = brushOption.throttleDelay;\n }\n // Add boundingRect and selectors to range.\n var areas = zrUtil.map(brushModel.areas, function (area) {\n var builder = boundingRectBuilders[area.brushType];\n var selectableArea = zrUtil.defaults({\n boundingRect: builder ? builder(area) : void 0\n }, area);\n selectableArea.selectors = makeBrushCommonSelectorForSeries(selectableArea);\n return selectableArea;\n });\n var visualMappings = visualSolution.createVisualMappings(brushModel.option, STATE_LIST, function (mappingOption) {\n mappingOption.mappingMethod = 'fixed';\n });\n zrUtil.isArray(brushLink) && zrUtil.each(brushLink, function (seriesIndex) {\n linkedSeriesMap[seriesIndex] = 1;\n });\n function linkOthers(seriesIndex) {\n return brushLink === 'all' || !!linkedSeriesMap[seriesIndex];\n }\n // If no supported brush or no brush on the series,\n // all visuals should be in original state.\n function brushed(rangeInfoList) {\n return !!rangeInfoList.length;\n }\n /**\n * Logic for each series: (If the logic has to be modified one day, do it carefully!)\n *\n * ( brushed ┬ && ┬hasBrushExist ┬ && linkOthers ) => StepA: ┬record, ┬ StepB: ┬visualByRecord.\n * !brushed┘ ├hasBrushExist ┤ └nothing,┘ ├visualByRecord.\n * └!hasBrushExist┘ └nothing.\n * ( !brushed && ┬hasBrushExist ┬ && linkOthers ) => StepA: nothing, StepB: ┬visualByRecord.\n * └!hasBrushExist┘ └nothing.\n * ( brushed ┬ && !linkOthers ) => StepA: nothing, StepB: ┬visualByCheck.\n * !brushed┘ └nothing.\n * ( !brushed && !linkOthers ) => StepA: nothing, StepB: nothing.\n */\n // Step A\n ecModel.eachSeries(function (seriesModel, seriesIndex) {\n var rangeInfoList = rangeInfoBySeries[seriesIndex] = [];\n seriesModel.subType === 'parallel' ? stepAParallel(seriesModel, seriesIndex) : stepAOthers(seriesModel, seriesIndex, rangeInfoList);\n });\n function stepAParallel(seriesModel, seriesIndex) {\n var coordSys = seriesModel.coordinateSystem;\n hasBrushExists = hasBrushExists || coordSys.hasAxisBrushed();\n linkOthers(seriesIndex) && coordSys.eachActiveState(seriesModel.getData(), function (activeState, dataIndex) {\n activeState === 'active' && (selectedDataIndexForLink[dataIndex] = 1);\n });\n }\n function stepAOthers(seriesModel, seriesIndex, rangeInfoList) {\n if (!seriesModel.brushSelector || brushModelNotControll(brushModel, seriesIndex)) {\n return;\n }\n zrUtil.each(areas, function (area) {\n if (brushModel.brushTargetManager.controlSeries(area, seriesModel, ecModel)) {\n rangeInfoList.push(area);\n }\n hasBrushExists = hasBrushExists || brushed(rangeInfoList);\n });\n if (linkOthers(seriesIndex) && brushed(rangeInfoList)) {\n var data_1 = seriesModel.getData();\n data_1.each(function (dataIndex) {\n if (checkInRange(seriesModel, rangeInfoList, data_1, dataIndex)) {\n selectedDataIndexForLink[dataIndex] = 1;\n }\n });\n }\n }\n // Step B\n ecModel.eachSeries(function (seriesModel, seriesIndex) {\n var seriesBrushSelected = {\n seriesId: seriesModel.id,\n seriesIndex: seriesIndex,\n seriesName: seriesModel.name,\n dataIndex: []\n };\n // Every series exists in event params, convenient\n // for user to find series by seriesIndex.\n thisBrushSelected.selected.push(seriesBrushSelected);\n var rangeInfoList = rangeInfoBySeries[seriesIndex];\n var data = seriesModel.getData();\n var getValueState = linkOthers(seriesIndex) ? function (dataIndex) {\n return selectedDataIndexForLink[dataIndex] ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush';\n } : function (dataIndex) {\n return checkInRange(seriesModel, rangeInfoList, data, dataIndex) ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush';\n };\n // If no supported brush or no brush, all visuals are in original state.\n (linkOthers(seriesIndex) ? hasBrushExists : brushed(rangeInfoList)) && visualSolution.applyVisual(STATE_LIST, visualMappings, data, getValueState);\n });\n });\n dispatchAction(api, throttleType, throttleDelay, brushSelected, payload);\n}\n;\nfunction dispatchAction(api, throttleType, throttleDelay, brushSelected, payload) {\n // This event will not be triggered when `setOpion`, otherwise dead lock may\n // triggered when do `setOption` in event listener, which we do not find\n // satisfactory way to solve yet. Some considered resolutions:\n // (a) Diff with prevoius selected data ant only trigger event when changed.\n // But store previous data and diff precisely (i.e., not only by dataIndex, but\n // also detect value changes in selected data) might bring complexity or fragility.\n // (b) Use spectial param like `silent` to suppress event triggering.\n // But such kind of volatile param may be weird in `setOption`.\n if (!payload) {\n return;\n }\n var zr = api.getZr();\n if (zr[DISPATCH_FLAG]) {\n return;\n }\n if (!zr[DISPATCH_METHOD]) {\n zr[DISPATCH_METHOD] = doDispatch;\n }\n var fn = throttleUtil.createOrUpdate(zr, DISPATCH_METHOD, throttleDelay, throttleType);\n fn(api, brushSelected);\n}\nfunction doDispatch(api, brushSelected) {\n if (!api.isDisposed()) {\n var zr = api.getZr();\n zr[DISPATCH_FLAG] = true;\n api.dispatchAction({\n type: 'brushSelect',\n batch: brushSelected\n });\n zr[DISPATCH_FLAG] = false;\n }\n}\nfunction checkInRange(seriesModel, rangeInfoList, data, dataIndex) {\n for (var i = 0, len = rangeInfoList.length; i < len; i++) {\n var area = rangeInfoList[i];\n if (seriesModel.brushSelector(dataIndex, data, area.selectors, area)) {\n return true;\n }\n }\n}\nfunction brushModelNotControll(brushModel, seriesIndex) {\n var seriesIndices = brushModel.option.seriesIndex;\n return seriesIndices != null && seriesIndices !== 'all' && (zrUtil.isArray(seriesIndices) ? zrUtil.indexOf(seriesIndices, seriesIndex) < 0 : seriesIndex !== seriesIndices);\n}\nvar boundingRectBuilders = {\n rect: function (area) {\n return getBoundingRectFromMinMax(area.range);\n },\n polygon: function (area) {\n var minMax;\n var range = area.range;\n for (var i = 0, len = range.length; i < len; i++) {\n minMax = minMax || [[Infinity, -Infinity], [Infinity, -Infinity]];\n var rg = range[i];\n rg[0] < minMax[0][0] && (minMax[0][0] = rg[0]);\n rg[0] > minMax[0][1] && (minMax[0][1] = rg[0]);\n rg[1] < minMax[1][0] && (minMax[1][0] = rg[1]);\n rg[1] > minMax[1][1] && (minMax[1][1] = rg[1]);\n }\n return minMax && getBoundingRectFromMinMax(minMax);\n }\n};\nfunction getBoundingRectFromMinMax(minMax) {\n return new BoundingRect(minMax[0][0], minMax[1][0], minMax[0][1] - minMax[0][0], minMax[1][1] - minMax[1][0]);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BrushController from '../helper/BrushController.js';\nimport { layoutCovers } from './visualEncoding.js';\nimport ComponentView from '../../view/Component.js';\nvar BrushView = /** @class */function (_super) {\n __extends(BrushView, _super);\n function BrushView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BrushView.type;\n return _this;\n }\n BrushView.prototype.init = function (ecModel, api) {\n this.ecModel = ecModel;\n this.api = api;\n this.model;\n (this._brushController = new BrushController(api.getZr())).on('brush', zrUtil.bind(this._onBrush, this)).mount();\n };\n BrushView.prototype.render = function (brushModel, ecModel, api, payload) {\n this.model = brushModel;\n this._updateController(brushModel, ecModel, api, payload);\n };\n BrushView.prototype.updateTransform = function (brushModel, ecModel, api, payload) {\n // PENDING: `updateTransform` is a little tricky, whose layout need\n // to be calculate mandatorily and other stages will not be performed.\n // Take care the correctness of the logic. See #11754 .\n layoutCovers(ecModel);\n this._updateController(brushModel, ecModel, api, payload);\n };\n BrushView.prototype.updateVisual = function (brushModel, ecModel, api, payload) {\n this.updateTransform(brushModel, ecModel, api, payload);\n };\n BrushView.prototype.updateView = function (brushModel, ecModel, api, payload) {\n this._updateController(brushModel, ecModel, api, payload);\n };\n BrushView.prototype._updateController = function (brushModel, ecModel, api, payload) {\n // Do not update controller when drawing.\n (!payload || payload.$from !== brushModel.id) && this._brushController.setPanels(brushModel.brushTargetManager.makePanelOpts(api)).enableBrush(brushModel.brushOption).updateCovers(brushModel.areas.slice());\n };\n // updateLayout: updateController,\n // updateVisual: updateController,\n BrushView.prototype.dispose = function () {\n this._brushController.dispose();\n };\n BrushView.prototype._onBrush = function (eventParam) {\n var modelId = this.model.id;\n var areas = this.model.brushTargetManager.setOutputRanges(eventParam.areas, this.ecModel);\n // Action is not dispatched on drag end, because the drag end\n // emits the same params with the last drag move event, and\n // may have some delay when using touch pad, which makes\n // animation not smooth (when using debounce).\n (!eventParam.isEnd || eventParam.removeOnClick) && this.api.dispatchAction({\n type: 'brush',\n brushId: modelId,\n areas: zrUtil.clone(areas),\n $from: modelId\n });\n eventParam.isEnd && this.api.dispatchAction({\n type: 'brushEnd',\n brushId: modelId,\n areas: zrUtil.clone(areas),\n $from: modelId\n });\n };\n BrushView.type = 'brush';\n return BrushView;\n}(ComponentView);\nexport default BrushView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport Model from '../../model/Model.js';\nimport ComponentModel from '../../model/Component.js';\nimport tokens from '../../visual/tokens.js';\nvar BrushModel = /** @class */function (_super) {\n __extends(BrushModel, _super);\n function BrushModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BrushModel.type;\n /**\n * @readOnly\n */\n _this.areas = [];\n /**\n * Current brush painting area settings.\n * @readOnly\n */\n _this.brushOption = {};\n return _this;\n }\n BrushModel.prototype.optionUpdated = function (newOption, isInit) {\n var thisOption = this.option;\n !isInit && visualSolution.replaceVisualOption(thisOption, newOption, ['inBrush', 'outOfBrush']);\n var inBrush = thisOption.inBrush = thisOption.inBrush || {};\n // Always give default visual, consider setOption at the second time.\n thisOption.outOfBrush = thisOption.outOfBrush || {\n color: this.option.defaultOutOfBrushColor\n };\n if (!inBrush.hasOwnProperty('liftZ')) {\n // Bigger than the highlight z lift, otherwise it will\n // be effected by the highlight z when brush.\n inBrush.liftZ = 5;\n }\n };\n /**\n * If `areas` is null/undefined, range state remain.\n */\n BrushModel.prototype.setAreas = function (areas) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(zrUtil.isArray(areas));\n zrUtil.each(areas, function (area) {\n zrUtil.assert(area.brushType, 'Illegal areas');\n });\n }\n // If areas is null/undefined, range state remain.\n // This helps user to dispatchAction({type: 'brush'}) with no areas\n // set but just want to get the current brush select info from a `brush` event.\n if (!areas) {\n return;\n }\n this.areas = zrUtil.map(areas, function (area) {\n return generateBrushOption(this.option, area);\n }, this);\n };\n /**\n * Set the current painting brush option.\n */\n BrushModel.prototype.setBrushOption = function (brushOption) {\n this.brushOption = generateBrushOption(this.option, brushOption);\n this.brushType = this.brushOption.brushType;\n };\n BrushModel.type = 'brush';\n BrushModel.dependencies = ['geo', 'grid', 'xAxis', 'yAxis', 'parallel', 'series'];\n BrushModel.defaultOption = {\n seriesIndex: 'all',\n brushType: 'rect',\n brushMode: 'single',\n transformable: true,\n brushStyle: {\n borderWidth: 1,\n color: tokens.color.backgroundTint,\n borderColor: tokens.color.borderTint\n },\n throttleType: 'fixRate',\n throttleDelay: 0,\n removeOnClick: true,\n z: 10000,\n defaultOutOfBrushColor: tokens.color.disabled\n };\n return BrushModel;\n}(ComponentModel);\nfunction generateBrushOption(option, brushOption) {\n return zrUtil.merge({\n brushType: option.brushType,\n brushMode: option.brushMode,\n transformable: option.transformable,\n brushStyle: new Model(option.brushStyle).getItemStyle(),\n removeOnClick: option.removeOnClick,\n z: option.z\n }, brushOption, true);\n}\nexport default BrushModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { ToolboxFeature } from '../featureManager.js';\nvar ICON_TYPES = ['rect', 'polygon', 'lineX', 'lineY', 'keep', 'clear'];\nvar BrushFeature = /** @class */function (_super) {\n __extends(BrushFeature, _super);\n function BrushFeature() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n BrushFeature.prototype.render = function (featureModel, ecModel, api) {\n var brushType;\n var brushMode;\n var isBrushed;\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n brushType = brushModel.brushType;\n brushMode = brushModel.brushOption.brushMode || 'single';\n isBrushed = isBrushed || !!brushModel.areas.length;\n });\n this._brushType = brushType;\n this._brushMode = brushMode;\n zrUtil.each(featureModel.get('type', true), function (type) {\n featureModel.setIconStatus(type, (type === 'keep' ? brushMode === 'multiple' : type === 'clear' ? isBrushed : type === brushType) ? 'emphasis' : 'normal');\n });\n };\n BrushFeature.prototype.updateView = function (featureModel, ecModel, api) {\n this.render(featureModel, ecModel, api);\n };\n BrushFeature.prototype.getIcons = function () {\n var model = this.model;\n var availableIcons = model.get('icon', true);\n var icons = {};\n zrUtil.each(model.get('type', true), function (type) {\n if (availableIcons[type]) {\n icons[type] = availableIcons[type];\n }\n });\n return icons;\n };\n ;\n BrushFeature.prototype.onclick = function (ecModel, api, type) {\n var brushType = this._brushType;\n var brushMode = this._brushMode;\n if (type === 'clear') {\n // Trigger parallel action firstly\n api.dispatchAction({\n type: 'axisAreaSelect',\n intervals: []\n });\n api.dispatchAction({\n type: 'brush',\n command: 'clear',\n // Clear all areas of all brush components.\n areas: []\n });\n } else {\n api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'brush',\n brushOption: {\n brushType: type === 'keep' ? brushType : brushType === type ? false : type,\n brushMode: type === 'keep' ? brushMode === 'multiple' ? 'single' : 'multiple' : brushMode\n }\n });\n }\n };\n ;\n BrushFeature.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n type: ICON_TYPES.slice(),\n icon: {\n /* eslint-disable */\n rect: 'M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13',\n polygon: 'M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2',\n lineX: 'M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4',\n lineY: 'M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4',\n keep: 'M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z',\n clear: 'M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2' // jshint ignore:line\n /* eslint-enable */\n },\n // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`\n title: ecModel.getLocaleModel().get(['toolbox', 'brush', 'title'])\n };\n return defaultOption;\n };\n return BrushFeature;\n}(ToolboxFeature);\nexport default BrushFeature;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport brushPreprocessor from './preprocessor.js';\nimport BrushView from './BrushView.js';\nimport BrushModel from './BrushModel.js';\nimport brushVisual from './visualEncoding.js';\n// TODO\nimport BrushFeature from '../toolbox/feature/Brush.js';\nimport { registerFeature } from '../toolbox/featureManager.js';\nimport { noop } from 'zrender/lib/core/util.js';\nexport function install(registers) {\n registers.registerComponentView(BrushView);\n registers.registerComponentModel(BrushModel);\n registers.registerPreprocessor(brushPreprocessor);\n registers.registerVisual(registers.PRIORITY.VISUAL.BRUSH, brushVisual);\n registers.registerAction({\n type: 'brush',\n event: 'brush',\n update: 'updateVisual'\n }, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'brush',\n query: payload\n }, function (brushModel) {\n brushModel.setAreas(payload.areas);\n });\n });\n /**\n * payload: {\n * brushComponents: [\n * {\n * brushId,\n * brushIndex,\n * brushName,\n * series: [\n * {\n * seriesId,\n * seriesIndex,\n * seriesName,\n * rawIndices: [21, 34, ...]\n * },\n * ...\n * ]\n * },\n * ...\n * ]\n * }\n */\n registers.registerAction({\n type: 'brushSelect',\n event: 'brushSelected',\n update: 'none'\n }, noop);\n registers.registerAction({\n type: 'brushEnd',\n event: 'brushEnd',\n update: 'none'\n }, noop);\n registerFeature('brush', BrushFeature);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { createBoxLayoutReference, getLayoutRect } from '../../util/layout.js';\nimport ComponentModel from '../../model/Component.js';\nimport ComponentView from '../../view/Component.js';\nimport { windowOpen } from '../../util/format.js';\nimport tokens from '../../visual/tokens.js';\nvar TitleModel = /** @class */function (_super) {\n __extends(TitleModel, _super);\n function TitleModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TitleModel.type;\n _this.layoutMode = {\n type: 'box',\n ignoreSize: true\n };\n return _this;\n }\n TitleModel.type = 'title';\n TitleModel.defaultOption = {\n // zlevel: 0,\n z: 6,\n show: true,\n text: '',\n target: 'blank',\n subtext: '',\n subtarget: 'blank',\n left: 'center',\n top: tokens.size.m,\n backgroundColor: tokens.color.transparent,\n borderColor: tokens.color.primary,\n borderWidth: 0,\n padding: 5,\n itemGap: 10,\n textStyle: {\n fontSize: 18,\n fontWeight: 'bold',\n color: tokens.color.primary\n },\n subtextStyle: {\n fontSize: 12,\n color: tokens.color.quaternary\n }\n };\n return TitleModel;\n}(ComponentModel);\n// View\nvar TitleView = /** @class */function (_super) {\n __extends(TitleView, _super);\n function TitleView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TitleView.type;\n return _this;\n }\n TitleView.prototype.render = function (titleModel, ecModel, api) {\n this.group.removeAll();\n if (!titleModel.get('show')) {\n return;\n }\n var group = this.group;\n var textStyleModel = titleModel.getModel('textStyle');\n var subtextStyleModel = titleModel.getModel('subtextStyle');\n var textAlign = titleModel.get('textAlign');\n var textVerticalAlign = zrUtil.retrieve2(titleModel.get('textBaseline'), titleModel.get('textVerticalAlign'));\n var textEl = new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: titleModel.get('text'),\n fill: textStyleModel.getTextColor()\n }, {\n disableBox: true\n }),\n z2: 10\n });\n var textRect = textEl.getBoundingRect();\n var subText = titleModel.get('subtext');\n var subTextEl = new graphic.Text({\n style: createTextStyle(subtextStyleModel, {\n text: subText,\n fill: subtextStyleModel.getTextColor(),\n y: textRect.height + titleModel.get('itemGap'),\n verticalAlign: 'top'\n }, {\n disableBox: true\n }),\n z2: 10\n });\n var link = titleModel.get('link');\n var sublink = titleModel.get('sublink');\n var triggerEvent = titleModel.get('triggerEvent', true);\n textEl.silent = !link && !triggerEvent;\n subTextEl.silent = !sublink && !triggerEvent;\n if (link) {\n textEl.on('click', function () {\n windowOpen(link, '_' + titleModel.get('target'));\n });\n }\n if (sublink) {\n subTextEl.on('click', function () {\n windowOpen(sublink, '_' + titleModel.get('subtarget'));\n });\n }\n getECData(textEl).eventData = getECData(subTextEl).eventData = triggerEvent ? {\n componentType: 'title',\n componentIndex: titleModel.componentIndex\n } : null;\n group.add(textEl);\n subText && group.add(subTextEl);\n // If no subText, but add subTextEl, there will be an empty line.\n var groupRect = group.getBoundingRect();\n var layoutOption = titleModel.getBoxLayoutParams();\n layoutOption.width = groupRect.width;\n layoutOption.height = groupRect.height;\n var layoutRef = createBoxLayoutReference(titleModel, api);\n var layoutRect = getLayoutRect(layoutOption, layoutRef.refContainer, titleModel.get('padding'));\n // Adjust text align based on position\n if (!textAlign) {\n // Align left if title is on the left. center and right is same\n textAlign = titleModel.get('left') || titleModel.get('right');\n // @ts-ignore\n if (textAlign === 'middle') {\n textAlign = 'center';\n }\n // Adjust layout by text align\n if (textAlign === 'right') {\n layoutRect.x += layoutRect.width;\n } else if (textAlign === 'center') {\n layoutRect.x += layoutRect.width / 2;\n }\n }\n if (!textVerticalAlign) {\n textVerticalAlign = titleModel.get('top') || titleModel.get('bottom');\n // @ts-ignore\n if (textVerticalAlign === 'center') {\n textVerticalAlign = 'middle';\n }\n if (textVerticalAlign === 'bottom') {\n layoutRect.y += layoutRect.height;\n } else if (textVerticalAlign === 'middle') {\n layoutRect.y += layoutRect.height / 2;\n }\n textVerticalAlign = textVerticalAlign || 'top';\n }\n group.x = layoutRect.x;\n group.y = layoutRect.y;\n group.markRedraw();\n var alignStyle = {\n align: textAlign,\n verticalAlign: textVerticalAlign\n };\n textEl.setStyle(alignStyle);\n subTextEl.setStyle(alignStyle);\n // Render background\n // Get groupRect again because textAlign has been changed\n groupRect = group.getBoundingRect();\n var padding = layoutRect.margin;\n var style = titleModel.getItemStyle(['color', 'opacity']);\n style.fill = titleModel.get('backgroundColor');\n var rect = new graphic.Rect({\n shape: {\n x: groupRect.x - padding[3],\n y: groupRect.y - padding[0],\n width: groupRect.width + padding[1] + padding[3],\n height: groupRect.height + padding[0] + padding[2],\n r: titleModel.get('borderRadius')\n },\n style: style,\n subPixelOptimize: true,\n silent: true\n });\n group.add(rect);\n };\n TitleView.type = 'title';\n return TitleView;\n}(ComponentView);\nexport function install(registers) {\n registers.registerComponentModel(TitleModel);\n registers.registerComponentView(TitleView);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport { each, isObject, clone } from 'zrender/lib/core/util.js';\nimport { convertOptionIdName, getDataItemValue } from '../../util/model.js';\nimport tokens from '../../visual/tokens.js';\nvar TimelineModel = /** @class */function (_super) {\n __extends(TimelineModel, _super);\n function TimelineModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TimelineModel.type;\n _this.layoutMode = 'box';\n return _this;\n }\n /**\n * @override\n */\n TimelineModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n this._initData();\n };\n /**\n * @override\n */\n TimelineModel.prototype.mergeOption = function (option) {\n _super.prototype.mergeOption.apply(this, arguments);\n this._initData();\n };\n TimelineModel.prototype.setCurrentIndex = function (currentIndex) {\n if (currentIndex == null) {\n currentIndex = this.option.currentIndex;\n }\n var count = this._data.count();\n if (this.option.loop) {\n currentIndex = (currentIndex % count + count) % count;\n } else {\n currentIndex >= count && (currentIndex = count - 1);\n currentIndex < 0 && (currentIndex = 0);\n }\n this.option.currentIndex = currentIndex;\n };\n /**\n * @return {number} currentIndex\n */\n TimelineModel.prototype.getCurrentIndex = function () {\n return this.option.currentIndex;\n };\n /**\n * @return {boolean}\n */\n TimelineModel.prototype.isIndexMax = function () {\n return this.getCurrentIndex() >= this._data.count() - 1;\n };\n /**\n * @param {boolean} state true: play, false: stop\n */\n TimelineModel.prototype.setPlayState = function (state) {\n this.option.autoPlay = !!state;\n };\n /**\n * @return {boolean} true: play, false: stop\n */\n TimelineModel.prototype.getPlayState = function () {\n return !!this.option.autoPlay;\n };\n /**\n * @private\n */\n TimelineModel.prototype._initData = function () {\n var thisOption = this.option;\n var dataArr = thisOption.data || [];\n var axisType = thisOption.axisType;\n var names = this._names = [];\n var processedDataArr;\n if (axisType === 'category') {\n processedDataArr = [];\n each(dataArr, function (item, index) {\n var value = convertOptionIdName(getDataItemValue(item), '');\n var newItem;\n if (isObject(item)) {\n newItem = clone(item);\n newItem.value = index;\n } else {\n newItem = index;\n }\n processedDataArr.push(newItem);\n names.push(value);\n });\n } else {\n processedDataArr = dataArr;\n }\n var dimType = {\n category: 'ordinal',\n time: 'time',\n value: 'number'\n }[axisType] || 'number';\n var data = this._data = new SeriesData([{\n name: 'value',\n type: dimType\n }], this);\n data.initData(processedDataArr, names);\n };\n TimelineModel.prototype.getData = function () {\n return this._data;\n };\n /**\n * @public\n * @return {Array.<string>} categoreis\n */\n TimelineModel.prototype.getCategories = function () {\n if (this.get('axisType') === 'category') {\n return this._names.slice();\n }\n };\n TimelineModel.type = 'timeline';\n /**\n * @protected\n */\n TimelineModel.defaultOption = {\n // zlevel: 0, // 一级层叠\n z: 4,\n show: true,\n axisType: 'time',\n realtime: true,\n left: '20%',\n top: null,\n right: '20%',\n bottom: 0,\n width: null,\n height: 40,\n padding: tokens.size.m,\n controlPosition: 'left',\n autoPlay: false,\n rewind: false,\n loop: true,\n playInterval: 2000,\n currentIndex: 0,\n itemStyle: {},\n label: {\n color: tokens.color.secondary\n },\n data: []\n };\n return TimelineModel;\n}(ComponentModel);\nexport default TimelineModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport TimelineModel from './TimelineModel.js';\nimport { DataFormatMixin } from '../../model/mixin/dataFormat.js';\nimport { mixin } from 'zrender/lib/core/util.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nimport tokens from '../../visual/tokens.js';\nvar SliderTimelineModel = /** @class */function (_super) {\n __extends(SliderTimelineModel, _super);\n function SliderTimelineModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SliderTimelineModel.type;\n return _this;\n }\n SliderTimelineModel.type = 'timeline.slider';\n /**\n * @protected\n */\n SliderTimelineModel.defaultOption = inheritDefaultOption(TimelineModel.defaultOption, {\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: tokens.color.border,\n borderWidth: 0,\n orient: 'horizontal',\n inverse: false,\n tooltip: {\n trigger: 'item' // data item may also have tootip attr.\n },\n symbol: 'circle',\n symbolSize: 12,\n lineStyle: {\n show: true,\n width: 2,\n color: tokens.color.accent10\n },\n label: {\n position: 'auto',\n // When using number, label position is not\n // restricted by viewRect.\n // positive: right/bottom, negative: left/top\n show: true,\n interval: 'auto',\n rotate: 0,\n // formatter: null,\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: tokens.color.tertiary\n },\n itemStyle: {\n color: tokens.color.accent20,\n borderWidth: 0\n },\n checkpointStyle: {\n symbol: 'circle',\n symbolSize: 15,\n color: tokens.color.accent50,\n borderColor: tokens.color.accent50,\n borderWidth: 0,\n shadowBlur: 0,\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n shadowColor: 'rgba(0, 0, 0, 0)',\n // borderColor: 'rgba(194,53,49, 0.5)',\n animation: true,\n animationDuration: 300,\n animationEasing: 'quinticInOut'\n },\n controlStyle: {\n show: true,\n showPlayBtn: true,\n showPrevBtn: true,\n showNextBtn: true,\n itemSize: 24,\n itemGap: 12,\n position: 'left',\n playIcon: 'path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z',\n stopIcon: 'path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z',\n // eslint-disable-next-line max-len\n nextIcon: 'path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z',\n // eslint-disable-next-line max-len\n prevIcon: 'path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z',\n prevBtnSize: 18,\n nextBtnSize: 18,\n color: tokens.color.accent50,\n borderColor: tokens.color.accent50,\n borderWidth: 0\n },\n emphasis: {\n label: {\n show: true,\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: tokens.color.accent60\n },\n itemStyle: {\n color: tokens.color.accent60,\n borderColor: tokens.color.accent60\n },\n controlStyle: {\n color: tokens.color.accent70,\n borderColor: tokens.color.accent70\n }\n },\n progress: {\n lineStyle: {\n color: tokens.color.accent30\n },\n itemStyle: {\n color: tokens.color.accent40\n }\n },\n data: []\n });\n return SliderTimelineModel;\n}(TimelineModel);\nmixin(SliderTimelineModel, DataFormatMixin.prototype);\nexport default SliderTimelineModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nvar TimelineView = /** @class */function (_super) {\n __extends(TimelineView, _super);\n function TimelineView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TimelineView.type;\n return _this;\n }\n TimelineView.type = 'timeline';\n return TimelineView;\n}(ComponentView);\nexport default TimelineView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../../coord/Axis.js';\n/**\n * Extend axis 2d\n */\nvar TimelineAxis = /** @class */function (_super) {\n __extends(TimelineAxis, _super);\n function TimelineAxis(dim, scale, coordExtent, axisType) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n _this.type = axisType || 'value';\n return _this;\n }\n /**\n * @override\n */\n TimelineAxis.prototype.getLabelModel = function () {\n // Force override\n return this.model.getModel('label');\n };\n /**\n * @override\n */\n TimelineAxis.prototype.isHorizontal = function () {\n return this.model.get('orient') === 'horizontal';\n };\n return TimelineAxis;\n}(Axis);\nexport default TimelineAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport * as layout from '../../util/layout.js';\nimport TimelineView from './TimelineView.js';\nimport TimelineAxis from './TimelineAxis.js';\nimport { createSymbol, normalizeSymbolOffset, normalizeSymbolSize } from '../../util/symbol.js';\nimport * as numberUtil from '../../util/number.js';\nimport { merge, each, extend, isString, bind, defaults, retrieve2 } from 'zrender/lib/core/util.js';\nimport OrdinalScale from '../../scale/Ordinal.js';\nimport TimeScale from '../../scale/Time.js';\nimport IntervalScale from '../../scale/Interval.js';\nimport { parsePercent } from 'zrender/lib/contain/text.js';\nimport { makeInner } from '../../util/model.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { createTooltipMarkup } from '../tooltip/tooltipMarkup.js';\nvar PI = Math.PI;\nvar labelDataIndexStore = makeInner();\nvar SliderTimelineView = /** @class */function (_super) {\n __extends(SliderTimelineView, _super);\n function SliderTimelineView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SliderTimelineView.type;\n return _this;\n }\n SliderTimelineView.prototype.init = function (ecModel, api) {\n this.api = api;\n };\n /**\n * @override\n */\n SliderTimelineView.prototype.render = function (timelineModel, ecModel, api) {\n this.model = timelineModel;\n this.api = api;\n this.ecModel = ecModel;\n this.group.removeAll();\n if (timelineModel.get('show', true)) {\n var layoutInfo_1 = this._layout(timelineModel, api);\n var mainGroup_1 = this._createGroup('_mainGroup');\n var labelGroup = this._createGroup('_labelGroup');\n var axis_1 = this._axis = this._createAxis(layoutInfo_1, timelineModel);\n timelineModel.formatTooltip = function (dataIndex) {\n var name = axis_1.scale.getLabel({\n value: dataIndex\n });\n return createTooltipMarkup('nameValue', {\n noName: true,\n value: name\n });\n };\n each(['AxisLine', 'AxisTick', 'Control', 'CurrentPointer'], function (name) {\n this['_render' + name](layoutInfo_1, mainGroup_1, axis_1, timelineModel);\n }, this);\n this._renderAxisLabel(layoutInfo_1, labelGroup, axis_1, timelineModel);\n this._position(layoutInfo_1, timelineModel);\n }\n this._doPlayStop();\n this._updateTicksStatus();\n };\n /**\n * @override\n */\n SliderTimelineView.prototype.remove = function () {\n this._clearTimer();\n this.group.removeAll();\n };\n /**\n * @override\n */\n SliderTimelineView.prototype.dispose = function () {\n this._clearTimer();\n };\n SliderTimelineView.prototype._layout = function (timelineModel, api) {\n var labelPosOpt = timelineModel.get(['label', 'position']);\n var orient = timelineModel.get('orient');\n var viewRect = getViewRect(timelineModel, api);\n var parsedLabelPos;\n // Auto label offset.\n if (labelPosOpt == null || labelPosOpt === 'auto') {\n parsedLabelPos = orient === 'horizontal' ? viewRect.y + viewRect.height / 2 < api.getHeight() / 2 ? '-' : '+' : viewRect.x + viewRect.width / 2 < api.getWidth() / 2 ? '+' : '-';\n } else if (isString(labelPosOpt)) {\n parsedLabelPos = {\n horizontal: {\n top: '-',\n bottom: '+'\n },\n vertical: {\n left: '-',\n right: '+'\n }\n }[orient][labelPosOpt];\n } else {\n // is number\n parsedLabelPos = labelPosOpt;\n }\n var labelAlignMap = {\n horizontal: 'center',\n vertical: parsedLabelPos >= 0 || parsedLabelPos === '+' ? 'left' : 'right'\n };\n var labelBaselineMap = {\n horizontal: parsedLabelPos >= 0 || parsedLabelPos === '+' ? 'top' : 'bottom',\n vertical: 'middle'\n };\n var rotationMap = {\n horizontal: 0,\n vertical: PI / 2\n };\n // Position\n var mainLength = orient === 'vertical' ? viewRect.height : viewRect.width;\n var controlModel = timelineModel.getModel('controlStyle');\n var showControl = controlModel.get('show', true);\n var controlSize = showControl ? controlModel.get('itemSize') : 0;\n var controlGap = showControl ? controlModel.get('itemGap') : 0;\n var sizePlusGap = controlSize + controlGap;\n // Special label rotate.\n var labelRotation = timelineModel.get(['label', 'rotate']) || 0;\n labelRotation = labelRotation * PI / 180; // To radian.\n var playPosition;\n var prevBtnPosition;\n var nextBtnPosition;\n var controlPosition = controlModel.get('position', true);\n var showPlayBtn = showControl && controlModel.get('showPlayBtn', true);\n var showPrevBtn = showControl && controlModel.get('showPrevBtn', true);\n var showNextBtn = showControl && controlModel.get('showNextBtn', true);\n var xLeft = 0;\n var xRight = mainLength;\n // position[0] means left, position[1] means middle.\n if (controlPosition === 'left' || controlPosition === 'bottom') {\n showPlayBtn && (playPosition = [0, 0], xLeft += sizePlusGap);\n showPrevBtn && (prevBtnPosition = [xLeft, 0], xLeft += sizePlusGap);\n showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);\n } else {\n // 'top' 'right'\n showPlayBtn && (playPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);\n showPrevBtn && (prevBtnPosition = [0, 0], xLeft += sizePlusGap);\n showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);\n }\n var axisExtent = [xLeft, xRight];\n if (timelineModel.get('inverse')) {\n axisExtent.reverse();\n }\n return {\n viewRect: viewRect,\n mainLength: mainLength,\n orient: orient,\n rotation: rotationMap[orient],\n labelRotation: labelRotation,\n labelPosOpt: parsedLabelPos,\n labelAlign: timelineModel.get(['label', 'align']) || labelAlignMap[orient],\n labelBaseline: timelineModel.get(['label', 'verticalAlign']) || timelineModel.get(['label', 'baseline']) || labelBaselineMap[orient],\n // Based on mainGroup.\n playPosition: playPosition,\n prevBtnPosition: prevBtnPosition,\n nextBtnPosition: nextBtnPosition,\n axisExtent: axisExtent,\n controlSize: controlSize,\n controlGap: controlGap\n };\n };\n SliderTimelineView.prototype._position = function (layoutInfo, timelineModel) {\n // Position is be called finally, because bounding rect is needed for\n // adapt content to fill viewRect (auto adapt offset).\n // Timeline may be not all in the viewRect when 'offset' is specified\n // as a number, because it is more appropriate that label aligns at\n // 'offset' but not the other edge defined by viewRect.\n var mainGroup = this._mainGroup;\n var labelGroup = this._labelGroup;\n var viewRect = layoutInfo.viewRect;\n if (layoutInfo.orient === 'vertical') {\n // transform to horizontal, inverse rotate by left-top point.\n var m = matrix.create();\n var rotateOriginX = viewRect.x;\n var rotateOriginY = viewRect.y + viewRect.height;\n matrix.translate(m, m, [-rotateOriginX, -rotateOriginY]);\n matrix.rotate(m, m, -PI / 2);\n matrix.translate(m, m, [rotateOriginX, rotateOriginY]);\n viewRect = viewRect.clone();\n viewRect.applyTransform(m);\n }\n var viewBound = getBound(viewRect);\n var mainBound = getBound(mainGroup.getBoundingRect());\n var labelBound = getBound(labelGroup.getBoundingRect());\n var mainPosition = [mainGroup.x, mainGroup.y];\n var labelsPosition = [labelGroup.x, labelGroup.y];\n labelsPosition[0] = mainPosition[0] = viewBound[0][0];\n var labelPosOpt = layoutInfo.labelPosOpt;\n if (labelPosOpt == null || isString(labelPosOpt)) {\n // '+' or '-'\n var mainBoundIdx = labelPosOpt === '+' ? 0 : 1;\n toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx);\n toBound(labelsPosition, labelBound, viewBound, 1, 1 - mainBoundIdx);\n } else {\n var mainBoundIdx = labelPosOpt >= 0 ? 0 : 1;\n toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx);\n labelsPosition[1] = mainPosition[1] + labelPosOpt;\n }\n mainGroup.setPosition(mainPosition);\n labelGroup.setPosition(labelsPosition);\n mainGroup.rotation = labelGroup.rotation = layoutInfo.rotation;\n setOrigin(mainGroup);\n setOrigin(labelGroup);\n function setOrigin(targetGroup) {\n targetGroup.originX = viewBound[0][0] - targetGroup.x;\n targetGroup.originY = viewBound[1][0] - targetGroup.y;\n }\n function getBound(rect) {\n // [[xmin, xmax], [ymin, ymax]]\n return [[rect.x, rect.x + rect.width], [rect.y, rect.y + rect.height]];\n }\n function toBound(fromPos, from, to, dimIdx, boundIdx) {\n fromPos[dimIdx] += to[dimIdx][boundIdx] - from[dimIdx][boundIdx];\n }\n };\n SliderTimelineView.prototype._createAxis = function (layoutInfo, timelineModel) {\n var data = timelineModel.getData();\n var axisType = timelineModel.get('axisType');\n var scale = createScaleByModel(timelineModel, axisType);\n // Customize scale. The `tickValue` is `dataIndex`.\n scale.getTicks = function () {\n return data.mapArray(['value'], function (value) {\n return {\n value: value\n };\n });\n };\n var dataExtent = data.getDataExtent('value');\n scale.setExtent(dataExtent[0], dataExtent[1]);\n scale.calcNiceTicks();\n var axis = new TimelineAxis('value', scale, layoutInfo.axisExtent, axisType);\n axis.model = timelineModel;\n return axis;\n };\n SliderTimelineView.prototype._createGroup = function (key) {\n var newGroup = this[key] = new graphic.Group();\n this.group.add(newGroup);\n return newGroup;\n };\n SliderTimelineView.prototype._renderAxisLine = function (layoutInfo, group, axis, timelineModel) {\n var axisExtent = axis.getExtent();\n if (!timelineModel.get(['lineStyle', 'show'])) {\n return;\n }\n var line = new graphic.Line({\n shape: {\n x1: axisExtent[0],\n y1: 0,\n x2: axisExtent[1],\n y2: 0\n },\n style: extend({\n lineCap: 'round'\n }, timelineModel.getModel('lineStyle').getLineStyle()),\n silent: true,\n z2: 1\n });\n group.add(line);\n var progressLine = this._progressLine = new graphic.Line({\n shape: {\n x1: axisExtent[0],\n x2: this._currentPointer ? this._currentPointer.x : axisExtent[0],\n y1: 0,\n y2: 0\n },\n style: defaults({\n lineCap: 'round',\n lineWidth: line.style.lineWidth\n }, timelineModel.getModel(['progress', 'lineStyle']).getLineStyle()),\n silent: true,\n z2: 1\n });\n group.add(progressLine);\n };\n SliderTimelineView.prototype._renderAxisTick = function (layoutInfo, group, axis, timelineModel) {\n var _this = this;\n var data = timelineModel.getData();\n // Show all ticks, despite ignoring strategy.\n var ticks = axis.scale.getTicks();\n this._tickSymbols = [];\n // The value is dataIndex, see the customized scale.\n each(ticks, function (tick) {\n var tickCoord = axis.dataToCoord(tick.value);\n var itemModel = data.getItemModel(tick.value);\n var itemStyleModel = itemModel.getModel('itemStyle');\n var hoverStyleModel = itemModel.getModel(['emphasis', 'itemStyle']);\n var progressStyleModel = itemModel.getModel(['progress', 'itemStyle']);\n var symbolOpt = {\n x: tickCoord,\n y: 0,\n onclick: bind(_this._changeTimeline, _this, tick.value)\n };\n var el = giveSymbol(itemModel, itemStyleModel, group, symbolOpt);\n el.ensureState('emphasis').style = hoverStyleModel.getItemStyle();\n el.ensureState('progress').style = progressStyleModel.getItemStyle();\n enableHoverEmphasis(el);\n var ecData = getECData(el);\n if (itemModel.get('tooltip')) {\n ecData.dataIndex = tick.value;\n ecData.dataModel = timelineModel;\n } else {\n ecData.dataIndex = ecData.dataModel = null;\n }\n _this._tickSymbols.push(el);\n });\n };\n SliderTimelineView.prototype._renderAxisLabel = function (layoutInfo, group, axis, timelineModel) {\n var _this = this;\n var labelModel = axis.getLabelModel();\n if (!labelModel.get('show')) {\n return;\n }\n var data = timelineModel.getData();\n var labels = axis.getViewLabels();\n this._tickLabels = [];\n each(labels, function (labelItem) {\n // The tickValue is dataIndex, see the customized scale.\n var dataIndex = labelItem.tickValue;\n var itemModel = data.getItemModel(dataIndex);\n var normalLabelModel = itemModel.getModel('label');\n var hoverLabelModel = itemModel.getModel(['emphasis', 'label']);\n var progressLabelModel = itemModel.getModel(['progress', 'label']);\n var tickCoord = axis.dataToCoord(labelItem.tickValue);\n var textEl = new graphic.Text({\n x: tickCoord,\n y: 0,\n rotation: layoutInfo.labelRotation - layoutInfo.rotation,\n onclick: bind(_this._changeTimeline, _this, dataIndex),\n silent: false,\n style: createTextStyle(normalLabelModel, {\n text: labelItem.formattedLabel,\n align: layoutInfo.labelAlign,\n verticalAlign: layoutInfo.labelBaseline\n })\n });\n textEl.ensureState('emphasis').style = createTextStyle(hoverLabelModel);\n textEl.ensureState('progress').style = createTextStyle(progressLabelModel);\n group.add(textEl);\n enableHoverEmphasis(textEl);\n labelDataIndexStore(textEl).dataIndex = dataIndex;\n _this._tickLabels.push(textEl);\n });\n };\n SliderTimelineView.prototype._renderControl = function (layoutInfo, group, axis, timelineModel) {\n var controlSize = layoutInfo.controlSize;\n var rotation = layoutInfo.rotation;\n var itemStyle = timelineModel.getModel('controlStyle').getItemStyle();\n var hoverStyle = timelineModel.getModel(['emphasis', 'controlStyle']).getItemStyle();\n var playState = timelineModel.getPlayState();\n var inverse = timelineModel.get('inverse', true);\n makeBtn(layoutInfo.nextBtnPosition, 'next', bind(this._changeTimeline, this, inverse ? '-' : '+'));\n makeBtn(layoutInfo.prevBtnPosition, 'prev', bind(this._changeTimeline, this, inverse ? '+' : '-'));\n makeBtn(layoutInfo.playPosition, playState ? 'stop' : 'play', bind(this._handlePlayClick, this, !playState), true);\n function makeBtn(position, iconName, onclick, willRotate) {\n if (!position) {\n return;\n }\n var iconSize = parsePercent(retrieve2(timelineModel.get(['controlStyle', iconName + 'BtnSize']), controlSize), controlSize);\n var rect = [0, -iconSize / 2, iconSize, iconSize];\n var btn = makeControlIcon(timelineModel, iconName + 'Icon', rect, {\n x: position[0],\n y: position[1],\n originX: controlSize / 2,\n originY: 0,\n rotation: willRotate ? -rotation : 0,\n rectHover: true,\n style: itemStyle,\n onclick: onclick\n });\n btn.ensureState('emphasis').style = hoverStyle;\n group.add(btn);\n enableHoverEmphasis(btn);\n }\n };\n SliderTimelineView.prototype._renderCurrentPointer = function (layoutInfo, group, axis, timelineModel) {\n var data = timelineModel.getData();\n var currentIndex = timelineModel.getCurrentIndex();\n var pointerModel = data.getItemModel(currentIndex).getModel('checkpointStyle');\n var me = this;\n var callback = {\n onCreate: function (pointer) {\n pointer.draggable = true;\n pointer.drift = bind(me._handlePointerDrag, me);\n pointer.ondragend = bind(me._handlePointerDragend, me);\n pointerMoveTo(pointer, me._progressLine, currentIndex, axis, timelineModel, true);\n },\n onUpdate: function (pointer) {\n pointerMoveTo(pointer, me._progressLine, currentIndex, axis, timelineModel);\n }\n };\n // Reuse when exists, for animation and drag.\n this._currentPointer = giveSymbol(pointerModel, pointerModel, this._mainGroup, {}, this._currentPointer, callback);\n };\n SliderTimelineView.prototype._handlePlayClick = function (nextState) {\n this._clearTimer();\n this.api.dispatchAction({\n type: 'timelinePlayChange',\n playState: nextState,\n from: this.uid\n });\n };\n SliderTimelineView.prototype._handlePointerDrag = function (dx, dy, e) {\n this._clearTimer();\n this._pointerChangeTimeline([e.offsetX, e.offsetY]);\n };\n SliderTimelineView.prototype._handlePointerDragend = function (e) {\n this._pointerChangeTimeline([e.offsetX, e.offsetY], true);\n };\n SliderTimelineView.prototype._pointerChangeTimeline = function (mousePos, trigger) {\n var toCoord = this._toAxisCoord(mousePos)[0];\n var axis = this._axis;\n var axisExtent = numberUtil.asc(axis.getExtent().slice());\n toCoord > axisExtent[1] && (toCoord = axisExtent[1]);\n toCoord < axisExtent[0] && (toCoord = axisExtent[0]);\n this._currentPointer.x = toCoord;\n this._currentPointer.markRedraw();\n var progressLine = this._progressLine;\n if (progressLine) {\n progressLine.shape.x2 = toCoord;\n progressLine.dirty();\n }\n var targetDataIndex = this._findNearestTick(toCoord);\n var timelineModel = this.model;\n if (trigger || targetDataIndex !== timelineModel.getCurrentIndex() && timelineModel.get('realtime')) {\n this._changeTimeline(targetDataIndex);\n }\n };\n SliderTimelineView.prototype._doPlayStop = function () {\n var _this = this;\n this._clearTimer();\n if (this.model.getPlayState()) {\n this._timer = setTimeout(function () {\n // Do not cache\n var timelineModel = _this.model;\n _this._changeTimeline(timelineModel.getCurrentIndex() + (timelineModel.get('rewind', true) ? -1 : 1));\n }, this.model.get('playInterval'));\n }\n };\n SliderTimelineView.prototype._toAxisCoord = function (vertex) {\n var trans = this._mainGroup.getLocalTransform();\n return graphic.applyTransform(vertex, trans, true);\n };\n SliderTimelineView.prototype._findNearestTick = function (axisCoord) {\n var data = this.model.getData();\n var dist = Infinity;\n var targetDataIndex;\n var axis = this._axis;\n data.each(['value'], function (value, dataIndex) {\n var coord = axis.dataToCoord(value);\n var d = Math.abs(coord - axisCoord);\n if (d < dist) {\n dist = d;\n targetDataIndex = dataIndex;\n }\n });\n return targetDataIndex;\n };\n SliderTimelineView.prototype._clearTimer = function () {\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n };\n SliderTimelineView.prototype._changeTimeline = function (nextIndex) {\n var currentIndex = this.model.getCurrentIndex();\n if (nextIndex === '+') {\n nextIndex = currentIndex + 1;\n } else if (nextIndex === '-') {\n nextIndex = currentIndex - 1;\n }\n this.api.dispatchAction({\n type: 'timelineChange',\n currentIndex: nextIndex,\n from: this.uid\n });\n };\n SliderTimelineView.prototype._updateTicksStatus = function () {\n var currentIndex = this.model.getCurrentIndex();\n var tickSymbols = this._tickSymbols;\n var tickLabels = this._tickLabels;\n if (tickSymbols) {\n for (var i = 0; i < tickSymbols.length; i++) {\n tickSymbols && tickSymbols[i] && tickSymbols[i].toggleState('progress', i < currentIndex);\n }\n }\n if (tickLabels) {\n for (var i = 0; i < tickLabels.length; i++) {\n tickLabels && tickLabels[i] && tickLabels[i].toggleState('progress', labelDataIndexStore(tickLabels[i]).dataIndex <= currentIndex);\n }\n }\n };\n SliderTimelineView.type = 'timeline.slider';\n return SliderTimelineView;\n}(TimelineView);\nfunction createScaleByModel(model, axisType) {\n axisType = axisType || model.get('type');\n if (axisType) {\n switch (axisType) {\n // Buildin scale\n case 'category':\n return new OrdinalScale({\n ordinalMeta: model.getCategories(),\n extent: [Infinity, -Infinity]\n });\n case 'time':\n return new TimeScale({\n locale: model.ecModel.getLocaleModel(),\n useUTC: model.ecModel.get('useUTC')\n });\n default:\n // default to be value\n return new IntervalScale();\n }\n }\n}\nfunction getViewRect(model, api) {\n return layout.getLayoutRect(model.getBoxLayoutParams(), layout.createBoxLayoutReference(model, api).refContainer, model.get('padding'));\n}\nfunction makeControlIcon(timelineModel, objPath, rect, opts) {\n var style = opts.style;\n var icon = graphic.createIcon(timelineModel.get(['controlStyle', objPath]), opts || {}, new BoundingRect(rect[0], rect[1], rect[2], rect[3]));\n // TODO createIcon won't use style in opt.\n if (style) {\n icon.setStyle(style);\n }\n return icon;\n}\n/**\n * Create symbol or update symbol\n * opt: basic position and event handlers\n */\nfunction giveSymbol(hostModel, itemStyleModel, group, opt, symbol, callback) {\n var color = itemStyleModel.get('color');\n if (!symbol) {\n var symbolType = hostModel.get('symbol');\n symbol = createSymbol(symbolType, -1, -1, 2, 2, color);\n symbol.setStyle('strokeNoScale', true);\n group.add(symbol);\n callback && callback.onCreate(symbol);\n } else {\n symbol.setColor(color);\n group.add(symbol); // Group may be new, also need to add.\n callback && callback.onUpdate(symbol);\n }\n // Style\n var itemStyle = itemStyleModel.getItemStyle(['color']);\n symbol.setStyle(itemStyle);\n // Transform and events.\n opt = merge({\n rectHover: true,\n z2: 100\n }, opt, true);\n var symbolSize = normalizeSymbolSize(hostModel.get('symbolSize'));\n opt.scaleX = symbolSize[0] / 2;\n opt.scaleY = symbolSize[1] / 2;\n var symbolOffset = normalizeSymbolOffset(hostModel.get('symbolOffset'), symbolSize);\n if (symbolOffset) {\n opt.x = (opt.x || 0) + symbolOffset[0];\n opt.y = (opt.y || 0) + symbolOffset[1];\n }\n var symbolRotate = hostModel.get('symbolRotate');\n opt.rotation = (symbolRotate || 0) * Math.PI / 180 || 0;\n symbol.attr(opt);\n // FIXME\n // (1) When symbol.style.strokeNoScale is true and updateTransform is not performed,\n // getBoundingRect will return wrong result.\n // (This is supposed to be resolved in zrender, but it is a little difficult to\n // leverage performance and auto updateTransform)\n // (2) All of ancesters of symbol do not scale, so we can just updateTransform symbol.\n symbol.updateTransform();\n return symbol;\n}\nfunction pointerMoveTo(pointer, progressLine, dataIndex, axis, timelineModel, noAnimation) {\n if (pointer.dragging) {\n return;\n }\n var pointerModel = timelineModel.getModel('checkpointStyle');\n var toCoord = axis.dataToCoord(timelineModel.getData().get('value', dataIndex));\n if (noAnimation || !pointerModel.get('animation', true)) {\n pointer.attr({\n x: toCoord,\n y: 0\n });\n progressLine && progressLine.attr({\n shape: {\n x2: toCoord\n }\n });\n } else {\n var animationCfg = {\n duration: pointerModel.get('animationDuration', true),\n easing: pointerModel.get('animationEasing', true)\n };\n pointer.stopAnimation(null, true);\n pointer.animateTo({\n x: toCoord,\n y: 0\n }, animationCfg);\n progressLine && progressLine.animateTo({\n shape: {\n x2: toCoord\n }\n }, animationCfg);\n }\n}\nexport default SliderTimelineView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { defaults } from 'zrender/lib/core/util.js';\nexport function installTimelineAction(registers) {\n registers.registerAction({\n type: 'timelineChange',\n event: 'timelineChanged',\n update: 'prepareAndUpdate'\n }, function (payload, ecModel, api) {\n var timelineModel = ecModel.getComponent('timeline');\n if (timelineModel && payload.currentIndex != null) {\n timelineModel.setCurrentIndex(payload.currentIndex);\n if (!timelineModel.get('loop', true) && timelineModel.isIndexMax() && timelineModel.getPlayState()) {\n timelineModel.setPlayState(false);\n // The timeline has played to the end, trigger event\n api.dispatchAction({\n type: 'timelinePlayChange',\n playState: false,\n from: payload.from\n });\n }\n }\n // Set normalized currentIndex to payload.\n ecModel.resetOption('timeline', {\n replaceMerge: timelineModel.get('replaceMerge', true)\n });\n return defaults({\n currentIndex: timelineModel.option.currentIndex\n }, payload);\n });\n registers.registerAction({\n type: 'timelinePlayChange',\n event: 'timelinePlayChanged',\n update: 'update'\n }, function (payload, ecModel) {\n var timelineModel = ecModel.getComponent('timeline');\n if (timelineModel && payload.playState != null) {\n timelineModel.setPlayState(payload.playState);\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function timelinePreprocessor(option) {\n var timelineOpt = option && option.timeline;\n if (!zrUtil.isArray(timelineOpt)) {\n timelineOpt = timelineOpt ? [timelineOpt] : [];\n }\n zrUtil.each(timelineOpt, function (opt) {\n if (!opt) {\n return;\n }\n compatibleEC2(opt);\n });\n}\nfunction compatibleEC2(opt) {\n var type = opt.type;\n var ec2Types = {\n 'number': 'value',\n 'time': 'time'\n };\n // Compatible with ec2\n if (ec2Types[type]) {\n opt.axisType = ec2Types[type];\n delete opt.type;\n }\n transferItem(opt);\n if (has(opt, 'controlPosition')) {\n var controlStyle = opt.controlStyle || (opt.controlStyle = {});\n if (!has(controlStyle, 'position')) {\n controlStyle.position = opt.controlPosition;\n }\n if (controlStyle.position === 'none' && !has(controlStyle, 'show')) {\n controlStyle.show = false;\n delete controlStyle.position;\n }\n delete opt.controlPosition;\n }\n zrUtil.each(opt.data || [], function (dataItem) {\n if (zrUtil.isObject(dataItem) && !zrUtil.isArray(dataItem)) {\n if (!has(dataItem, 'value') && has(dataItem, 'name')) {\n // In ec2, using name as value.\n dataItem.value = dataItem.name;\n }\n transferItem(dataItem);\n }\n });\n}\nfunction transferItem(opt) {\n var itemStyle = opt.itemStyle || (opt.itemStyle = {});\n var itemStyleEmphasis = itemStyle.emphasis || (itemStyle.emphasis = {});\n // Transfer label out\n var label = opt.label || opt.label || {};\n var labelNormal = label.normal || (label.normal = {});\n var excludeLabelAttr = {\n normal: 1,\n emphasis: 1\n };\n zrUtil.each(label, function (value, name) {\n if (!excludeLabelAttr[name] && !has(labelNormal, name)) {\n labelNormal[name] = value;\n }\n });\n if (itemStyleEmphasis.label && !has(label, 'emphasis')) {\n label.emphasis = itemStyleEmphasis.label;\n delete itemStyleEmphasis.label;\n }\n}\nfunction has(obj, attr) {\n return obj.hasOwnProperty(attr);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport SliderTimelineModel from './SliderTimelineModel.js';\nimport SliderTimelineView from './SliderTimelineView.js';\nimport { installTimelineAction } from './timelineAction.js';\nimport preprocessor from './preprocessor.js';\nexport function install(registers) {\n registers.registerComponentModel(SliderTimelineModel);\n registers.registerComponentView(SliderTimelineView);\n registers.registerSubTypeDefaulter('timeline', function () {\n // Only slider now.\n return 'slider';\n });\n installTimelineAction(registers);\n registers.registerPreprocessor(preprocessor);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isArray } from 'zrender/lib/core/util.js';\nexport default function checkMarkerInSeries(seriesOpts, markerType) {\n if (!seriesOpts) {\n return false;\n }\n var seriesOptArr = isArray(seriesOpts) ? seriesOpts : [seriesOpts];\n for (var idx = 0; idx < seriesOptArr.length; idx++) {\n if (seriesOptArr[idx] && seriesOptArr[idx][markerType]) {\n return true;\n }\n }\n return false;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport { DataFormatMixin } from '../../model/mixin/dataFormat.js';\nimport ComponentModel from '../../model/Component.js';\nimport { makeInner, defaultEmphasis } from '../../util/model.js';\nimport { createTooltipMarkup } from '../tooltip/tooltipMarkup.js';\nfunction fillLabel(opt) {\n defaultEmphasis(opt, 'label', ['show']);\n}\n// { [componentType]: MarkerModel }\nvar inner = makeInner();\nvar MarkerModel = /** @class */function (_super) {\n __extends(MarkerModel, _super);\n function MarkerModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkerModel.type;\n /**\n * If marker model is created by self from series\n */\n _this.createdBySelf = false;\n _this.preventAutoZ = true;\n return _this;\n }\n /**\n * @overrite\n */\n MarkerModel.prototype.init = function (option, parentModel, ecModel) {\n if (process.env.NODE_ENV !== 'production') {\n if (this.type === 'marker') {\n throw new Error('Marker component is abstract component. Use markLine, markPoint, markArea instead.');\n }\n }\n this.mergeDefaultAndTheme(option, ecModel);\n this._mergeOption(option, ecModel, false, true);\n };\n MarkerModel.prototype.isAnimationEnabled = function () {\n if (env.node) {\n return false;\n }\n var hostSeries = this.__hostSeries;\n return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled();\n };\n /**\n * @overrite\n */\n MarkerModel.prototype.mergeOption = function (newOpt, ecModel) {\n this._mergeOption(newOpt, ecModel, false, false);\n };\n MarkerModel.prototype._mergeOption = function (newOpt, ecModel, createdBySelf, isInit) {\n var componentType = this.mainType;\n if (!createdBySelf) {\n ecModel.eachSeries(function (seriesModel) {\n // mainType can be markPoint, markLine, markArea\n var markerOpt = seriesModel.get(this.mainType, true);\n var markerModel = inner(seriesModel)[componentType];\n if (!markerOpt || !markerOpt.data) {\n inner(seriesModel)[componentType] = null;\n return;\n }\n if (!markerModel) {\n if (isInit) {\n // Default label emphasis `position` and `show`\n fillLabel(markerOpt);\n }\n zrUtil.each(markerOpt.data, function (item) {\n // FIXME Overwrite fillLabel method ?\n if (item instanceof Array) {\n fillLabel(item[0]);\n fillLabel(item[1]);\n } else {\n fillLabel(item);\n }\n });\n markerModel = this.createMarkerModelFromSeries(markerOpt, this, ecModel);\n // markerModel = new ImplementedMarkerModel(\n // markerOpt, this, ecModel\n // );\n zrUtil.extend(markerModel, {\n mainType: this.mainType,\n // Use the same series index and name\n seriesIndex: seriesModel.seriesIndex,\n name: seriesModel.name,\n createdBySelf: true\n });\n markerModel.__hostSeries = seriesModel;\n } else {\n markerModel._mergeOption(markerOpt, ecModel, true);\n }\n inner(seriesModel)[componentType] = markerModel;\n }, this);\n }\n };\n MarkerModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var data = this.getData();\n var value = this.getRawValue(dataIndex);\n var itemName = data.getName(dataIndex);\n return createTooltipMarkup('section', {\n header: this.name,\n blocks: [createTooltipMarkup('nameValue', {\n name: itemName,\n value: value,\n noName: !itemName,\n noValue: value == null\n })]\n });\n };\n MarkerModel.prototype.getData = function () {\n return this._data;\n };\n MarkerModel.prototype.setData = function (data) {\n this._data = data;\n };\n MarkerModel.prototype.getDataParams = function (dataIndex, dataType) {\n var params = DataFormatMixin.prototype.getDataParams.call(this, dataIndex, dataType);\n var hostSeries = this.__hostSeries;\n if (hostSeries) {\n params.seriesId = hostSeries.id;\n params.seriesName = hostSeries.name;\n params.seriesType = hostSeries.subType;\n }\n return params;\n };\n MarkerModel.getMarkerModelFromSeries = function (seriesModel,\n // Support three types of markers. Strict check.\n componentType) {\n return inner(seriesModel)[componentType];\n };\n MarkerModel.type = 'marker';\n MarkerModel.dependencies = ['series', 'grid', 'polar', 'geo'];\n return MarkerModel;\n}(ComponentModel);\nzrUtil.mixin(MarkerModel, DataFormatMixin.prototype);\nexport default MarkerModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MarkerModel from './MarkerModel.js';\nvar MarkPointModel = /** @class */function (_super) {\n __extends(MarkPointModel, _super);\n function MarkPointModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkPointModel.type;\n return _this;\n }\n MarkPointModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) {\n return new MarkPointModel(markerOpt, masterMarkerModel, ecModel);\n };\n MarkPointModel.type = 'markPoint';\n MarkPointModel.defaultOption = {\n // zlevel: 0,\n z: 5,\n symbol: 'pin',\n symbolSize: 50,\n // symbolRotate: 0,\n // symbolOffset: [0, 0]\n tooltip: {\n trigger: 'item'\n },\n label: {\n show: true,\n position: 'inside'\n },\n itemStyle: {\n borderWidth: 2\n },\n emphasis: {\n label: {\n show: true\n }\n }\n };\n return MarkPointModel;\n}(MarkerModel);\nexport default MarkPointModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as numberUtil from '../../util/number.js';\nimport { isDimensionStacked } from '../../data/helper/dataStackHelper.js';\nimport { indexOf, curry, clone, isArray } from 'zrender/lib/core/util.js';\nimport { parseDataValue } from '../../data/helper/dataValueHelper.js';\nfunction hasXOrY(item) {\n return !(isNaN(parseFloat(item.x)) && isNaN(parseFloat(item.y)));\n}\nfunction hasXAndY(item) {\n return !isNaN(parseFloat(item.x)) && !isNaN(parseFloat(item.y));\n}\nfunction markerTypeCalculatorWithExtent(markerType, data, axisDim, otherDataDim, targetDataDim, otherCoordIndex, targetCoordIndex) {\n var coordArr = [];\n var stacked = isDimensionStacked(data, targetDataDim /* , otherDataDim */);\n var calcDataDim = stacked ? data.getCalculationInfo('stackResultDimension') : targetDataDim;\n var value = numCalculate(data, calcDataDim, markerType);\n var seriesModel = data.hostModel;\n var dataIndex = seriesModel.indicesOfNearest(axisDim, calcDataDim, value)[0];\n coordArr[otherCoordIndex] = data.get(otherDataDim, dataIndex);\n coordArr[targetCoordIndex] = data.get(calcDataDim, dataIndex);\n var coordArrValue = data.get(targetDataDim, dataIndex);\n // Make it simple, do not visit all stacked value to count precision.\n var precision = numberUtil.getPrecision(data.get(targetDataDim, dataIndex));\n precision = Math.min(precision, 20);\n if (precision >= 0) {\n coordArr[targetCoordIndex] = +coordArr[targetCoordIndex].toFixed(precision);\n }\n return [coordArr, coordArrValue];\n}\n// TODO Specified percent\nvar markerTypeCalculator = {\n min: curry(markerTypeCalculatorWithExtent, 'min'),\n max: curry(markerTypeCalculatorWithExtent, 'max'),\n average: curry(markerTypeCalculatorWithExtent, 'average'),\n median: curry(markerTypeCalculatorWithExtent, 'median')\n};\n/**\n * Transform markPoint data item to format used in List by do the following\n * 1. Calculate statistic like `max`, `min`, `average`\n * 2. Convert `item.xAxis`, `item.yAxis` to `item.coord` array\n */\nexport function dataTransform(seriesModel, item) {\n if (!item) {\n return;\n }\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var dims = coordSys && coordSys.dimensions;\n // 1. If not specify the position with pixel directly\n // 2. If `coord` is not a data array. Which uses `xAxis`,\n // `yAxis` to specify the coord on each dimension\n // parseFloat first because item.x and item.y can be percent string like '20%'\n if (!hasXAndY(item) && !isArray(item.coord) && isArray(dims)) {\n var axisInfo = getAxisInfo(item, data, coordSys, seriesModel);\n // Clone the option\n // Transform the properties xAxis, yAxis, radiusAxis, angleAxis, geoCoord to value\n item = clone(item);\n if (item.type && markerTypeCalculator[item.type] && axisInfo.baseAxis && axisInfo.valueAxis) {\n var otherCoordIndex = indexOf(dims, axisInfo.baseAxis.dim);\n var targetCoordIndex = indexOf(dims, axisInfo.valueAxis.dim);\n var coordInfo = markerTypeCalculator[item.type](data, axisInfo.valueAxis.dim, axisInfo.baseDataDim, axisInfo.valueDataDim, otherCoordIndex, targetCoordIndex);\n item.coord = coordInfo[0];\n // Force to use the value of calculated value.\n // let item use the value without stack.\n item.value = coordInfo[1];\n } else {\n // FIXME Only has one of xAxis and yAxis.\n item.coord = [item.xAxis != null ? item.xAxis : item.radiusAxis, item.yAxis != null ? item.yAxis : item.angleAxis];\n }\n }\n // x y is provided\n if (item.coord == null || !isArray(dims)) {\n item.coord = [];\n var baseAxis = seriesModel.getBaseAxis();\n if (baseAxis && item.type && markerTypeCalculator[item.type]) {\n var otherAxis = coordSys.getOtherAxis(baseAxis);\n if (otherAxis) {\n item.value = numCalculate(data, data.mapDimension(otherAxis.dim), item.type);\n }\n }\n } else {\n // Each coord support max, min, average\n var coord = item.coord;\n for (var i = 0; i < 2; i++) {\n if (markerTypeCalculator[coord[i]]) {\n coord[i] = numCalculate(data, data.mapDimension(dims[i]), coord[i]);\n }\n }\n }\n return item;\n}\nexport function getAxisInfo(item, data, coordSys, seriesModel) {\n var ret = {};\n if (item.valueIndex != null || item.valueDim != null) {\n ret.valueDataDim = item.valueIndex != null ? data.getDimension(item.valueIndex) : item.valueDim;\n ret.valueAxis = coordSys.getAxis(dataDimToCoordDim(seriesModel, ret.valueDataDim));\n ret.baseAxis = coordSys.getOtherAxis(ret.valueAxis);\n ret.baseDataDim = data.mapDimension(ret.baseAxis.dim);\n } else {\n ret.baseAxis = seriesModel.getBaseAxis();\n ret.valueAxis = coordSys.getOtherAxis(ret.baseAxis);\n ret.baseDataDim = data.mapDimension(ret.baseAxis.dim);\n ret.valueDataDim = data.mapDimension(ret.valueAxis.dim);\n }\n return ret;\n}\nfunction dataDimToCoordDim(seriesModel, dataDim) {\n var dimItem = seriesModel.getData().getDimensionInfo(dataDim);\n return dimItem && dimItem.coordDim;\n}\n/**\n * Filter data which is out of coordinateSystem range\n * [dataFilter description]\n */\nexport function dataFilter(\n// Currently only polar and cartesian has containData.\ncoordSys, item) {\n // Always return true if there is no coordSys\n return coordSys && coordSys.containData && item.coord && !hasXOrY(item) ? coordSys.containData(item.coord) : true;\n}\nexport function zoneFilter(\n// Currently only polar and cartesian has containData.\ncoordSys, item1, item2) {\n // Always return true if there is no coordSys\n return coordSys && coordSys.containZone && item1.coord && item2.coord && !hasXOrY(item1) && !hasXOrY(item2) ? coordSys.containZone(item1.coord, item2.coord) : true;\n}\nexport function createMarkerDimValueGetter(inCoordSys, dims) {\n return inCoordSys ? function (item, dimName, dataIndex, dimIndex) {\n var rawVal = dimIndex < 2\n // x, y, radius, angle\n ? item.coord && item.coord[dimIndex] : item.value;\n return parseDataValue(rawVal, dims[dimIndex]);\n } : function (item, dimName, dataIndex, dimIndex) {\n return parseDataValue(item.value, dims[dimIndex]);\n };\n}\nexport function numCalculate(data, valueDataDim, type) {\n if (type === 'average') {\n var sum_1 = 0;\n var count_1 = 0;\n data.each(valueDataDim, function (val, idx) {\n if (!isNaN(val)) {\n sum_1 += val;\n count_1++;\n }\n });\n return sum_1 / count_1;\n } else if (type === 'median') {\n return data.getMedian(valueDataDim);\n } else {\n // max & min\n return data.getDataExtent(valueDataDim)[type === 'max' ? 1 : 0];\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nimport { createHashMap, each } from 'zrender/lib/core/util.js';\nimport MarkerModel from './MarkerModel.js';\nimport { makeInner } from '../../util/model.js';\nimport { enterBlur, leaveBlur } from '../../util/states.js';\nimport { traverseUpdateZ, retrieveZInfo } from '../../util/graphic.js';\nvar inner = makeInner();\nvar MarkerView = /** @class */function (_super) {\n __extends(MarkerView, _super);\n function MarkerView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkerView.type;\n return _this;\n }\n MarkerView.prototype.init = function () {\n this.markerGroupMap = createHashMap();\n };\n MarkerView.prototype.render = function (markerModel, ecModel, api) {\n var _this = this;\n var markerGroupMap = this.markerGroupMap;\n markerGroupMap.each(function (item) {\n inner(item).keep = false;\n });\n ecModel.eachSeries(function (seriesModel) {\n var markerModel = MarkerModel.getMarkerModelFromSeries(seriesModel, _this.type);\n markerModel && _this.renderSeries(seriesModel, markerModel, ecModel, api);\n });\n markerGroupMap.each(function (item) {\n !inner(item).keep && _this.group.remove(item.group);\n });\n updateZ(ecModel, markerGroupMap, this.type);\n };\n MarkerView.prototype.markKeep = function (drawGroup) {\n inner(drawGroup).keep = true;\n };\n MarkerView.prototype.toggleBlurSeries = function (seriesModelList, isBlur) {\n var _this = this;\n each(seriesModelList, function (seriesModel) {\n var markerModel = MarkerModel.getMarkerModelFromSeries(seriesModel, _this.type);\n if (markerModel) {\n var data = markerModel.getData();\n data.eachItemGraphicEl(function (el) {\n if (el) {\n isBlur ? enterBlur(el) : leaveBlur(el);\n }\n });\n }\n });\n };\n MarkerView.type = 'marker';\n return MarkerView;\n}(ComponentView);\nfunction updateZ(ecModel, markerGroupMap, type) {\n ecModel.eachSeries(function (seriesModel) {\n var markerModel = MarkerModel.getMarkerModelFromSeries(seriesModel, type);\n var markerDraw = markerGroupMap.get(seriesModel.id);\n if (markerModel && markerDraw && markerDraw.group) {\n var _a = retrieveZInfo(markerModel),\n z = _a.z,\n zlevel = _a.zlevel;\n traverseUpdateZ(markerDraw.group, z, zlevel);\n }\n });\n}\nexport default MarkerView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SymbolDraw from '../../chart/helper/SymbolDraw.js';\nimport * as numberUtil from '../../util/number.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport * as markerHelper from './markerHelper.js';\nimport MarkerView from './MarkerView.js';\nimport MarkerModel from './MarkerModel.js';\nimport { isFunction, map, filter, curry, extend, retrieve2 } from 'zrender/lib/core/util.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nfunction updateMarkerLayout(mpData, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var apiWidth = api.getWidth();\n var apiHeight = api.getHeight();\n var coordRect = coordSys && coordSys.getArea && coordSys.getArea();\n mpData.each(function (idx) {\n var itemModel = mpData.getItemModel(idx);\n var isRelativeToCoordinate = itemModel.get('relativeTo') === 'coordinate';\n var width = isRelativeToCoordinate ? coordRect ? coordRect.width : 0 : apiWidth;\n var height = isRelativeToCoordinate ? coordRect ? coordRect.height : 0 : apiHeight;\n var left = isRelativeToCoordinate && coordRect ? coordRect.x : 0;\n var top = isRelativeToCoordinate && coordRect ? coordRect.y : 0;\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get('x'), width) + left;\n var yPx = numberUtil.parsePercent(itemModel.get('y'), height) + top;\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n }\n // Chart like bar may have there own marker positioning logic\n else if (seriesModel.getMarkerPosition) {\n // Use the getMarkerPosition\n point = seriesModel.getMarkerPosition(mpData.getValues(mpData.dimensions, idx));\n } else if (coordSys) {\n var x = mpData.get(coordSys.dimensions[0], idx);\n var y = mpData.get(coordSys.dimensions[1], idx);\n point = coordSys.dataToPoint([x, y]);\n }\n // Use x, y if has any\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n mpData.setItemLayout(idx, point);\n });\n}\nvar MarkPointView = /** @class */function (_super) {\n __extends(MarkPointView, _super);\n function MarkPointView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkPointView.type;\n return _this;\n }\n MarkPointView.prototype.updateTransform = function (markPointModel, ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n var mpModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markPoint');\n if (mpModel) {\n updateMarkerLayout(mpModel.getData(), seriesModel, api);\n this.markerGroupMap.get(seriesModel.id).updateLayout();\n }\n }, this);\n };\n MarkPointView.prototype.renderSeries = function (seriesModel, mpModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n var symbolDrawMap = this.markerGroupMap;\n var symbolDraw = symbolDrawMap.get(seriesId) || symbolDrawMap.set(seriesId, new SymbolDraw());\n var mpData = createData(coordSys, seriesModel, mpModel);\n // FIXME\n mpModel.setData(mpData);\n updateMarkerLayout(mpModel.getData(), seriesModel, api);\n mpData.each(function (idx) {\n var itemModel = mpData.getItemModel(idx);\n var symbol = itemModel.getShallow('symbol');\n var symbolSize = itemModel.getShallow('symbolSize');\n var symbolRotate = itemModel.getShallow('symbolRotate');\n var symbolOffset = itemModel.getShallow('symbolOffset');\n var symbolKeepAspect = itemModel.getShallow('symbolKeepAspect');\n // TODO: refactor needed: single data item should not support callback function\n if (isFunction(symbol) || isFunction(symbolSize) || isFunction(symbolRotate) || isFunction(symbolOffset)) {\n var rawIdx = mpModel.getRawValue(idx);\n var dataParams = mpModel.getDataParams(idx);\n if (isFunction(symbol)) {\n symbol = symbol(rawIdx, dataParams);\n }\n if (isFunction(symbolSize)) {\n // FIXME 这里不兼容 ECharts 2.x,2.x 貌似参数是整个数据?\n symbolSize = symbolSize(rawIdx, dataParams);\n }\n if (isFunction(symbolRotate)) {\n symbolRotate = symbolRotate(rawIdx, dataParams);\n }\n if (isFunction(symbolOffset)) {\n symbolOffset = symbolOffset(rawIdx, dataParams);\n }\n }\n var style = itemModel.getModel('itemStyle').getItemStyle();\n var z2 = itemModel.get('z2');\n var color = getVisualFromData(seriesData, 'color');\n if (!style.fill) {\n style.fill = color;\n }\n mpData.setItemVisual(idx, {\n z2: retrieve2(z2, 0),\n symbol: symbol,\n symbolSize: symbolSize,\n symbolRotate: symbolRotate,\n symbolOffset: symbolOffset,\n symbolKeepAspect: symbolKeepAspect,\n style: style\n });\n });\n // TODO Text are wrong\n symbolDraw.updateData(mpData);\n this.group.add(symbolDraw.group);\n // Set host model for tooltip\n // FIXME\n mpData.eachItemGraphicEl(function (el) {\n el.traverse(function (child) {\n getECData(child).dataModel = mpModel;\n });\n });\n this.markKeep(symbolDraw);\n symbolDraw.group.silent = mpModel.get('silent') || seriesModel.get('silent');\n };\n MarkPointView.type = 'markPoint';\n return MarkPointView;\n}(MarkerView);\nfunction createData(coordSys, seriesModel, mpModel) {\n var coordDimsInfos;\n if (coordSys) {\n coordDimsInfos = map(coordSys && coordSys.dimensions, function (coordDim) {\n var info = seriesModel.getData().getDimensionInfo(seriesModel.getData().mapDimension(coordDim)) || {};\n // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n return extend(extend({}, info), {\n name: coordDim,\n // DON'T use ordinalMeta to parse and collect ordinal.\n ordinalMeta: null\n });\n });\n } else {\n coordDimsInfos = [{\n name: 'value',\n type: 'float'\n }];\n }\n var mpData = new SeriesData(coordDimsInfos, mpModel);\n var dataOpt = map(mpModel.get('data'), curry(markerHelper.dataTransform, seriesModel));\n if (coordSys) {\n dataOpt = filter(dataOpt, curry(markerHelper.dataFilter, coordSys));\n }\n var dimValueGetter = markerHelper.createMarkerDimValueGetter(!!coordSys, coordDimsInfos);\n mpData.initData(dataOpt, null, dimValueGetter);\n return mpData;\n}\nexport default MarkPointView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport checkMarkerInSeries from './checkMarkerInSeries.js';\nimport MarkPointModel from './MarkPointModel.js';\nimport MarkPointView from './MarkPointView.js';\nexport function install(registers) {\n registers.registerComponentModel(MarkPointModel);\n registers.registerComponentView(MarkPointView);\n registers.registerPreprocessor(function (opt) {\n if (checkMarkerInSeries(opt.series, 'markPoint')) {\n // Make sure markPoint component is enabled\n opt.markPoint = opt.markPoint || {};\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MarkerModel from './MarkerModel.js';\nvar MarkLineModel = /** @class */function (_super) {\n __extends(MarkLineModel, _super);\n function MarkLineModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkLineModel.type;\n return _this;\n }\n MarkLineModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) {\n return new MarkLineModel(markerOpt, masterMarkerModel, ecModel);\n };\n MarkLineModel.type = 'markLine';\n MarkLineModel.defaultOption = {\n // zlevel: 0,\n z: 5,\n symbol: ['circle', 'arrow'],\n symbolSize: [8, 16],\n // symbolRotate: 0,\n symbolOffset: 0,\n precision: 2,\n tooltip: {\n trigger: 'item'\n },\n label: {\n show: true,\n position: 'end',\n distance: 5\n },\n lineStyle: {\n type: 'dashed'\n },\n emphasis: {\n label: {\n show: true\n },\n lineStyle: {\n width: 3\n }\n },\n animationEasing: 'linear'\n };\n return MarkLineModel;\n}(MarkerModel);\nexport default MarkLineModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesData from '../../data/SeriesData.js';\nimport * as numberUtil from '../../util/number.js';\nimport * as markerHelper from './markerHelper.js';\nimport LineDraw from '../../chart/helper/LineDraw.js';\nimport MarkerView from './MarkerView.js';\nimport { getStackedDimension } from '../../data/helper/dataStackHelper.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { getECData } from '../../util/innerStore.js';\nimport MarkerModel from './MarkerModel.js';\nimport { isArray, retrieve, retrieve2, clone, extend, logError, merge, map, curry, filter, isNumber } from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nvar inner = makeInner();\nvar markLineTransform = function (seriesModel, coordSys, mlModel, item) {\n var data = seriesModel.getData();\n var itemArray;\n if (!isArray(item)) {\n // Special type markLine like 'min', 'max', 'average', 'median'\n var mlType = item.type;\n if (mlType === 'min' || mlType === 'max' || mlType === 'average' || mlType === 'median'\n // In case\n // data: [{\n // yAxis: 10\n // }]\n || item.xAxis != null || item.yAxis != null) {\n var valueAxis = void 0;\n var value = void 0;\n if (item.yAxis != null || item.xAxis != null) {\n valueAxis = coordSys.getAxis(item.yAxis != null ? 'y' : 'x');\n value = retrieve(item.yAxis, item.xAxis);\n } else {\n var axisInfo = markerHelper.getAxisInfo(item, data, coordSys, seriesModel);\n valueAxis = axisInfo.valueAxis;\n var valueDataDim = getStackedDimension(data, axisInfo.valueDataDim);\n value = markerHelper.numCalculate(data, valueDataDim, mlType);\n }\n var valueIndex = valueAxis.dim === 'x' ? 0 : 1;\n var baseIndex = 1 - valueIndex;\n // Normized to 2d data with start and end point\n var mlFrom = clone(item);\n var mlTo = {\n coord: []\n };\n mlFrom.type = null;\n mlFrom.coord = [];\n mlFrom.coord[baseIndex] = -Infinity;\n mlTo.coord[baseIndex] = Infinity;\n var precision = mlModel.get('precision');\n if (precision >= 0 && isNumber(value)) {\n value = +value.toFixed(Math.min(precision, 20));\n }\n mlFrom.coord[valueIndex] = mlTo.coord[valueIndex] = value;\n itemArray = [mlFrom, mlTo, {\n type: mlType,\n valueIndex: item.valueIndex,\n // Force to use the value of calculated value.\n value: value\n }];\n } else {\n // Invalid data\n if (process.env.NODE_ENV !== 'production') {\n logError('Invalid markLine data.');\n }\n itemArray = [];\n }\n } else {\n itemArray = item;\n }\n var normalizedItem = [markerHelper.dataTransform(seriesModel, itemArray[0]), markerHelper.dataTransform(seriesModel, itemArray[1]), extend({}, itemArray[2])];\n // Avoid line data type is extended by from(to) data type\n normalizedItem[2].type = normalizedItem[2].type || null;\n // Merge from option and to option into line option\n merge(normalizedItem[2], normalizedItem[0]);\n merge(normalizedItem[2], normalizedItem[1]);\n return normalizedItem;\n};\nfunction isInfinity(val) {\n return !isNaN(val) && !isFinite(val);\n}\n// If a markLine has one dim\nfunction ifMarkLineHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) {\n var otherDimIndex = 1 - dimIndex;\n var dimName = coordSys.dimensions[dimIndex];\n return isInfinity(fromCoord[otherDimIndex]) && isInfinity(toCoord[otherDimIndex]) && fromCoord[dimIndex] === toCoord[dimIndex] && coordSys.getAxis(dimName).containData(fromCoord[dimIndex]);\n}\nfunction markLineFilter(coordSys, item) {\n if (coordSys.type === 'cartesian2d') {\n var fromCoord = item[0].coord;\n var toCoord = item[1].coord;\n // In case\n // {\n // markLine: {\n // data: [{ yAxis: 2 }]\n // }\n // }\n if (fromCoord && toCoord && (ifMarkLineHasOnlyDim(1, fromCoord, toCoord, coordSys) || ifMarkLineHasOnlyDim(0, fromCoord, toCoord, coordSys))) {\n return true;\n }\n }\n return markerHelper.dataFilter(coordSys, item[0]) && markerHelper.dataFilter(coordSys, item[1]);\n}\nfunction updateSingleMarkerEndLayout(data, idx, isFrom, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var itemModel = data.getItemModel(idx);\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get('x'), api.getWidth());\n var yPx = numberUtil.parsePercent(itemModel.get('y'), api.getHeight());\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n } else {\n // Chart like bar may have there own marker positioning logic\n if (seriesModel.getMarkerPosition) {\n // Use the getMarkerPosition\n point = seriesModel.getMarkerPosition(data.getValues(data.dimensions, idx));\n } else {\n var dims = coordSys.dimensions;\n var x = data.get(dims[0], idx);\n var y = data.get(dims[1], idx);\n point = coordSys.dataToPoint([x, y]);\n }\n // Expand line to the edge of grid if value on one axis is Inifnity\n // In case\n // markLine: {\n // data: [{\n // yAxis: 2\n // // or\n // type: 'average'\n // }]\n // }\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n // TODO: TYPE ts@4.1 may still infer it as Axis instead of Axis2D. Not sure if it's a bug\n var xAxis = coordSys.getAxis('x');\n var yAxis = coordSys.getAxis('y');\n var dims = coordSys.dimensions;\n if (isInfinity(data.get(dims[0], idx))) {\n point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[isFrom ? 0 : 1]);\n } else if (isInfinity(data.get(dims[1], idx))) {\n point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[isFrom ? 0 : 1]);\n }\n }\n // Use x, y if has any\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n }\n data.setItemLayout(idx, point);\n}\nvar MarkLineView = /** @class */function (_super) {\n __extends(MarkLineView, _super);\n function MarkLineView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkLineView.type;\n return _this;\n }\n MarkLineView.prototype.updateTransform = function (markLineModel, ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n var mlModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markLine');\n if (mlModel) {\n var mlData_1 = mlModel.getData();\n var fromData_1 = inner(mlModel).from;\n var toData_1 = inner(mlModel).to;\n // Update visual and layout of from symbol and to symbol\n fromData_1.each(function (idx) {\n updateSingleMarkerEndLayout(fromData_1, idx, true, seriesModel, api);\n updateSingleMarkerEndLayout(toData_1, idx, false, seriesModel, api);\n });\n // Update layout of line\n mlData_1.each(function (idx) {\n mlData_1.setItemLayout(idx, [fromData_1.getItemLayout(idx), toData_1.getItemLayout(idx)]);\n });\n this.markerGroupMap.get(seriesModel.id).updateLayout();\n }\n }, this);\n };\n MarkLineView.prototype.renderSeries = function (seriesModel, mlModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n var lineDrawMap = this.markerGroupMap;\n var lineDraw = lineDrawMap.get(seriesId) || lineDrawMap.set(seriesId, new LineDraw());\n this.group.add(lineDraw.group);\n var mlData = createList(coordSys, seriesModel, mlModel);\n var fromData = mlData.from;\n var toData = mlData.to;\n var lineData = mlData.line;\n inner(mlModel).from = fromData;\n inner(mlModel).to = toData;\n // Line data for tooltip and formatter\n mlModel.setData(lineData);\n // TODO\n // Functionally, `symbolSize` & `symbolOffset` can also be 2D array now.\n // But the related logic and type definition are not finished yet.\n // Finish it if required\n var symbolType = mlModel.get('symbol');\n var symbolSize = mlModel.get('symbolSize');\n var symbolRotate = mlModel.get('symbolRotate');\n var symbolOffset = mlModel.get('symbolOffset');\n // TODO: support callback function like markPoint\n if (!isArray(symbolType)) {\n symbolType = [symbolType, symbolType];\n }\n if (!isArray(symbolSize)) {\n symbolSize = [symbolSize, symbolSize];\n }\n if (!isArray(symbolRotate)) {\n symbolRotate = [symbolRotate, symbolRotate];\n }\n if (!isArray(symbolOffset)) {\n symbolOffset = [symbolOffset, symbolOffset];\n }\n // Update visual and layout of from symbol and to symbol\n mlData.from.each(function (idx) {\n updateDataVisualAndLayout(fromData, idx, true);\n updateDataVisualAndLayout(toData, idx, false);\n });\n // Update visual and layout of line\n lineData.each(function (idx) {\n var itemModel = lineData.getItemModel(idx);\n var lineStyle = itemModel.getModel('lineStyle').getLineStyle();\n // lineData.setItemVisual(idx, {\n // color: lineColor || fromData.getItemVisual(idx, 'color')\n // });\n lineData.setItemLayout(idx, [fromData.getItemLayout(idx), toData.getItemLayout(idx)]);\n var z2 = itemModel.get('z2');\n if (lineStyle.stroke == null) {\n lineStyle.stroke = fromData.getItemVisual(idx, 'style').fill;\n }\n lineData.setItemVisual(idx, {\n z2: retrieve2(z2, 0),\n fromSymbolKeepAspect: fromData.getItemVisual(idx, 'symbolKeepAspect'),\n fromSymbolOffset: fromData.getItemVisual(idx, 'symbolOffset'),\n fromSymbolRotate: fromData.getItemVisual(idx, 'symbolRotate'),\n fromSymbolSize: fromData.getItemVisual(idx, 'symbolSize'),\n fromSymbol: fromData.getItemVisual(idx, 'symbol'),\n toSymbolKeepAspect: toData.getItemVisual(idx, 'symbolKeepAspect'),\n toSymbolOffset: toData.getItemVisual(idx, 'symbolOffset'),\n toSymbolRotate: toData.getItemVisual(idx, 'symbolRotate'),\n toSymbolSize: toData.getItemVisual(idx, 'symbolSize'),\n toSymbol: toData.getItemVisual(idx, 'symbol'),\n style: lineStyle\n });\n });\n lineDraw.updateData(lineData);\n // Set host model for tooltip\n // FIXME\n mlData.line.eachItemGraphicEl(function (el) {\n getECData(el).dataModel = mlModel;\n el.traverse(function (child) {\n getECData(child).dataModel = mlModel;\n });\n });\n function updateDataVisualAndLayout(data, idx, isFrom) {\n var itemModel = data.getItemModel(idx);\n updateSingleMarkerEndLayout(data, idx, isFrom, seriesModel, api);\n var style = itemModel.getModel('itemStyle').getItemStyle();\n if (style.fill == null) {\n style.fill = getVisualFromData(seriesData, 'color');\n }\n data.setItemVisual(idx, {\n symbolKeepAspect: itemModel.get('symbolKeepAspect'),\n // `0` should be considered as a valid value, so use `retrieve2` instead of `||`\n symbolOffset: retrieve2(itemModel.get('symbolOffset', true), symbolOffset[isFrom ? 0 : 1]),\n symbolRotate: retrieve2(itemModel.get('symbolRotate', true), symbolRotate[isFrom ? 0 : 1]),\n // TODO: when 2d array is supported, it should ignore parent\n symbolSize: retrieve2(itemModel.get('symbolSize'), symbolSize[isFrom ? 0 : 1]),\n symbol: retrieve2(itemModel.get('symbol', true), symbolType[isFrom ? 0 : 1]),\n style: style\n });\n }\n this.markKeep(lineDraw);\n lineDraw.group.silent = mlModel.get('silent') || seriesModel.get('silent');\n };\n MarkLineView.type = 'markLine';\n return MarkLineView;\n}(MarkerView);\nfunction createList(coordSys, seriesModel, mlModel) {\n var coordDimsInfos;\n if (coordSys) {\n coordDimsInfos = map(coordSys && coordSys.dimensions, function (coordDim) {\n var info = seriesModel.getData().getDimensionInfo(seriesModel.getData().mapDimension(coordDim)) || {};\n // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n return extend(extend({}, info), {\n name: coordDim,\n // DON'T use ordinalMeta to parse and collect ordinal.\n ordinalMeta: null\n });\n });\n } else {\n coordDimsInfos = [{\n name: 'value',\n type: 'float'\n }];\n }\n var fromData = new SeriesData(coordDimsInfos, mlModel);\n var toData = new SeriesData(coordDimsInfos, mlModel);\n // No dimensions\n var lineData = new SeriesData([], mlModel);\n var optData = map(mlModel.get('data'), curry(markLineTransform, seriesModel, coordSys, mlModel));\n if (coordSys) {\n optData = filter(optData, curry(markLineFilter, coordSys));\n }\n var dimValueGetter = markerHelper.createMarkerDimValueGetter(!!coordSys, coordDimsInfos);\n fromData.initData(map(optData, function (item) {\n return item[0];\n }), null, dimValueGetter);\n toData.initData(map(optData, function (item) {\n return item[1];\n }), null, dimValueGetter);\n lineData.initData(map(optData, function (item) {\n return item[2];\n }));\n lineData.hasItemOption = true;\n return {\n from: fromData,\n to: toData,\n line: lineData\n };\n}\nexport default MarkLineView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport checkMarkerInSeries from './checkMarkerInSeries.js';\nimport MarkLineModel from './MarkLineModel.js';\nimport MarkLineView from './MarkLineView.js';\nexport function install(registers) {\n registers.registerComponentModel(MarkLineModel);\n registers.registerComponentView(MarkLineView);\n registers.registerPreprocessor(function (opt) {\n if (checkMarkerInSeries(opt.series, 'markLine')) {\n // Make sure markLine component is enabled\n opt.markLine = opt.markLine || {};\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MarkerModel from './MarkerModel.js';\nvar MarkAreaModel = /** @class */function (_super) {\n __extends(MarkAreaModel, _super);\n function MarkAreaModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkAreaModel.type;\n return _this;\n }\n MarkAreaModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) {\n return new MarkAreaModel(markerOpt, masterMarkerModel, ecModel);\n };\n MarkAreaModel.type = 'markArea';\n MarkAreaModel.defaultOption = {\n // zlevel: 0,\n // PENDING\n z: 1,\n tooltip: {\n trigger: 'item'\n },\n // markArea should fixed on the coordinate system\n animation: false,\n label: {\n show: true,\n position: 'top'\n },\n itemStyle: {\n // color and borderColor default to use color from series\n // color: 'auto'\n // borderColor: 'auto'\n borderWidth: 0\n },\n emphasis: {\n label: {\n show: true,\n position: 'top'\n }\n }\n };\n return MarkAreaModel;\n}(MarkerModel);\nexport default MarkAreaModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// TODO Optimize on polar\nimport * as colorUtil from 'zrender/lib/tool/color.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport * as numberUtil from '../../util/number.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, setStatesStylesFromModel } from '../../util/states.js';\nimport * as markerHelper from './markerHelper.js';\nimport MarkerView from './MarkerView.js';\nimport { retrieve, mergeAll, map, curry, filter, extend, isString, retrieve2 } from 'zrender/lib/core/util.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport MarkerModel from './MarkerModel.js';\nimport { makeInner } from '../../util/model.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { parseDataValue } from '../../data/helper/dataValueHelper.js';\nimport tokens from '../../visual/tokens.js';\nvar inner = makeInner();\nvar markAreaTransform = function (seriesModel, coordSys, maModel, item) {\n // item may be null\n var item0 = item[0];\n var item1 = item[1];\n if (!item0 || !item1) {\n return;\n }\n var lt = markerHelper.dataTransform(seriesModel, item0);\n var rb = markerHelper.dataTransform(seriesModel, item1);\n // FIXME make sure lt is less than rb\n var ltCoord = lt.coord;\n var rbCoord = rb.coord;\n ltCoord[0] = retrieve(ltCoord[0], -Infinity);\n ltCoord[1] = retrieve(ltCoord[1], -Infinity);\n rbCoord[0] = retrieve(rbCoord[0], Infinity);\n rbCoord[1] = retrieve(rbCoord[1], Infinity);\n // Merge option into one\n var result = mergeAll([{}, lt, rb]);\n result.coord = [lt.coord, rb.coord];\n result.x0 = lt.x;\n result.y0 = lt.y;\n result.x1 = rb.x;\n result.y1 = rb.y;\n return result;\n};\nfunction isInfinity(val) {\n return !isNaN(val) && !isFinite(val);\n}\n// If a markArea has one dim\nfunction ifMarkAreaHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) {\n var otherDimIndex = 1 - dimIndex;\n return isInfinity(fromCoord[otherDimIndex]) && isInfinity(toCoord[otherDimIndex]);\n}\nfunction markAreaFilter(coordSys, item) {\n var fromCoord = item.coord[0];\n var toCoord = item.coord[1];\n var item0 = {\n coord: fromCoord,\n x: item.x0,\n y: item.y0\n };\n var item1 = {\n coord: toCoord,\n x: item.x1,\n y: item.y1\n };\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n // In case\n // {\n // markArea: {\n // data: [{ yAxis: 2 }]\n // }\n // }\n if (fromCoord && toCoord && (ifMarkAreaHasOnlyDim(1, fromCoord, toCoord, coordSys) || ifMarkAreaHasOnlyDim(0, fromCoord, toCoord, coordSys))) {\n return true;\n }\n // Directly returning true may also do the work,\n // because markArea will not be shown automatically\n // when it's not included in coordinate system.\n // But filtering ahead can avoid keeping rendering markArea\n // when there are too many of them.\n return markerHelper.zoneFilter(coordSys, item0, item1);\n }\n return markerHelper.dataFilter(coordSys, item0) || markerHelper.dataFilter(coordSys, item1);\n}\n// dims can be ['x0', 'y0'], ['x1', 'y1'], ['x0', 'y1'], ['x1', 'y0']\nfunction getSingleMarkerEndPoint(data, idx, dims, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var itemModel = data.getItemModel(idx);\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get(dims[0]), api.getWidth());\n var yPx = numberUtil.parsePercent(itemModel.get(dims[1]), api.getHeight());\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n } else {\n // Chart like bar may have there own marker positioning logic\n if (seriesModel.getMarkerPosition) {\n // Consider the case that user input the right-bottom point first\n // Pick the larger x and y as 'x1' and 'y1'\n var pointValue0 = data.getValues(['x0', 'y0'], idx);\n var pointValue1 = data.getValues(['x1', 'y1'], idx);\n var clampPointValue0 = coordSys.clampData(pointValue0);\n var clampPointValue1 = coordSys.clampData(pointValue1);\n var pointValue = [];\n if (dims[0] === 'x0') {\n pointValue[0] = clampPointValue0[0] > clampPointValue1[0] ? pointValue1[0] : pointValue0[0];\n } else {\n pointValue[0] = clampPointValue0[0] > clampPointValue1[0] ? pointValue0[0] : pointValue1[0];\n }\n if (dims[1] === 'y0') {\n pointValue[1] = clampPointValue0[1] > clampPointValue1[1] ? pointValue1[1] : pointValue0[1];\n } else {\n pointValue[1] = clampPointValue0[1] > clampPointValue1[1] ? pointValue0[1] : pointValue1[1];\n }\n // Use the getMarkerPosition\n point = seriesModel.getMarkerPosition(pointValue, dims, true);\n } else {\n var x = data.get(dims[0], idx);\n var y = data.get(dims[1], idx);\n var pt = [x, y];\n coordSys.clampData && coordSys.clampData(pt, pt);\n point = coordSys.dataToPoint(pt, true);\n }\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n // TODO: TYPE ts@4.1 may still infer it as Axis instead of Axis2D. Not sure if it's a bug\n var xAxis = coordSys.getAxis('x');\n var yAxis = coordSys.getAxis('y');\n var x = data.get(dims[0], idx);\n var y = data.get(dims[1], idx);\n if (isInfinity(x)) {\n point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[dims[0] === 'x0' ? 0 : 1]);\n } else if (isInfinity(y)) {\n point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[dims[1] === 'y0' ? 0 : 1]);\n }\n }\n // Use x, y if has any\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n }\n return point;\n}\nexport var dimPermutations = [['x0', 'y0'], ['x1', 'y0'], ['x1', 'y1'], ['x0', 'y1']];\nvar MarkAreaView = /** @class */function (_super) {\n __extends(MarkAreaView, _super);\n function MarkAreaView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkAreaView.type;\n return _this;\n }\n MarkAreaView.prototype.updateTransform = function (markAreaModel, ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n var maModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markArea');\n if (maModel) {\n var areaData_1 = maModel.getData();\n areaData_1.each(function (idx) {\n var points = map(dimPermutations, function (dim) {\n return getSingleMarkerEndPoint(areaData_1, idx, dim, seriesModel, api);\n });\n // Layout\n areaData_1.setItemLayout(idx, points);\n var el = areaData_1.getItemGraphicEl(idx);\n el.setShape('points', points);\n });\n }\n }, this);\n };\n MarkAreaView.prototype.renderSeries = function (seriesModel, maModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n var areaGroupMap = this.markerGroupMap;\n var polygonGroup = areaGroupMap.get(seriesId) || areaGroupMap.set(seriesId, {\n group: new graphic.Group()\n });\n this.group.add(polygonGroup.group);\n this.markKeep(polygonGroup);\n var areaData = createList(coordSys, seriesModel, maModel);\n // Line data for tooltip and formatter\n maModel.setData(areaData);\n // Update visual and layout of line\n areaData.each(function (idx) {\n // Layout\n var points = map(dimPermutations, function (dim) {\n return getSingleMarkerEndPoint(areaData, idx, dim, seriesModel, api);\n });\n var xAxisScale = coordSys.getAxis('x').scale;\n var yAxisScale = coordSys.getAxis('y').scale;\n var xAxisExtent = xAxisScale.getExtent();\n var yAxisExtent = yAxisScale.getExtent();\n var xPointExtent = [xAxisScale.parse(areaData.get('x0', idx)), xAxisScale.parse(areaData.get('x1', idx))];\n var yPointExtent = [yAxisScale.parse(areaData.get('y0', idx)), yAxisScale.parse(areaData.get('y1', idx))];\n numberUtil.asc(xPointExtent);\n numberUtil.asc(yPointExtent);\n var overlapped = !(xAxisExtent[0] > xPointExtent[1] || xAxisExtent[1] < xPointExtent[0] || yAxisExtent[0] > yPointExtent[1] || yAxisExtent[1] < yPointExtent[0]);\n // If none of the area is inside coordSys, allClipped is set to be true\n // in layout so that label will not be displayed. See #12591\n var allClipped = !overlapped;\n areaData.setItemLayout(idx, {\n points: points,\n allClipped: allClipped\n });\n var itemModel = areaData.getItemModel(idx);\n var style = itemModel.getModel('itemStyle').getItemStyle();\n var z2 = itemModel.get('z2');\n var color = getVisualFromData(seriesData, 'color');\n if (!style.fill) {\n style.fill = color;\n if (isString(style.fill)) {\n style.fill = colorUtil.modifyAlpha(style.fill, 0.4);\n }\n }\n if (!style.stroke) {\n style.stroke = color;\n }\n // Visual\n areaData.setItemVisual(idx, 'style', style);\n areaData.setItemVisual(idx, 'z2', retrieve2(z2, 0));\n });\n areaData.diff(inner(polygonGroup).data).add(function (idx) {\n var layout = areaData.getItemLayout(idx);\n var z2 = areaData.getItemVisual(idx, 'z2');\n if (!layout.allClipped) {\n var polygon = new graphic.Polygon({\n z2: retrieve2(z2, 0),\n shape: {\n points: layout.points\n }\n });\n areaData.setItemGraphicEl(idx, polygon);\n polygonGroup.group.add(polygon);\n }\n }).update(function (newIdx, oldIdx) {\n var polygon = inner(polygonGroup).data.getItemGraphicEl(oldIdx);\n var layout = areaData.getItemLayout(newIdx);\n var z2 = areaData.getItemVisual(newIdx, 'z2');\n if (!layout.allClipped) {\n if (polygon) {\n graphic.updateProps(polygon, {\n z2: retrieve2(z2, 0),\n shape: {\n points: layout.points\n }\n }, maModel, newIdx);\n } else {\n polygon = new graphic.Polygon({\n shape: {\n points: layout.points\n }\n });\n }\n areaData.setItemGraphicEl(newIdx, polygon);\n polygonGroup.group.add(polygon);\n } else if (polygon) {\n polygonGroup.group.remove(polygon);\n }\n }).remove(function (idx) {\n var polygon = inner(polygonGroup).data.getItemGraphicEl(idx);\n polygonGroup.group.remove(polygon);\n }).execute();\n areaData.eachItemGraphicEl(function (polygon, idx) {\n var itemModel = areaData.getItemModel(idx);\n var style = areaData.getItemVisual(idx, 'style');\n polygon.useStyle(areaData.getItemVisual(idx, 'style'));\n setLabelStyle(polygon, getLabelStatesModels(itemModel), {\n labelFetcher: maModel,\n labelDataIndex: idx,\n defaultText: areaData.getName(idx) || '',\n inheritColor: isString(style.fill) ? colorUtil.modifyAlpha(style.fill, 1) : tokens.color.neutral99\n });\n setStatesStylesFromModel(polygon, itemModel);\n toggleHoverEmphasis(polygon, null, null, itemModel.get(['emphasis', 'disabled']));\n getECData(polygon).dataModel = maModel;\n });\n inner(polygonGroup).data = areaData;\n polygonGroup.group.silent = maModel.get('silent') || seriesModel.get('silent');\n };\n MarkAreaView.type = 'markArea';\n return MarkAreaView;\n}(MarkerView);\nfunction createList(coordSys, seriesModel, maModel) {\n var areaData;\n var dataDims;\n var dims = ['x0', 'y0', 'x1', 'y1'];\n if (coordSys) {\n var coordDimsInfos_1 = map(coordSys && coordSys.dimensions, function (coordDim) {\n var data = seriesModel.getData();\n var info = data.getDimensionInfo(data.mapDimension(coordDim)) || {};\n // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n return extend(extend({}, info), {\n name: coordDim,\n // DON'T use ordinalMeta to parse and collect ordinal.\n ordinalMeta: null\n });\n });\n dataDims = map(dims, function (dim, idx) {\n return {\n name: dim,\n type: coordDimsInfos_1[idx % 2].type\n };\n });\n areaData = new SeriesData(dataDims, maModel);\n } else {\n dataDims = [{\n name: 'value',\n type: 'float'\n }];\n areaData = new SeriesData(dataDims, maModel);\n }\n var optData = map(maModel.get('data'), curry(markAreaTransform, seriesModel, coordSys, maModel));\n if (coordSys) {\n optData = filter(optData, curry(markAreaFilter, coordSys));\n }\n var dimValueGetter = coordSys ? function (item, dimName, dataIndex, dimIndex) {\n // TODO should convert to ParsedValue?\n var rawVal = item.coord[Math.floor(dimIndex / 2)][dimIndex % 2];\n return parseDataValue(rawVal, dataDims[dimIndex]);\n } : function (item, dimName, dataIndex, dimIndex) {\n return parseDataValue(item.value, dataDims[dimIndex]);\n };\n areaData.initData(optData, null, dimValueGetter);\n areaData.hasItemOption = true;\n return areaData;\n}\nexport default MarkAreaView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport checkMarkerInSeries from './checkMarkerInSeries.js';\nimport MarkAreaModel from './MarkAreaModel.js';\nimport MarkAreaView from './MarkAreaView.js';\nexport function install(registers) {\n registers.registerComponentModel(MarkAreaModel);\n registers.registerComponentView(MarkAreaView);\n registers.registerPreprocessor(function (opt) {\n if (checkMarkerInSeries(opt.series, 'markArea')) {\n // Make sure markArea component is enabled\n opt.markArea = opt.markArea || {};\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Model from '../../model/Model.js';\nimport { isNameSpecified } from '../../util/model.js';\nimport ComponentModel from '../../model/Component.js';\nimport tokens from '../../visual/tokens.js';\nvar getDefaultSelectorOptions = function (ecModel, type) {\n if (type === 'all') {\n return {\n type: 'all',\n title: ecModel.getLocaleModel().get(['legend', 'selector', 'all'])\n };\n } else if (type === 'inverse') {\n return {\n type: 'inverse',\n title: ecModel.getLocaleModel().get(['legend', 'selector', 'inverse'])\n };\n }\n};\nvar LegendModel = /** @class */function (_super) {\n __extends(LegendModel, _super);\n function LegendModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LegendModel.type;\n _this.layoutMode = {\n type: 'box',\n // legend.width/height are maxWidth/maxHeight actually,\n // whereas real width/height is calculated by its content.\n // (Setting {left: 10, right: 10} does not make sense).\n // So consider the case:\n // `setOption({legend: {left: 10});`\n // then `setOption({legend: {right: 10});`\n // The previous `left` should be cleared by setting `ignoreSize`.\n ignoreSize: true\n };\n return _this;\n }\n LegendModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n option.selected = option.selected || {};\n this._updateSelector(option);\n };\n LegendModel.prototype.mergeOption = function (option, ecModel) {\n _super.prototype.mergeOption.call(this, option, ecModel);\n this._updateSelector(option);\n };\n LegendModel.prototype._updateSelector = function (option) {\n var selector = option.selector;\n var ecModel = this.ecModel;\n if (selector === true) {\n selector = option.selector = ['all', 'inverse'];\n }\n if (zrUtil.isArray(selector)) {\n zrUtil.each(selector, function (item, index) {\n zrUtil.isString(item) && (item = {\n type: item\n });\n selector[index] = zrUtil.merge(item, getDefaultSelectorOptions(ecModel, item.type));\n });\n }\n };\n LegendModel.prototype.optionUpdated = function () {\n this._updateData(this.ecModel);\n var legendData = this._data;\n // If selectedMode is single, try to select one\n if (legendData[0] && this.get('selectedMode') === 'single') {\n var hasSelected = false;\n // If has any selected in option.selected\n for (var i = 0; i < legendData.length; i++) {\n var name_1 = legendData[i].get('name');\n if (this.isSelected(name_1)) {\n // Force to unselect others\n this.select(name_1);\n hasSelected = true;\n break;\n }\n }\n // Try select the first if selectedMode is single\n !hasSelected && this.select(legendData[0].get('name'));\n }\n };\n LegendModel.prototype._updateData = function (ecModel) {\n var potentialData = [];\n var availableNames = [];\n ecModel.eachRawSeries(function (seriesModel) {\n var seriesName = seriesModel.name;\n availableNames.push(seriesName);\n var isPotential;\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n var names = provider.getAllNames();\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n availableNames = availableNames.concat(names);\n }\n if (names.length) {\n potentialData = potentialData.concat(names);\n } else {\n isPotential = true;\n }\n } else {\n isPotential = true;\n }\n if (isPotential && isNameSpecified(seriesModel)) {\n potentialData.push(seriesModel.name);\n }\n });\n /**\n * @type {Array.<string>}\n * @private\n */\n this._availableNames = availableNames;\n // If legend.data is not specified in option, use availableNames as data,\n // which is convenient for user preparing option.\n var rawData = this.get('data') || potentialData;\n var legendNameMap = zrUtil.createHashMap();\n var legendData = zrUtil.map(rawData, function (dataItem) {\n // Can be string or number\n if (zrUtil.isString(dataItem) || zrUtil.isNumber(dataItem)) {\n dataItem = {\n name: dataItem\n };\n }\n if (legendNameMap.get(dataItem.name)) {\n // remove legend name duplicate\n return null;\n }\n legendNameMap.set(dataItem.name, true);\n return new Model(dataItem, this, this.ecModel);\n }, this);\n /**\n * @type {Array.<module:echarts/model/Model>}\n * @private\n */\n this._data = zrUtil.filter(legendData, function (item) {\n return !!item;\n });\n };\n LegendModel.prototype.getData = function () {\n return this._data;\n };\n LegendModel.prototype.select = function (name) {\n var selected = this.option.selected;\n var selectedMode = this.get('selectedMode');\n if (selectedMode === 'single') {\n var data = this._data;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name')] = false;\n });\n }\n selected[name] = true;\n };\n LegendModel.prototype.unSelect = function (name) {\n if (this.get('selectedMode') !== 'single') {\n this.option.selected[name] = false;\n }\n };\n LegendModel.prototype.toggleSelected = function (name) {\n var selected = this.option.selected;\n // Default is true\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n this[selected[name] ? 'unSelect' : 'select'](name);\n };\n LegendModel.prototype.allSelect = function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name', true)] = true;\n });\n };\n LegendModel.prototype.inverseSelect = function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n var name = dataItem.get('name', true);\n // Initially, default value is true\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n selected[name] = !selected[name];\n });\n };\n LegendModel.prototype.isSelected = function (name) {\n var selected = this.option.selected;\n return !(selected.hasOwnProperty(name) && !selected[name]) && zrUtil.indexOf(this._availableNames, name) >= 0;\n };\n LegendModel.prototype.getOrient = function () {\n return this.get('orient') === 'vertical' ? {\n index: 1,\n name: 'vertical'\n } : {\n index: 0,\n name: 'horizontal'\n };\n };\n LegendModel.type = 'legend.plain';\n LegendModel.dependencies = ['series'];\n LegendModel.defaultOption = {\n // zlevel: 0,\n z: 4,\n show: true,\n orient: 'horizontal',\n left: 'center',\n // right: 'center',\n // top: 0,\n bottom: tokens.size.m,\n align: 'auto',\n backgroundColor: tokens.color.transparent,\n borderColor: tokens.color.border,\n borderRadius: 0,\n borderWidth: 0,\n padding: 5,\n itemGap: 8,\n itemWidth: 25,\n itemHeight: 14,\n symbolRotate: 'inherit',\n symbolKeepAspect: true,\n inactiveColor: tokens.color.disabled,\n inactiveBorderColor: tokens.color.disabled,\n inactiveBorderWidth: 'auto',\n itemStyle: {\n color: 'inherit',\n opacity: 'inherit',\n borderColor: 'inherit',\n borderWidth: 'auto',\n borderCap: 'inherit',\n borderJoin: 'inherit',\n borderDashOffset: 'inherit',\n borderMiterLimit: 'inherit'\n },\n lineStyle: {\n width: 'auto',\n color: 'inherit',\n inactiveColor: tokens.color.disabled,\n inactiveWidth: 2,\n opacity: 'inherit',\n type: 'inherit',\n cap: 'inherit',\n join: 'inherit',\n dashOffset: 'inherit',\n miterLimit: 'inherit'\n },\n textStyle: {\n color: tokens.color.secondary\n },\n selectedMode: true,\n selector: false,\n selectorLabel: {\n show: true,\n borderRadius: 10,\n padding: [3, 5, 3, 5],\n fontSize: 12,\n fontFamily: 'sans-serif',\n color: tokens.color.tertiary,\n borderWidth: 1,\n borderColor: tokens.color.border\n },\n emphasis: {\n selectorLabel: {\n show: true,\n color: tokens.color.quaternary\n }\n },\n selectorPosition: 'auto',\n selectorItemGap: 7,\n selectorButtonGap: 10,\n tooltip: {\n show: false\n },\n triggerEvent: false\n };\n return LegendModel;\n}(ComponentModel);\nexport default LegendModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parse, stringify } from 'zrender/lib/tool/color.js';\nimport * as graphic from '../../util/graphic.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, createTextStyle } from '../../label/labelStyle.js';\nimport { makeBackground } from '../helper/listComponent.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport ComponentView from '../../view/Component.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { getECData } from '../../util/innerStore.js';\nimport tokens from '../../visual/tokens.js';\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar Group = graphic.Group;\nvar LegendView = /** @class */function (_super) {\n __extends(LegendView, _super);\n function LegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LegendView.type;\n _this.newlineDisabled = false;\n return _this;\n }\n LegendView.prototype.init = function () {\n this.group.add(this._contentGroup = new Group());\n this.group.add(this._selectorGroup = new Group());\n this._isFirstRender = true;\n };\n /**\n * @protected\n */\n LegendView.prototype.getContentGroup = function () {\n return this._contentGroup;\n };\n /**\n * @protected\n */\n LegendView.prototype.getSelectorGroup = function () {\n return this._selectorGroup;\n };\n /**\n * @override\n */\n LegendView.prototype.render = function (legendModel, ecModel, api) {\n var isFirstRender = this._isFirstRender;\n this._isFirstRender = false;\n this.resetInner();\n if (!legendModel.get('show', true)) {\n return;\n }\n var itemAlign = legendModel.get('align');\n var orient = legendModel.get('orient');\n if (!itemAlign || itemAlign === 'auto') {\n itemAlign = legendModel.get('left') === 'right' && orient === 'vertical' ? 'right' : 'left';\n }\n // selector has been normalized to an array in model\n var selector = legendModel.get('selector', true);\n var selectorPosition = legendModel.get('selectorPosition', true);\n if (selector && (!selectorPosition || selectorPosition === 'auto')) {\n selectorPosition = orient === 'horizontal' ? 'end' : 'start';\n }\n this.renderInner(itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n // Perform layout.\n var refContainer = layoutUtil.createBoxLayoutReference(legendModel, api).refContainer;\n var positionInfo = legendModel.getBoxLayoutParams();\n var padding = legendModel.get('padding');\n var maxSize = layoutUtil.getLayoutRect(positionInfo, refContainer, padding);\n var mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition);\n // Place mainGroup, based on the calculated `mainRect`.\n var layoutRect = layoutUtil.getLayoutRect(zrUtil.defaults({\n width: mainRect.width,\n height: mainRect.height\n }, positionInfo), refContainer, padding);\n this.group.x = layoutRect.x - mainRect.x;\n this.group.y = layoutRect.y - mainRect.y;\n this.group.markRedraw();\n // Render background after group is layout.\n this.group.add(this._backgroundEl = makeBackground(mainRect,\n // FXIME: most itemStyle options does not work in background because inherit is not handled yet.\n legendModel));\n };\n LegendView.prototype.resetInner = function () {\n this.getContentGroup().removeAll();\n this._backgroundEl && this.group.remove(this._backgroundEl);\n this.getSelectorGroup().removeAll();\n };\n LegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var legendDrawnMap = zrUtil.createHashMap();\n var selectMode = legendModel.get('selectedMode');\n var triggerEvent = legendModel.get('triggerEvent');\n var excludeSeriesId = [];\n ecModel.eachRawSeries(function (seriesModel) {\n !seriesModel.get('legendHoverLink') && excludeSeriesId.push(seriesModel.id);\n });\n each(legendModel.getData(), function (legendItemModel, dataIndex) {\n var _this = this;\n var name = legendItemModel.get('name');\n // Use empty string or \\n as a newline string\n if (!this.newlineDisabled && (name === '' || name === '\\n')) {\n var g = new Group();\n // @ts-ignore\n g.newline = true;\n contentGroup.add(g);\n return;\n }\n // Representitive series.\n var seriesModel = ecModel.getSeriesByName(name)[0];\n if (legendDrawnMap.get(name)) {\n // Have been drawn\n return;\n }\n // Legend to control series.\n if (seriesModel) {\n var data = seriesModel.getData();\n var lineVisualStyle = data.getVisual('legendLineStyle') || {};\n var legendIcon = data.getVisual('legendIcon');\n /**\n * `data.getVisual('style')` may be the color from the register\n * in series. For example, for line series,\n */\n var style = data.getVisual('style');\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, style, legendIcon, selectMode, api);\n itemGroup.on('click', curry(dispatchSelectAction, name, null, api, excludeSeriesId)).on('mouseover', curry(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n if (triggerEvent) {\n itemGroup.eachChild(function (child) {\n _this.packEventData(child, legendModel, seriesModel, dataIndex, name);\n });\n }\n legendDrawnMap.set(name, true);\n } else {\n // Legend to control data. In pie and funnel.\n ecModel.eachRawSeries(function (seriesModel) {\n var _this = this;\n // In case multiple series has same data name\n if (legendDrawnMap.get(name)) {\n return;\n }\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n if (!provider.containName(name)) {\n return;\n }\n var idx = provider.indexOfName(name);\n var style = provider.getItemVisual(idx, 'style');\n var legendIcon = provider.getItemVisual(idx, 'legendIcon');\n var colorArr = parse(style.fill);\n // Color may be set to transparent in visualMap when data is out of range.\n // Do not show nothing.\n if (colorArr && colorArr[3] === 0) {\n colorArr[3] = 0.2;\n // TODO color is set to 0, 0, 0, 0. Should show correct RGBA\n style = zrUtil.extend(zrUtil.extend({}, style), {\n fill: stringify(colorArr, 'rgba')\n });\n }\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, {}, style, legendIcon, selectMode, api);\n // FIXME: consider different series has items with the same name.\n itemGroup.on('click', curry(dispatchSelectAction, null, name, api, excludeSeriesId))\n // Should not specify the series name, consider legend controls\n // more than one pie series.\n .on('mouseover', curry(dispatchHighlightAction, null, name, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, null, name, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n if (triggerEvent) {\n itemGroup.eachChild(function (child) {\n _this.packEventData(child, legendModel, seriesModel, dataIndex, name);\n });\n }\n legendDrawnMap.set(name, true);\n }\n }, this);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!legendDrawnMap.get(name)) {\n console.warn(name + ' series not exists. Legend data should be same with series name or data name.');\n }\n }\n }, this);\n if (selector) {\n this._createSelector(selector, legendModel, api, orient, selectorPosition);\n }\n };\n LegendView.prototype.packEventData = function (el, legendModel, seriesModel, dataIndex, name) {\n var eventData = {\n componentType: 'legend',\n componentIndex: legendModel.componentIndex,\n dataIndex: dataIndex,\n value: name,\n seriesIndex: seriesModel.seriesIndex\n };\n getECData(el).eventData = eventData;\n };\n ;\n LegendView.prototype._createSelector = function (selector, legendModel, api, orient, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n each(selector, function createSelectorButton(selectorItem) {\n var type = selectorItem.type;\n var labelText = new graphic.Text({\n style: {\n x: 0,\n y: 0,\n align: 'center',\n verticalAlign: 'middle'\n },\n onclick: function () {\n api.dispatchAction({\n type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect',\n legendId: legendModel.id\n });\n }\n });\n selectorGroup.add(labelText);\n var labelModel = legendModel.getModel('selectorLabel');\n var emphasisLabelModel = legendModel.getModel(['emphasis', 'selectorLabel']);\n setLabelStyle(labelText, {\n normal: labelModel,\n emphasis: emphasisLabelModel\n }, {\n defaultText: selectorItem.title\n });\n enableHoverEmphasis(labelText);\n });\n };\n LegendView.prototype._createItem = function (seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, itemVisualStyle, legendIcon, selectMode, api) {\n var drawType = seriesModel.visualDrawType;\n var itemWidth = legendModel.get('itemWidth');\n var itemHeight = legendModel.get('itemHeight');\n var isSelected = legendModel.isSelected(name);\n var iconRotate = legendItemModel.get('symbolRotate');\n var symbolKeepAspect = legendItemModel.get('symbolKeepAspect');\n var legendIconType = legendItemModel.get('icon');\n legendIcon = legendIconType || legendIcon || 'roundRect';\n var style = getLegendStyle(legendIcon, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api);\n var itemGroup = new Group();\n var textStyleModel = legendItemModel.getModel('textStyle');\n if (zrUtil.isFunction(seriesModel.getLegendIcon) && (!legendIconType || legendIconType === 'inherit')) {\n // Series has specific way to define legend icon\n itemGroup.add(seriesModel.getLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: iconRotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n } else {\n // Use default legend icon policy for most series\n var rotate = legendIconType === 'inherit' && seriesModel.getData().getVisual('symbol') ? iconRotate === 'inherit' ? seriesModel.getData().getVisual('symbolRotate') : iconRotate : 0; // No rotation for no icon\n itemGroup.add(getDefaultLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: rotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n }\n var textX = itemAlign === 'left' ? itemWidth + 5 : -5;\n var textAlign = itemAlign;\n var formatter = legendModel.get('formatter');\n var content = name;\n if (zrUtil.isString(formatter) && formatter) {\n content = formatter.replace('{name}', name != null ? name : '');\n } else if (zrUtil.isFunction(formatter)) {\n content = formatter(name);\n }\n var textColor = isSelected ? textStyleModel.getTextColor() : legendItemModel.get('inactiveColor');\n itemGroup.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: content,\n x: textX,\n y: itemHeight / 2,\n fill: textColor,\n align: textAlign,\n verticalAlign: 'middle'\n }, {\n inheritColor: textColor\n })\n }));\n // Add a invisible rect to increase the area of mouse hover\n var hitRect = new graphic.Rect({\n shape: itemGroup.getBoundingRect(),\n style: {\n // Cannot use 'invisible' because SVG SSR will miss the node\n fill: 'transparent'\n }\n });\n var tooltipModel = legendItemModel.getModel('tooltip');\n if (tooltipModel.get('show')) {\n graphic.setTooltipConfig({\n el: hitRect,\n componentModel: legendModel,\n itemName: name,\n itemTooltipOption: tooltipModel.option\n });\n }\n itemGroup.add(hitRect);\n itemGroup.eachChild(function (child) {\n child.silent = true;\n });\n hitRect.silent = !selectMode;\n this.getContentGroup().add(itemGroup);\n enableHoverEmphasis(itemGroup);\n // @ts-ignore\n itemGroup.__legendDataIndex = dataIndex;\n return itemGroup;\n };\n LegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var selectorGroup = this.getSelectorGroup();\n // Place items in contentGroup.\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), maxSize.width, maxSize.height);\n var contentRect = contentGroup.getBoundingRect();\n var contentPos = [-contentRect.x, -contentRect.y];\n selectorGroup.markRedraw();\n contentGroup.markRedraw();\n if (selector) {\n // Place buttons in selectorGroup\n layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var orientIdx = legendModel.getOrient().index;\n var wh = orientIdx === 0 ? 'width' : 'height';\n var hw = orientIdx === 0 ? 'height' : 'width';\n var yx = orientIdx === 0 ? 'y' : 'x';\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += contentRect[wh] + selectorButtonGap;\n } else {\n contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap;\n }\n // Always align selector to content as 'middle'\n selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2;\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n var mainRect = {\n x: 0,\n y: 0\n };\n mainRect[wh] = contentRect[wh] + selectorButtonGap + selectorRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(0, selectorRect[yx] + selectorPos[1 - orientIdx]);\n return mainRect;\n } else {\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n return this.group.getBoundingRect();\n }\n };\n /**\n * @protected\n */\n LegendView.prototype.remove = function () {\n this.getContentGroup().removeAll();\n this._isFirstRender = true;\n };\n LegendView.type = 'legend.plain';\n return LegendView;\n}(ComponentView);\nfunction getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api) {\n /**\n * Use series style if is inherit;\n * elsewise, use legend style\n */\n function handleCommonProps(style, visualStyle) {\n // If lineStyle.width is 'auto', it is set to be 2 if series has border\n if (style.lineWidth === 'auto') {\n style.lineWidth = visualStyle.lineWidth > 0 ? 2 : 0;\n }\n each(style, function (propVal, propName) {\n style[propName] === 'inherit' && (style[propName] = visualStyle[propName]);\n });\n }\n // itemStyle\n var itemStyleModel = legendItemModel.getModel('itemStyle');\n var itemStyle = itemStyleModel.getItemStyle();\n var iconBrushType = iconType.lastIndexOf('empty', 0) === 0 ? 'fill' : 'stroke';\n var decalStyle = itemStyleModel.getShallow('decal');\n itemStyle.decal = !decalStyle || decalStyle === 'inherit' ? itemVisualStyle.decal : createOrUpdatePatternFromDecal(decalStyle, api);\n if (itemStyle.fill === 'inherit') {\n /**\n * Series with visualDrawType as 'stroke' should have\n * series stroke as legend fill\n */\n itemStyle.fill = itemVisualStyle[drawType];\n }\n if (itemStyle.stroke === 'inherit') {\n /**\n * icon type with \"emptyXXX\" should use fill color\n * in visual style\n */\n itemStyle.stroke = itemVisualStyle[iconBrushType];\n }\n if (itemStyle.opacity === 'inherit') {\n /**\n * Use lineStyle.opacity if drawType is stroke\n */\n itemStyle.opacity = (drawType === 'fill' ? itemVisualStyle : lineVisualStyle).opacity;\n }\n handleCommonProps(itemStyle, itemVisualStyle);\n // lineStyle\n var legendLineModel = legendItemModel.getModel('lineStyle');\n var lineStyle = legendLineModel.getLineStyle();\n handleCommonProps(lineStyle, lineVisualStyle);\n // Fix auto color to real color\n itemStyle.fill === 'auto' && (itemStyle.fill = itemVisualStyle.fill);\n itemStyle.stroke === 'auto' && (itemStyle.stroke = itemVisualStyle.fill);\n lineStyle.stroke === 'auto' && (lineStyle.stroke = itemVisualStyle.fill);\n if (!isSelected) {\n var borderWidth = legendItemModel.get('inactiveBorderWidth');\n /**\n * Since stroke is set to be inactiveBorderColor, it may occur that\n * there is no border in series but border in legend, so we need to\n * use border only when series has border if is set to be auto\n */\n var visualHasBorder = itemStyle[iconBrushType];\n itemStyle.lineWidth = borderWidth === 'auto' ? itemVisualStyle.lineWidth > 0 && visualHasBorder ? 2 : 0 : itemStyle.lineWidth;\n itemStyle.fill = legendItemModel.get('inactiveColor');\n itemStyle.stroke = legendItemModel.get('inactiveBorderColor');\n lineStyle.stroke = legendLineModel.get('inactiveColor');\n lineStyle.lineWidth = legendLineModel.get('inactiveWidth');\n }\n return {\n itemStyle: itemStyle,\n lineStyle: lineStyle\n };\n}\nfunction getDefaultLegendIcon(opt) {\n var symboType = opt.icon || 'roundRect';\n var icon = createSymbol(symboType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill, opt.symbolKeepAspect);\n icon.setStyle(opt.itemStyle);\n icon.rotation = (opt.iconRotate || 0) * Math.PI / 180;\n icon.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]);\n if (symboType.indexOf('empty') > -1) {\n icon.style.stroke = icon.style.fill;\n icon.style.fill = tokens.color.neutral00;\n icon.style.lineWidth = 2;\n }\n return icon;\n}\nfunction dispatchSelectAction(seriesName, dataName, api, excludeSeriesId) {\n // downplay before unselect\n dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId);\n api.dispatchAction({\n type: 'legendToggleSelect',\n name: seriesName != null ? seriesName : dataName\n });\n // highlight after select\n // TODO highlight immediately may cause animation loss.\n dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId);\n}\nfunction isUseHoverLayer(api) {\n var list = api.getZr().storage.getDisplayList();\n var emphasisState;\n var i = 0;\n var len = list.length;\n while (i < len && !(emphasisState = list[i].states.emphasis)) {\n i++;\n }\n return emphasisState && emphasisState.hoverLayer;\n}\nfunction dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'highlight',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nfunction dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'downplay',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nexport default LegendView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport default function legendFilter(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n if (legendModels && legendModels.length) {\n ecModel.filterSeries(function (series) {\n // If in any legend component the status is not selected.\n // Because in legend series is assumed selected when it is not in the legend data.\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(series.name)) {\n return false;\n }\n }\n return true;\n });\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { curry, each, hasOwn } from 'zrender/lib/core/util.js';\nfunction legendSelectActionHandler(methodName, payload, ecModel) {\n var isAllSelect = methodName === 'allSelect' || methodName === 'inverseSelect';\n var selectedMap = {};\n var actionLegendIndices = [];\n ecModel.eachComponent({\n mainType: 'legend',\n query: payload\n }, function (legendModel) {\n if (isAllSelect) {\n legendModel[methodName]();\n } else {\n legendModel[methodName](payload.name);\n }\n makeSelectedMap(legendModel, selectedMap);\n actionLegendIndices.push(legendModel.componentIndex);\n });\n var allSelectedMap = {};\n // make selectedMap from all legend components\n ecModel.eachComponent('legend', function (legendModel) {\n each(selectedMap, function (isSelected, name) {\n // Force other legend has same selected status\n // Or the first is toggled to true and other are toggled to false\n // In the case one legend has some item unSelected in option. And if other legend\n // doesn't has the item, they will assume it is selected.\n legendModel[isSelected ? 'select' : 'unSelect'](name);\n });\n makeSelectedMap(legendModel, allSelectedMap);\n });\n // Return the event explicitly\n return isAllSelect ? {\n selected: allSelectedMap,\n // return legendIndex array to tell the developers which legends are allSelect / inverseSelect\n legendIndex: actionLegendIndices\n } : {\n name: payload.name,\n selected: allSelectedMap\n };\n}\nfunction makeSelectedMap(legendModel, out) {\n var selectedMap = out || {};\n each(legendModel.getData(), function (model) {\n var name = model.get('name');\n // Wrap element\n if (name === '\\n' || name === '') {\n return;\n }\n var isItemSelected = legendModel.isSelected(name);\n if (hasOwn(selectedMap, name)) {\n // Unselected if any legend is unselected\n selectedMap[name] = selectedMap[name] && isItemSelected;\n } else {\n selectedMap[name] = isItemSelected;\n }\n });\n return selectedMap;\n}\nexport function installLegendAction(registers) {\n /**\n * @event legendToggleSelect\n * @type {Object}\n * @property {string} type 'legendToggleSelect'\n * @property {string} [from]\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendToggleSelect', 'legendselectchanged', curry(legendSelectActionHandler, 'toggleSelected'));\n registers.registerAction('legendAllSelect', 'legendselectall', curry(legendSelectActionHandler, 'allSelect'));\n registers.registerAction('legendInverseSelect', 'legendinverseselect', curry(legendSelectActionHandler, 'inverseSelect'));\n /**\n * @event legendSelect\n * @type {Object}\n * @property {string} type 'legendSelect'\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendSelect', 'legendselected', curry(legendSelectActionHandler, 'select'));\n /**\n * @event legendUnSelect\n * @type {Object}\n * @property {string} type 'legendUnSelect'\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendUnSelect', 'legendunselected', curry(legendSelectActionHandler, 'unSelect'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport LegendModel from './LegendModel.js';\nimport LegendView from './LegendView.js';\nimport legendFilter from './legendFilter.js';\nimport { installLegendAction } from './legendAction.js';\nexport function install(registers) {\n registers.registerComponentModel(LegendModel);\n registers.registerComponentView(LegendView);\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);\n registers.registerSubTypeDefaulter('legend', function () {\n return 'plain';\n });\n installLegendAction(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport LegendModel from './LegendModel.js';\nimport { mergeLayoutParam, getLayoutParams } from '../../util/layout.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nimport tokens from '../../visual/tokens.js';\nvar ScrollableLegendModel = /** @class */function (_super) {\n __extends(ScrollableLegendModel, _super);\n function ScrollableLegendModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScrollableLegendModel.type;\n return _this;\n }\n /**\n * @param {number} scrollDataIndex\n */\n ScrollableLegendModel.prototype.setScrollDataIndex = function (scrollDataIndex) {\n this.option.scrollDataIndex = scrollDataIndex;\n };\n ScrollableLegendModel.prototype.init = function (option, parentModel, ecModel) {\n var inputPositionParams = getLayoutParams(option);\n _super.prototype.init.call(this, option, parentModel, ecModel);\n mergeAndNormalizeLayoutParams(this, option, inputPositionParams);\n };\n /**\n * @override\n */\n ScrollableLegendModel.prototype.mergeOption = function (option, ecModel) {\n _super.prototype.mergeOption.call(this, option, ecModel);\n mergeAndNormalizeLayoutParams(this, this.option, option);\n };\n ScrollableLegendModel.type = 'legend.scroll';\n ScrollableLegendModel.defaultOption = inheritDefaultOption(LegendModel.defaultOption, {\n scrollDataIndex: 0,\n pageButtonItemGap: 5,\n pageButtonGap: null,\n pageButtonPosition: 'end',\n pageFormatter: '{current}/{total}',\n pageIcons: {\n horizontal: ['M0,0L12,-10L12,10z', 'M0,0L-12,-10L-12,10z'],\n vertical: ['M0,0L20,0L10,-20z', 'M0,0L20,0L10,20z']\n },\n pageIconColor: tokens.color.accent50,\n pageIconInactiveColor: tokens.color.accent10,\n pageIconSize: 15,\n pageTextStyle: {\n color: tokens.color.tertiary\n },\n animationDurationUpdate: 800\n });\n return ScrollableLegendModel;\n}(LegendModel);\n;\n// Do not `ignoreSize` to enable setting {left: 10, right: 10}.\nfunction mergeAndNormalizeLayoutParams(legendModel, target, raw) {\n var orient = legendModel.getOrient();\n var ignoreSize = [1, 1];\n ignoreSize[orient.index] = 0;\n mergeLayoutParam(target, raw, {\n type: 'box',\n ignoreSize: !!ignoreSize\n });\n}\nexport default ScrollableLegendModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Separate legend and scrollable legend to reduce package size.\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport LegendView from './LegendView.js';\nvar Group = graphic.Group;\nvar WH = ['width', 'height'];\nvar XY = ['x', 'y'];\nvar ScrollableLegendView = /** @class */function (_super) {\n __extends(ScrollableLegendView, _super);\n function ScrollableLegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScrollableLegendView.type;\n _this.newlineDisabled = true;\n _this._currentIndex = 0;\n return _this;\n }\n ScrollableLegendView.prototype.init = function () {\n _super.prototype.init.call(this);\n this.group.add(this._containerGroup = new Group());\n this._containerGroup.add(this.getContentGroup());\n this.group.add(this._controllerGroup = new Group());\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.resetInner = function () {\n _super.prototype.resetInner.call(this);\n this._controllerGroup.removeAll();\n this._containerGroup.removeClipPath();\n this._containerGroup.__rectSize = null;\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var self = this;\n // Render content items.\n _super.prototype.renderInner.call(this, itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n var controllerGroup = this._controllerGroup;\n // FIXME: support be 'auto' adapt to size number text length,\n // e.g., '3/12345' should not overlap with the control arrow button.\n var pageIconSize = legendModel.get('pageIconSize', true);\n var pageIconSizeArr = zrUtil.isArray(pageIconSize) ? pageIconSize : [pageIconSize, pageIconSize];\n createPageButton('pagePrev', 0);\n var pageTextStyleModel = legendModel.getModel('pageTextStyle');\n controllerGroup.add(new graphic.Text({\n name: 'pageText',\n style: {\n // Placeholder to calculate a proper layout.\n text: 'xx/xx',\n fill: pageTextStyleModel.getTextColor(),\n font: pageTextStyleModel.getFont(),\n verticalAlign: 'middle',\n align: 'center'\n },\n silent: true\n }));\n createPageButton('pageNext', 1);\n function createPageButton(name, iconIdx) {\n var pageDataIndexName = name + 'DataIndex';\n var icon = graphic.createIcon(legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], {\n // Buttons will be created in each render, so we do not need\n // to worry about avoiding using legendModel kept in scope.\n onclick: zrUtil.bind(self._pageGo, self, pageDataIndexName, legendModel, api)\n }, {\n x: -pageIconSizeArr[0] / 2,\n y: -pageIconSizeArr[1] / 2,\n width: pageIconSizeArr[0],\n height: pageIconSizeArr[1]\n });\n icon.name = name;\n controllerGroup.add(icon);\n }\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var hw = WH[1 - orientIdx];\n var yx = XY[1 - orientIdx];\n selector && layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var processMaxSize = zrUtil.clone(maxSize);\n selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap);\n var mainRect = this._layoutContentAndController(legendModel, isFirstRender, processMaxSize, orientIdx, wh, hw, yx, xy);\n if (selector) {\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap;\n } else {\n var offset = selectorRect[wh] + selectorButtonGap;\n selectorPos[orientIdx] -= offset;\n mainRect[xy] -= offset;\n }\n mainRect[wh] += selectorRect[wh] + selectorButtonGap;\n selectorPos[1 - orientIdx] += mainRect[yx] + mainRect[hw] / 2 - selectorRect[hw] / 2;\n mainRect[hw] = Math.max(mainRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(mainRect[yx], selectorRect[yx] + selectorPos[1 - orientIdx]);\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n selectorGroup.markRedraw();\n }\n return mainRect;\n };\n ScrollableLegendView.prototype._layoutContentAndController = function (legendModel, isFirstRender, maxSize, orientIdx, wh, hw, yx, xy) {\n var contentGroup = this.getContentGroup();\n var containerGroup = this._containerGroup;\n var controllerGroup = this._controllerGroup;\n // Place items in contentGroup.\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), !orientIdx ? null : maxSize.width, orientIdx ? null : maxSize.height);\n layoutUtil.box(\n // Buttons in controller are layout always horizontally.\n 'horizontal', controllerGroup, legendModel.get('pageButtonItemGap', true));\n var contentRect = contentGroup.getBoundingRect();\n var controllerRect = controllerGroup.getBoundingRect();\n var showController = this._showController = contentRect[wh] > maxSize[wh];\n // In case that the inner elements of contentGroup layout do not based on [0, 0]\n var contentPos = [-contentRect.x, -contentRect.y];\n // Remain contentPos when scroll animation perfroming.\n // If first rendering, `contentGroup.position` is [0, 0], which\n // does not make sense and may cause unexepcted animation if adopted.\n if (!isFirstRender) {\n contentPos[orientIdx] = contentGroup[xy];\n }\n // Layout container group based on 0.\n var containerPos = [0, 0];\n var controllerPos = [-controllerRect.x, -controllerRect.y];\n var pageButtonGap = zrUtil.retrieve2(legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true));\n // Place containerGroup and controllerGroup and contentGroup.\n if (showController) {\n var pageButtonPosition = legendModel.get('pageButtonPosition', true);\n // controller is on the right / bottom.\n if (pageButtonPosition === 'end') {\n controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh];\n }\n // controller is on the left / top.\n else {\n containerPos[orientIdx] += controllerRect[wh] + pageButtonGap;\n }\n }\n // Always align controller to content as 'middle'.\n controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2;\n contentGroup.setPosition(contentPos);\n containerGroup.setPosition(containerPos);\n controllerGroup.setPosition(controllerPos);\n // Calculate `mainRect` and set `clipPath`.\n // mainRect should not be calculated by `this.group.getBoundingRect()`\n // for sake of the overflow.\n var mainRect = {\n x: 0,\n y: 0\n };\n // Consider content may be overflow (should be clipped).\n mainRect[wh] = showController ? maxSize[wh] : contentRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]);\n // `containerRect[yx] + containerPos[1 - orientIdx]` is 0.\n mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]);\n containerGroup.__rectSize = maxSize[wh];\n if (showController) {\n var clipShape = {\n x: 0,\n y: 0\n };\n clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0);\n clipShape[hw] = mainRect[hw];\n containerGroup.setClipPath(new graphic.Rect({\n shape: clipShape\n }));\n // Consider content may be larger than container, container rect\n // can not be obtained from `containerGroup.getBoundingRect()`.\n containerGroup.__rectSize = clipShape[wh];\n } else {\n // Do not remove or ignore controller. Keep them set as placeholders.\n controllerGroup.eachChild(function (child) {\n child.attr({\n invisible: true,\n silent: true\n });\n });\n }\n // Content translate animation.\n var pageInfo = this._getPageInfo(legendModel);\n pageInfo.pageIndex != null && graphic.updateProps(contentGroup, {\n x: pageInfo.contentPosition[0],\n y: pageInfo.contentPosition[1]\n },\n // When switch from \"show controller\" to \"not show controller\", view should be\n // updated immediately without animation, otherwise causes weird effect.\n showController ? legendModel : null);\n this._updatePageInfoView(legendModel, pageInfo);\n return mainRect;\n };\n ScrollableLegendView.prototype._pageGo = function (to, legendModel, api) {\n var scrollDataIndex = this._getPageInfo(legendModel)[to];\n scrollDataIndex != null && api.dispatchAction({\n type: 'legendScroll',\n scrollDataIndex: scrollDataIndex,\n legendId: legendModel.id\n });\n };\n ScrollableLegendView.prototype._updatePageInfoView = function (legendModel, pageInfo) {\n var controllerGroup = this._controllerGroup;\n zrUtil.each(['pagePrev', 'pageNext'], function (name) {\n var key = name + 'DataIndex';\n var canJump = pageInfo[key] != null;\n var icon = controllerGroup.childOfName(name);\n if (icon) {\n icon.setStyle('fill', canJump ? legendModel.get('pageIconColor', true) : legendModel.get('pageIconInactiveColor', true));\n icon.cursor = canJump ? 'pointer' : 'default';\n }\n });\n var pageText = controllerGroup.childOfName('pageText');\n var pageFormatter = legendModel.get('pageFormatter');\n var pageIndex = pageInfo.pageIndex;\n var current = pageIndex != null ? pageIndex + 1 : 0;\n var total = pageInfo.pageCount;\n pageText && pageFormatter && pageText.setStyle('text', zrUtil.isString(pageFormatter) ? pageFormatter.replace('{current}', current == null ? '' : current + '').replace('{total}', total == null ? '' : total + '') : pageFormatter({\n current: current,\n total: total\n }));\n };\n /**\n * contentPosition: Array.<number>, null when data item not found.\n * pageIndex: number, null when data item not found.\n * pageCount: number, always be a number, can be 0.\n * pagePrevDataIndex: number, null when no previous page.\n * pageNextDataIndex: number, null when no next page.\n * }\n */\n ScrollableLegendView.prototype._getPageInfo = function (legendModel) {\n var scrollDataIndex = legendModel.get('scrollDataIndex', true);\n var contentGroup = this.getContentGroup();\n var containerRectSize = this._containerGroup.__rectSize;\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var targetItemIndex = this._findTargetItemIndex(scrollDataIndex);\n var children = contentGroup.children();\n var targetItem = children[targetItemIndex];\n var itemCount = children.length;\n var pCount = !itemCount ? 0 : 1;\n var result = {\n contentPosition: [contentGroup.x, contentGroup.y],\n pageCount: pCount,\n pageIndex: pCount - 1,\n pagePrevDataIndex: null,\n pageNextDataIndex: null\n };\n if (!targetItem) {\n return result;\n }\n var targetItemInfo = getItemInfo(targetItem);\n result.contentPosition[orientIdx] = -targetItemInfo.s;\n // Strategy:\n // (1) Always align based on the left/top most item.\n // (2) It is user-friendly that the last item shown in the\n // current window is shown at the begining of next window.\n // Otherwise if half of the last item is cut by the window,\n // it will have no chance to display entirely.\n // (3) Consider that item size probably be different, we\n // have calculate pageIndex by size rather than item index,\n // and we can not get page index directly by division.\n // (4) The window is to narrow to contain more than\n // one item, we should make sure that the page can be fliped.\n for (var i = targetItemIndex + 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i <= itemCount; ++i) {\n currItemInfo = getItemInfo(children[i]);\n if (\n // Half of the last item is out of the window.\n !currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize\n // If the current item does not intersect with the window, the new page\n // can be started at the current item or the last item.\n || currItemInfo && !intersect(currItemInfo, winStartItemInfo.s)) {\n if (winEndItemInfo.i > winStartItemInfo.i) {\n winStartItemInfo = winEndItemInfo;\n } else {\n // e.g., when page size is smaller than item size.\n winStartItemInfo = currItemInfo;\n }\n if (winStartItemInfo) {\n if (result.pageNextDataIndex == null) {\n result.pageNextDataIndex = winStartItemInfo.i;\n }\n ++result.pageCount;\n }\n }\n winEndItemInfo = currItemInfo;\n }\n for (var i = targetItemIndex - 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i >= -1; --i) {\n currItemInfo = getItemInfo(children[i]);\n if (\n // If the the end item does not intersect with the window started\n // from the current item, a page can be settled.\n (!currItemInfo || !intersect(winEndItemInfo, currItemInfo.s)\n // e.g., when page size is smaller than item size.\n ) && winStartItemInfo.i < winEndItemInfo.i) {\n winEndItemInfo = winStartItemInfo;\n if (result.pagePrevDataIndex == null) {\n result.pagePrevDataIndex = winStartItemInfo.i;\n }\n ++result.pageCount;\n ++result.pageIndex;\n }\n winStartItemInfo = currItemInfo;\n }\n return result;\n function getItemInfo(el) {\n if (el) {\n var itemRect = el.getBoundingRect();\n var start = itemRect[xy] + el[xy];\n return {\n s: start,\n e: start + itemRect[wh],\n i: el.__legendDataIndex\n };\n }\n }\n function intersect(itemInfo, winStart) {\n return itemInfo.e >= winStart && itemInfo.s <= winStart + containerRectSize;\n }\n };\n ScrollableLegendView.prototype._findTargetItemIndex = function (targetDataIndex) {\n if (!this._showController) {\n return 0;\n }\n var index;\n var contentGroup = this.getContentGroup();\n var defaultIndex;\n contentGroup.eachChild(function (child, idx) {\n var legendDataIdx = child.__legendDataIndex;\n // FIXME\n // If the given targetDataIndex (from model) is illegal,\n // we use defaultIndex. But the index on the legend model and\n // action payload is still illegal. That case will not be\n // changed until some scenario requires.\n if (defaultIndex == null && legendDataIdx != null) {\n defaultIndex = idx;\n }\n if (legendDataIdx === targetDataIndex) {\n index = idx;\n }\n });\n return index != null ? index : defaultIndex;\n };\n ScrollableLegendView.type = 'legend.scroll';\n return ScrollableLegendView;\n}(LegendView);\nexport default ScrollableLegendView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport default function installScrollableLegendAction(registers) {\n /**\n * @event legendScroll\n * @type {Object}\n * @property {string} type 'legendScroll'\n * @property {string} scrollDataIndex\n */\n registers.registerAction('legendScroll', 'legendscroll', function (payload, ecModel) {\n var scrollDataIndex = payload.scrollDataIndex;\n scrollDataIndex != null && ecModel.eachComponent({\n mainType: 'legend',\n subType: 'scroll',\n query: payload\n }, function (legendModel) {\n legendModel.setScrollDataIndex(scrollDataIndex);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installLegendPlain } from './installLegendPlain.js';\nimport ScrollableLegendModel from './ScrollableLegendModel.js';\nimport ScrollableLegendView from './ScrollableLegendView.js';\nimport installScrollableLegendAction from './scrollableLegendAction.js';\nexport function install(registers) {\n use(installLegendPlain);\n registers.registerComponentModel(ScrollableLegendModel);\n registers.registerComponentView(ScrollableLegendView);\n installScrollableLegendAction(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installLegendPlain } from './installLegendPlain.js';\nimport { install as installLegendScroll } from './installLegendScroll.js';\nexport function install(registers) {\n use(installLegendPlain);\n use(installLegendScroll);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomModel from './DataZoomModel.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar InsideZoomModel = /** @class */function (_super) {\n __extends(InsideZoomModel, _super);\n function InsideZoomModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = InsideZoomModel.type;\n return _this;\n }\n InsideZoomModel.type = 'dataZoom.inside';\n InsideZoomModel.defaultOption = inheritDefaultOption(DataZoomModel.defaultOption, {\n disabled: false,\n zoomLock: false,\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n moveOnMouseWheel: false,\n preventDefaultMouseMove: true\n });\n return InsideZoomModel;\n}(DataZoomModel);\nexport default InsideZoomModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Only create one roam controller for each coordinate system.\n// one roam controller might be refered by two inside data zoom\n// components (for example, one for x and one for y). When user\n// pan or zoom, only dispatch one action for those data zoom\n// components.\nimport RoamController from '../../component/helper/RoamController.js';\nimport * as throttleUtil from '../../util/throttle.js';\nimport { makeInner } from '../../util/model.js';\nimport { each, curry, createHashMap } from 'zrender/lib/core/util.js';\nimport { collectReferCoordSysModelInfo } from './helper.js';\nvar inner = makeInner();\nexport function setViewInfoToCoordSysRecord(api, dataZoomModel, getRange) {\n inner(api).coordSysRecordMap.each(function (coordSysRecord) {\n var dzInfo = coordSysRecord.dataZoomInfoMap.get(dataZoomModel.uid);\n if (dzInfo) {\n dzInfo.getRange = getRange;\n }\n });\n}\nexport function disposeCoordSysRecordIfNeeded(api, dataZoomModel) {\n var coordSysRecordMap = inner(api).coordSysRecordMap;\n var coordSysKeyArr = coordSysRecordMap.keys();\n for (var i = 0; i < coordSysKeyArr.length; i++) {\n var coordSysKey = coordSysKeyArr[i];\n var coordSysRecord = coordSysRecordMap.get(coordSysKey);\n var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap;\n if (dataZoomInfoMap) {\n var dzUid = dataZoomModel.uid;\n var dzInfo = dataZoomInfoMap.get(dzUid);\n if (dzInfo) {\n dataZoomInfoMap.removeKey(dzUid);\n if (!dataZoomInfoMap.keys().length) {\n disposeCoordSysRecord(coordSysRecordMap, coordSysRecord);\n }\n }\n }\n }\n}\nfunction disposeCoordSysRecord(coordSysRecordMap, coordSysRecord) {\n if (coordSysRecord) {\n coordSysRecordMap.removeKey(coordSysRecord.model.uid);\n var controller = coordSysRecord.controller;\n controller && controller.dispose();\n }\n}\nfunction createCoordSysRecord(api, coordSysModel) {\n // These init props will never change after record created.\n var coordSysRecord = {\n model: coordSysModel,\n containsPoint: curry(containsPoint, coordSysModel),\n dispatchAction: curry(dispatchAction, api),\n dataZoomInfoMap: null,\n controller: null\n };\n // Must not do anything depends on coordSysRecord outside the event handler here,\n // because coordSysRecord not completed yet.\n var controller = coordSysRecord.controller = new RoamController(api.getZr());\n each(['pan', 'zoom', 'scrollMove'], function (eventName) {\n controller.on(eventName, function (event) {\n var batch = [];\n coordSysRecord.dataZoomInfoMap.each(function (dzInfo) {\n // Check whether the behaviors (zoomOnMouseWheel, moveOnMouseMove,\n // moveOnMouseWheel, ...) enabled.\n if (!event.isAvailableBehavior(dzInfo.model.option)) {\n return;\n }\n var method = (dzInfo.getRange || {})[eventName];\n var range = method && method(dzInfo.dzReferCoordSysInfo, coordSysRecord.model.mainType, coordSysRecord.controller, event);\n !dzInfo.model.get('disabled', true) && range && batch.push({\n dataZoomId: dzInfo.model.id,\n start: range[0],\n end: range[1]\n });\n });\n batch.length && coordSysRecord.dispatchAction(batch);\n });\n });\n return coordSysRecord;\n}\n/**\n * This action will be throttled.\n */\nfunction dispatchAction(api, batch) {\n if (!api.isDisposed()) {\n api.dispatchAction({\n type: 'dataZoom',\n animation: {\n easing: 'cubicOut',\n duration: 100\n },\n batch: batch\n });\n }\n}\nfunction containsPoint(coordSysModel, e, x, y) {\n return coordSysModel.coordinateSystem.containPoint([x, y]);\n}\n/**\n * Merge roamController settings when multiple dataZooms share one roamController.\n */\nfunction mergeControllerParams(dataZoomInfoMap, coordSysRecord, api) {\n var controlType;\n // DO NOT use reserved word (true, false, undefined) as key literally. Even if encapsulated\n // as string, it is probably revert to reserved word by compress tool. See #7411.\n var prefix = 'type_';\n var typePriority = {\n 'type_true': 2,\n 'type_move': 1,\n 'type_false': 0,\n 'type_undefined': -1\n };\n var preventDefaultMouseMove = true;\n dataZoomInfoMap.each(function (dataZoomInfo) {\n var dataZoomModel = dataZoomInfo.model;\n var oneType = dataZoomModel.get('disabled', true) ? false : dataZoomModel.get('zoomLock', true) ? 'move' : true;\n if (typePriority[prefix + oneType] > typePriority[prefix + controlType]) {\n controlType = oneType;\n }\n // Prevent default move event by default. If one false, do not prevent. Otherwise\n // users may be confused why it does not work when multiple insideZooms exist.\n preventDefaultMouseMove = preventDefaultMouseMove && dataZoomModel.get('preventDefaultMouseMove', true);\n });\n return {\n controlType: controlType,\n opt: {\n // RoamController will enable all of these functionalities,\n // and the final behavior is determined by its event listener\n // provided by each inside zoom.\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n moveOnMouseWheel: true,\n preventDefaultMouseMove: !!preventDefaultMouseMove,\n api: api,\n zInfo: {\n component: coordSysRecord.model\n },\n triggerInfo: {\n roamTrigger: null,\n isInSelf: coordSysRecord.containsPoint\n }\n }\n };\n}\nexport function installDataZoomRoamProcessor(registers) {\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, function (ecModel, api) {\n var apiInner = inner(api);\n var coordSysRecordMap = apiInner.coordSysRecordMap || (apiInner.coordSysRecordMap = createHashMap());\n coordSysRecordMap.each(function (coordSysRecord) {\n // `coordSysRecordMap` always exists (because it holds the `roam controller`, which should\n // better not re-create each time), but clear `dataZoomInfoMap` each round of the workflow.\n coordSysRecord.dataZoomInfoMap = null;\n });\n ecModel.eachComponent({\n mainType: 'dataZoom',\n subType: 'inside'\n }, function (dataZoomModel) {\n var dzReferCoordSysWrap = collectReferCoordSysModelInfo(dataZoomModel);\n each(dzReferCoordSysWrap.infoList, function (dzCoordSysInfo) {\n var coordSysUid = dzCoordSysInfo.model.uid;\n var coordSysRecord = coordSysRecordMap.get(coordSysUid) || coordSysRecordMap.set(coordSysUid, createCoordSysRecord(api, dzCoordSysInfo.model));\n var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap || (coordSysRecord.dataZoomInfoMap = createHashMap());\n // Notice these props might be changed each time for a single dataZoomModel.\n dataZoomInfoMap.set(dataZoomModel.uid, {\n dzReferCoordSysInfo: dzCoordSysInfo,\n model: dataZoomModel,\n getRange: null\n });\n });\n });\n // (1) Merge dataZoom settings for each coord sys and set to the roam controller.\n // (2) Clear coord sys if not refered by any dataZoom.\n coordSysRecordMap.each(function (coordSysRecord) {\n var controller = coordSysRecord.controller;\n var firstDzInfo;\n var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap;\n if (dataZoomInfoMap) {\n var firstDzKey = dataZoomInfoMap.keys()[0];\n if (firstDzKey != null) {\n firstDzInfo = dataZoomInfoMap.get(firstDzKey);\n }\n }\n if (!firstDzInfo) {\n disposeCoordSysRecord(coordSysRecordMap, coordSysRecord);\n return;\n }\n var controllerParams = mergeControllerParams(dataZoomInfoMap, coordSysRecord, api);\n controller.enable(controllerParams.controlType, controllerParams.opt);\n throttleUtil.createOrUpdate(coordSysRecord, 'dispatchAction', firstDzInfo.model.get('throttle', true), 'fixRate');\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomView from './DataZoomView.js';\nimport sliderMove from '../helper/sliderMove.js';\nimport * as roams from './roams.js';\nimport { bind } from 'zrender/lib/core/util.js';\nvar InsideZoomView = /** @class */function (_super) {\n __extends(InsideZoomView, _super);\n function InsideZoomView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dataZoom.inside';\n return _this;\n }\n InsideZoomView.prototype.render = function (dataZoomModel, ecModel, api) {\n _super.prototype.render.apply(this, arguments);\n if (dataZoomModel.noTarget()) {\n this._clear();\n return;\n }\n // Hence the `throttle` util ensures to preserve command order,\n // here simply updating range all the time will not cause missing\n // any of the the roam change.\n this.range = dataZoomModel.getPercentRange();\n // Reset controllers.\n roams.setViewInfoToCoordSysRecord(api, dataZoomModel, {\n pan: bind(getRangeHandlers.pan, this),\n zoom: bind(getRangeHandlers.zoom, this),\n scrollMove: bind(getRangeHandlers.scrollMove, this)\n });\n };\n InsideZoomView.prototype.dispose = function () {\n this._clear();\n _super.prototype.dispose.apply(this, arguments);\n };\n InsideZoomView.prototype._clear = function () {\n roams.disposeCoordSysRecordIfNeeded(this.api, this.dataZoomModel);\n this.range = null;\n };\n InsideZoomView.type = 'dataZoom.inside';\n return InsideZoomView;\n}(DataZoomView);\nvar getRangeHandlers = {\n zoom: function (coordSysInfo, coordSysMainType, controller, e) {\n var lastRange = this.range;\n var range = lastRange.slice();\n // Calculate transform by the first axis.\n var axisModel = coordSysInfo.axisModels[0];\n if (!axisModel) {\n return;\n }\n var directionInfo = getDirectionInfo[coordSysMainType](null, [e.originX, e.originY], axisModel, controller, coordSysInfo);\n var percentPoint = (directionInfo.signal > 0 ? directionInfo.pixelStart + directionInfo.pixelLength - directionInfo.pixel : directionInfo.pixel - directionInfo.pixelStart) / directionInfo.pixelLength * (range[1] - range[0]) + range[0];\n var scale = Math.max(1 / e.scale, 0);\n range[0] = (range[0] - percentPoint) * scale + percentPoint;\n range[1] = (range[1] - percentPoint) * scale + percentPoint;\n // Restrict range.\n var minMaxSpan = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();\n sliderMove(0, range, [0, 100], 0, minMaxSpan.minSpan, minMaxSpan.maxSpan);\n this.range = range;\n if (lastRange[0] !== range[0] || lastRange[1] !== range[1]) {\n return range;\n }\n },\n pan: makeMover(function (range, axisModel, coordSysInfo, coordSysMainType, controller, e) {\n var directionInfo = getDirectionInfo[coordSysMainType]([e.oldX, e.oldY], [e.newX, e.newY], axisModel, controller, coordSysInfo);\n return directionInfo.signal * (range[1] - range[0]) * directionInfo.pixel / directionInfo.pixelLength;\n }),\n scrollMove: makeMover(function (range, axisModel, coordSysInfo, coordSysMainType, controller, e) {\n var directionInfo = getDirectionInfo[coordSysMainType]([0, 0], [e.scrollDelta, e.scrollDelta], axisModel, controller, coordSysInfo);\n return directionInfo.signal * (range[1] - range[0]) * e.scrollDelta;\n })\n};\nfunction makeMover(getPercentDelta) {\n return function (coordSysInfo, coordSysMainType, controller, e) {\n var lastRange = this.range;\n var range = lastRange.slice();\n // Calculate transform by the first axis.\n var axisModel = coordSysInfo.axisModels[0];\n if (!axisModel) {\n return;\n }\n var percentDelta = getPercentDelta(range, axisModel, coordSysInfo, coordSysMainType, controller, e);\n sliderMove(percentDelta, range, [0, 100], 'all');\n this.range = range;\n if (lastRange[0] !== range[0] || lastRange[1] !== range[1]) {\n return range;\n }\n };\n}\nvar getDirectionInfo = {\n grid: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) {\n var axis = axisModel.axis;\n var ret = {};\n var rect = coordSysInfo.model.coordinateSystem.getRect();\n oldPoint = oldPoint || [0, 0];\n if (axis.dim === 'x') {\n ret.pixel = newPoint[0] - oldPoint[0];\n ret.pixelLength = rect.width;\n ret.pixelStart = rect.x;\n ret.signal = axis.inverse ? 1 : -1;\n } else {\n // axis.dim === 'y'\n ret.pixel = newPoint[1] - oldPoint[1];\n ret.pixelLength = rect.height;\n ret.pixelStart = rect.y;\n ret.signal = axis.inverse ? -1 : 1;\n }\n return ret;\n },\n polar: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) {\n var axis = axisModel.axis;\n var ret = {};\n var polar = coordSysInfo.model.coordinateSystem;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var angleExtent = polar.getAngleAxis().getExtent();\n oldPoint = oldPoint ? polar.pointToCoord(oldPoint) : [0, 0];\n newPoint = polar.pointToCoord(newPoint);\n if (axisModel.mainType === 'radiusAxis') {\n ret.pixel = newPoint[0] - oldPoint[0];\n // ret.pixelLength = Math.abs(radiusExtent[1] - radiusExtent[0]);\n // ret.pixelStart = Math.min(radiusExtent[0], radiusExtent[1]);\n ret.pixelLength = radiusExtent[1] - radiusExtent[0];\n ret.pixelStart = radiusExtent[0];\n ret.signal = axis.inverse ? 1 : -1;\n } else {\n // 'angleAxis'\n ret.pixel = newPoint[1] - oldPoint[1];\n // ret.pixelLength = Math.abs(angleExtent[1] - angleExtent[0]);\n // ret.pixelStart = Math.min(angleExtent[0], angleExtent[1]);\n ret.pixelLength = angleExtent[1] - angleExtent[0];\n ret.pixelStart = angleExtent[0];\n ret.signal = axis.inverse ? -1 : 1;\n }\n return ret;\n },\n singleAxis: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) {\n var axis = axisModel.axis;\n var rect = coordSysInfo.model.coordinateSystem.getRect();\n var ret = {};\n oldPoint = oldPoint || [0, 0];\n if (axis.orient === 'horizontal') {\n ret.pixel = newPoint[0] - oldPoint[0];\n ret.pixelLength = rect.width;\n ret.pixelStart = rect.x;\n ret.signal = axis.inverse ? 1 : -1;\n } else {\n // 'vertical'\n ret.pixel = newPoint[1] - oldPoint[1];\n ret.pixelLength = rect.height;\n ret.pixelStart = rect.y;\n ret.signal = axis.inverse ? -1 : 1;\n }\n return ret;\n }\n};\nexport default InsideZoomView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport InsideZoomModel from './InsideZoomModel.js';\nimport InsideZoomView from './InsideZoomView.js';\nimport { installDataZoomRoamProcessor } from './roams.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n installCommon(registers);\n registers.registerComponentModel(InsideZoomModel);\n registers.registerComponentView(InsideZoomView);\n installDataZoomRoamProcessor(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomModel from './DataZoomModel.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nimport tokens from '../../visual/tokens.js';\nvar SliderZoomModel = /** @class */function (_super) {\n __extends(SliderZoomModel, _super);\n function SliderZoomModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SliderZoomModel.type;\n return _this;\n }\n SliderZoomModel.type = 'dataZoom.slider';\n SliderZoomModel.layoutMode = 'box';\n SliderZoomModel.defaultOption = inheritDefaultOption(DataZoomModel.defaultOption, {\n show: true,\n // deault value can only be drived in view stage.\n right: 'ph',\n top: 'ph',\n width: 'ph',\n height: 'ph',\n left: null,\n bottom: null,\n borderColor: tokens.color.accent10,\n borderRadius: 0,\n backgroundColor: tokens.color.transparent,\n // dataBackgroundColor: '#ddd',\n dataBackground: {\n lineStyle: {\n color: tokens.color.accent30,\n width: 0.5\n },\n areaStyle: {\n color: tokens.color.accent20,\n opacity: 0.2\n }\n },\n selectedDataBackground: {\n lineStyle: {\n color: tokens.color.accent40,\n width: 0.5\n },\n areaStyle: {\n color: tokens.color.accent20,\n opacity: 0.3\n }\n },\n // Color of selected window.\n fillerColor: 'rgba(135,175,274,0.2)',\n handleIcon: 'path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z',\n // Percent of the slider height\n handleSize: '100%',\n handleStyle: {\n color: tokens.color.neutral00,\n borderColor: tokens.color.accent20\n },\n moveHandleSize: 7,\n moveHandleIcon: 'path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z',\n moveHandleStyle: {\n color: tokens.color.accent40,\n opacity: 0.5\n },\n showDetail: true,\n showDataShadow: 'auto',\n realtime: true,\n zoomLock: false,\n textStyle: {\n color: tokens.color.tertiary\n },\n brushSelect: true,\n brushStyle: {\n color: tokens.color.accent30,\n opacity: 0.3\n },\n emphasis: {\n handleLabel: {\n show: true\n },\n handleStyle: {\n borderColor: tokens.color.accent40\n },\n moveHandleStyle: {\n opacity: 0.8\n }\n },\n defaultLocationEdgeGap: 15\n });\n return SliderZoomModel;\n}(DataZoomModel);\nexport default SliderZoomModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { bind, each, isFunction, isString, indexOf } from 'zrender/lib/core/util.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as throttle from '../../util/throttle.js';\nimport DataZoomView from './DataZoomView.js';\nimport { linearMap, asc, parsePercent } from '../../util/number.js';\nimport * as layout from '../../util/layout.js';\nimport sliderMove from '../helper/sliderMove.js';\nimport { getAxisMainType, collectReferCoordSysModelInfo } from './helper.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { createSymbol, symbolBuildProxies } from '../../util/symbol.js';\nimport { deprecateLog } from '../../util/log.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport tokens from '../../visual/tokens.js';\nvar Rect = graphic.Rect;\n// Constants\nvar DEFAULT_FRAME_BORDER_WIDTH = 1;\nvar DEFAULT_FILLER_SIZE = 30;\nvar DEFAULT_MOVE_HANDLE_SIZE = 7;\nvar HORIZONTAL = 'horizontal';\nvar VERTICAL = 'vertical';\nvar LABEL_GAP = 5;\nvar SHOW_DATA_SHADOW_SERIES_TYPE = ['line', 'bar', 'candlestick', 'scatter'];\nvar REALTIME_ANIMATION_CONFIG = {\n easing: 'cubicOut',\n duration: 100,\n delay: 0\n};\nvar SliderZoomView = /** @class */function (_super) {\n __extends(SliderZoomView, _super);\n function SliderZoomView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SliderZoomView.type;\n _this._displayables = {};\n return _this;\n }\n SliderZoomView.prototype.init = function (ecModel, api) {\n this.api = api;\n // A unique handler for each dataZoom component\n this._onBrush = bind(this._onBrush, this);\n this._onBrushEnd = bind(this._onBrushEnd, this);\n };\n SliderZoomView.prototype.render = function (dataZoomModel, ecModel, api, payload) {\n _super.prototype.render.apply(this, arguments);\n throttle.createOrUpdate(this, '_dispatchZoomAction', dataZoomModel.get('throttle'), 'fixRate');\n this._orient = dataZoomModel.getOrient();\n if (dataZoomModel.get('show') === false) {\n this.group.removeAll();\n return;\n }\n if (dataZoomModel.noTarget()) {\n this._clear();\n this.group.removeAll();\n return;\n }\n // Notice: this._resetInterval() should not be executed when payload.type\n // is 'dataZoom', origin this._range should be maintained, otherwise 'pan'\n // or 'zoom' info will be missed because of 'throttle' of this.dispatchAction,\n if (!payload || payload.type !== 'dataZoom' || payload.from !== this.uid) {\n this._buildView();\n }\n this._updateView();\n };\n SliderZoomView.prototype.dispose = function () {\n this._clear();\n _super.prototype.dispose.apply(this, arguments);\n };\n SliderZoomView.prototype._clear = function () {\n throttle.clear(this, '_dispatchZoomAction');\n var zr = this.api.getZr();\n zr.off('mousemove', this._onBrush);\n zr.off('mouseup', this._onBrushEnd);\n };\n SliderZoomView.prototype._buildView = function () {\n var thisGroup = this.group;\n thisGroup.removeAll();\n this._brushing = false;\n this._displayables.brushRect = null;\n this._resetLocation();\n this._resetInterval();\n var barGroup = this._displayables.sliderGroup = new graphic.Group();\n this._renderBackground();\n this._renderHandle();\n this._renderDataShadow();\n thisGroup.add(barGroup);\n this._positionGroup();\n };\n SliderZoomView.prototype._resetLocation = function () {\n var dataZoomModel = this.dataZoomModel;\n var api = this.api;\n var showMoveHandle = dataZoomModel.get('brushSelect');\n var moveHandleSize = showMoveHandle ? DEFAULT_MOVE_HANDLE_SIZE : 0;\n var refContainer = layout.createBoxLayoutReference(dataZoomModel, api).refContainer;\n // If some of x/y/width/height are not specified,\n // auto-adapt according to target grid.\n var coordRect = this._findCoordRect();\n var edgeGap = dataZoomModel.get('defaultLocationEdgeGap', true) || 0;\n // Default align by coordinate system rect.\n var positionInfo = this._orient === HORIZONTAL ? {\n // Why using 'right', because right should be used in vertical,\n // and it is better to be consistent for dealing with position param merge.\n right: refContainer.width - coordRect.x - coordRect.width,\n top: refContainer.height - DEFAULT_FILLER_SIZE - edgeGap - moveHandleSize,\n width: coordRect.width,\n height: DEFAULT_FILLER_SIZE\n } : {\n right: edgeGap,\n top: coordRect.y,\n width: DEFAULT_FILLER_SIZE,\n height: coordRect.height\n };\n // Do not write back to option and replace value 'ph', because\n // the 'ph' value should be recalculated when resize.\n var layoutParams = layout.getLayoutParams(dataZoomModel.option);\n // Replace the placeholder value.\n each(['right', 'top', 'width', 'height'], function (name) {\n if (layoutParams[name] === 'ph') {\n layoutParams[name] = positionInfo[name];\n }\n });\n var layoutRect = layout.getLayoutRect(layoutParams, refContainer);\n this._location = {\n x: layoutRect.x,\n y: layoutRect.y\n };\n this._size = [layoutRect.width, layoutRect.height];\n this._orient === VERTICAL && this._size.reverse();\n };\n SliderZoomView.prototype._positionGroup = function () {\n var thisGroup = this.group;\n var location = this._location;\n var orient = this._orient;\n // Just use the first axis to determine mapping.\n var targetAxisModel = this.dataZoomModel.getFirstTargetAxisModel();\n var inverse = targetAxisModel && targetAxisModel.get('inverse');\n var sliderGroup = this._displayables.sliderGroup;\n var otherAxisInverse = (this._dataShadowInfo || {}).otherAxisInverse;\n // Transform barGroup.\n sliderGroup.attr(orient === HORIZONTAL && !inverse ? {\n scaleY: otherAxisInverse ? 1 : -1,\n scaleX: 1\n } : orient === HORIZONTAL && inverse ? {\n scaleY: otherAxisInverse ? 1 : -1,\n scaleX: -1\n } : orient === VERTICAL && !inverse ? {\n scaleY: otherAxisInverse ? -1 : 1,\n scaleX: 1,\n rotation: Math.PI / 2\n }\n // Don't use Math.PI, considering shadow direction.\n : {\n scaleY: otherAxisInverse ? -1 : 1,\n scaleX: -1,\n rotation: Math.PI / 2\n });\n // Position barGroup\n var rect = thisGroup.getBoundingRect([sliderGroup]);\n thisGroup.x = location.x - rect.x;\n thisGroup.y = location.y - rect.y;\n thisGroup.markRedraw();\n };\n SliderZoomView.prototype._getViewExtent = function () {\n return [0, this._size[0]];\n };\n SliderZoomView.prototype._renderBackground = function () {\n var dataZoomModel = this.dataZoomModel;\n var size = this._size;\n var barGroup = this._displayables.sliderGroup;\n var brushSelect = dataZoomModel.get('brushSelect');\n barGroup.add(new Rect({\n silent: true,\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1]\n },\n style: {\n fill: dataZoomModel.get('backgroundColor')\n },\n z2: -40\n }));\n // Click panel, over shadow, below handles.\n var clickPanel = new Rect({\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1]\n },\n style: {\n fill: 'transparent'\n },\n z2: 0,\n onclick: bind(this._onClickPanel, this)\n });\n var zr = this.api.getZr();\n if (brushSelect) {\n clickPanel.on('mousedown', this._onBrushStart, this);\n clickPanel.cursor = 'crosshair';\n zr.on('mousemove', this._onBrush);\n zr.on('mouseup', this._onBrushEnd);\n } else {\n zr.off('mousemove', this._onBrush);\n zr.off('mouseup', this._onBrushEnd);\n }\n barGroup.add(clickPanel);\n };\n SliderZoomView.prototype._renderDataShadow = function () {\n var info = this._dataShadowInfo = this._prepareDataShadowInfo();\n this._displayables.dataShadowSegs = [];\n if (!info) {\n return;\n }\n var size = this._size;\n var oldSize = this._shadowSize || [];\n var seriesModel = info.series;\n var data = seriesModel.getRawData();\n var candlestickDim = seriesModel.getShadowDim && seriesModel.getShadowDim();\n var otherDim = candlestickDim && data.getDimensionInfo(candlestickDim) ? seriesModel.getShadowDim() // @see candlestick\n : info.otherDim;\n if (otherDim == null) {\n return;\n }\n var polygonPts = this._shadowPolygonPts;\n var polylinePts = this._shadowPolylinePts;\n // Not re-render if data doesn't change.\n if (data !== this._shadowData || otherDim !== this._shadowDim || size[0] !== oldSize[0] || size[1] !== oldSize[1]) {\n var thisDataExtent_1 = data.getDataExtent(info.thisDim);\n var otherDataExtent_1 = data.getDataExtent(otherDim);\n // Nice extent.\n var otherOffset = (otherDataExtent_1[1] - otherDataExtent_1[0]) * 0.3;\n otherDataExtent_1 = [otherDataExtent_1[0] - otherOffset, otherDataExtent_1[1] + otherOffset];\n var otherShadowExtent_1 = [0, size[1]];\n var thisShadowExtent = [0, size[0]];\n var areaPoints_1 = [[size[0], 0], [0, 0]];\n var linePoints_1 = [];\n var step_1 = thisShadowExtent[1] / Math.max(1, data.count() - 1);\n var normalizationConstant_1 = size[0] / (thisDataExtent_1[1] - thisDataExtent_1[0]);\n var isTimeAxis_1 = info.thisAxis.type === 'time';\n var thisCoord_1 = -step_1;\n // Optimize for large data shadow\n var stride_1 = Math.round(data.count() / size[0]);\n var lastIsEmpty_1;\n data.each([info.thisDim, otherDim], function (thisValue, otherValue, index) {\n if (stride_1 > 0 && index % stride_1) {\n if (!isTimeAxis_1) {\n thisCoord_1 += step_1;\n }\n return;\n }\n thisCoord_1 = isTimeAxis_1 ? (+thisValue - thisDataExtent_1[0]) * normalizationConstant_1 : thisCoord_1 + step_1;\n // FIXME\n // Should consider axis.min/axis.max when drawing dataShadow.\n // FIXME\n // 应该使用统一的空判断?还是在list里进行空判断?\n var isEmpty = otherValue == null || isNaN(otherValue) || otherValue === '';\n // See #4235.\n var otherCoord = isEmpty ? 0 : linearMap(otherValue, otherDataExtent_1, otherShadowExtent_1, true);\n // Attempt to draw data shadow precisely when there are empty value.\n if (isEmpty && !lastIsEmpty_1 && index) {\n areaPoints_1.push([areaPoints_1[areaPoints_1.length - 1][0], 0]);\n linePoints_1.push([linePoints_1[linePoints_1.length - 1][0], 0]);\n } else if (!isEmpty && lastIsEmpty_1) {\n areaPoints_1.push([thisCoord_1, 0]);\n linePoints_1.push([thisCoord_1, 0]);\n }\n if (!isEmpty) {\n areaPoints_1.push([thisCoord_1, otherCoord]);\n linePoints_1.push([thisCoord_1, otherCoord]);\n }\n lastIsEmpty_1 = isEmpty;\n });\n polygonPts = this._shadowPolygonPts = areaPoints_1;\n polylinePts = this._shadowPolylinePts = linePoints_1;\n }\n this._shadowData = data;\n this._shadowDim = otherDim;\n this._shadowSize = [size[0], size[1]];\n var dataZoomModel = this.dataZoomModel;\n function createDataShadowGroup(isSelectedArea) {\n var model = dataZoomModel.getModel(isSelectedArea ? 'selectedDataBackground' : 'dataBackground');\n var group = new graphic.Group();\n var polygon = new graphic.Polygon({\n shape: {\n points: polygonPts\n },\n segmentIgnoreThreshold: 1,\n style: model.getModel('areaStyle').getAreaStyle(),\n silent: true,\n z2: -20\n });\n var polyline = new graphic.Polyline({\n shape: {\n points: polylinePts\n },\n segmentIgnoreThreshold: 1,\n style: model.getModel('lineStyle').getLineStyle(),\n silent: true,\n z2: -19\n });\n group.add(polygon);\n group.add(polyline);\n return group;\n }\n // let dataBackgroundModel = dataZoomModel.getModel('dataBackground');\n for (var i = 0; i < 3; i++) {\n var group = createDataShadowGroup(i === 1);\n this._displayables.sliderGroup.add(group);\n this._displayables.dataShadowSegs.push(group);\n }\n };\n SliderZoomView.prototype._prepareDataShadowInfo = function () {\n var dataZoomModel = this.dataZoomModel;\n var showDataShadow = dataZoomModel.get('showDataShadow');\n if (showDataShadow === false) {\n return;\n }\n // Find a representative series.\n var result;\n var ecModel = this.ecModel;\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n var seriesModels = dataZoomModel.getAxisProxy(axisDim, axisIndex).getTargetSeriesModels();\n each(seriesModels, function (seriesModel) {\n if (result) {\n return;\n }\n if (showDataShadow !== true && indexOf(SHOW_DATA_SHADOW_SERIES_TYPE, seriesModel.get('type')) < 0) {\n return;\n }\n var thisAxis = ecModel.getComponent(getAxisMainType(axisDim), axisIndex).axis;\n var otherDim = getOtherDim(axisDim);\n var otherAxisInverse;\n var coordSys = seriesModel.coordinateSystem;\n if (otherDim != null && coordSys.getOtherAxis) {\n otherAxisInverse = coordSys.getOtherAxis(thisAxis).inverse;\n }\n otherDim = seriesModel.getData().mapDimension(otherDim);\n var thisDim = seriesModel.getData().mapDimension(axisDim);\n result = {\n thisAxis: thisAxis,\n series: seriesModel,\n thisDim: thisDim,\n otherDim: otherDim,\n otherAxisInverse: otherAxisInverse\n };\n }, this);\n }, this);\n return result;\n };\n SliderZoomView.prototype._renderHandle = function () {\n var thisGroup = this.group;\n var displayables = this._displayables;\n var handles = displayables.handles = [null, null];\n var handleLabels = displayables.handleLabels = [null, null];\n var sliderGroup = this._displayables.sliderGroup;\n var size = this._size;\n var dataZoomModel = this.dataZoomModel;\n var api = this.api;\n var borderRadius = dataZoomModel.get('borderRadius') || 0;\n var brushSelect = dataZoomModel.get('brushSelect');\n var filler = displayables.filler = new Rect({\n silent: brushSelect,\n style: {\n fill: dataZoomModel.get('fillerColor')\n },\n textConfig: {\n position: 'inside'\n }\n });\n sliderGroup.add(filler);\n // Frame border.\n sliderGroup.add(new Rect({\n silent: true,\n subPixelOptimize: true,\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1],\n r: borderRadius\n },\n style: {\n // deprecated option\n stroke: dataZoomModel.get('dataBackgroundColor') || dataZoomModel.get('borderColor'),\n lineWidth: DEFAULT_FRAME_BORDER_WIDTH,\n fill: tokens.color.transparent\n }\n }));\n // Left and right handle to resize\n each([0, 1], function (handleIndex) {\n var iconStr = dataZoomModel.get('handleIcon');\n if (!symbolBuildProxies[iconStr] && iconStr.indexOf('path://') < 0 && iconStr.indexOf('image://') < 0) {\n // Compatitable with the old icon parsers. Which can use a path string without path://\n iconStr = 'path://' + iconStr;\n if (process.env.NODE_ENV !== 'production') {\n deprecateLog('handleIcon now needs \\'path://\\' prefix when using a path string');\n }\n }\n var path = createSymbol(iconStr, -1, 0, 2, 2, null, true);\n path.attr({\n cursor: getCursor(this._orient),\n draggable: true,\n drift: bind(this._onDragMove, this, handleIndex),\n ondragend: bind(this._onDragEnd, this),\n onmouseover: bind(this._showDataInfo, this, true),\n onmouseout: bind(this._showDataInfo, this, false),\n z2: 5\n });\n var bRect = path.getBoundingRect();\n var handleSize = dataZoomModel.get('handleSize');\n this._handleHeight = parsePercent(handleSize, this._size[1]);\n this._handleWidth = bRect.width / bRect.height * this._handleHeight;\n path.setStyle(dataZoomModel.getModel('handleStyle').getItemStyle());\n path.style.strokeNoScale = true;\n path.rectHover = true;\n path.ensureState('emphasis').style = dataZoomModel.getModel(['emphasis', 'handleStyle']).getItemStyle();\n enableHoverEmphasis(path);\n var handleColor = dataZoomModel.get('handleColor'); // deprecated option\n // Compatitable with previous version\n if (handleColor != null) {\n path.style.fill = handleColor;\n }\n sliderGroup.add(handles[handleIndex] = path);\n var textStyleModel = dataZoomModel.getModel('textStyle');\n var handleLabel = dataZoomModel.get('handleLabel') || {};\n var handleLabelShow = handleLabel.show || false;\n thisGroup.add(handleLabels[handleIndex] = new graphic.Text({\n silent: true,\n invisible: !handleLabelShow,\n style: createTextStyle(textStyleModel, {\n x: 0,\n y: 0,\n text: '',\n verticalAlign: 'middle',\n align: 'center',\n fill: textStyleModel.getTextColor(),\n font: textStyleModel.getFont()\n }),\n z2: 10\n }));\n }, this);\n // Handle to move. Only visible when brushSelect is set true.\n var actualMoveZone = filler;\n if (brushSelect) {\n var moveHandleHeight = parsePercent(dataZoomModel.get('moveHandleSize'), size[1]);\n var moveHandle_1 = displayables.moveHandle = new graphic.Rect({\n style: dataZoomModel.getModel('moveHandleStyle').getItemStyle(),\n silent: true,\n shape: {\n r: [0, 0, 2, 2],\n y: size[1] - 0.5,\n height: moveHandleHeight\n }\n });\n var iconSize = moveHandleHeight * 0.8;\n var moveHandleIcon = displayables.moveHandleIcon = createSymbol(dataZoomModel.get('moveHandleIcon'), -iconSize / 2, -iconSize / 2, iconSize, iconSize, tokens.color.neutral00, true);\n moveHandleIcon.silent = true;\n moveHandleIcon.y = size[1] + moveHandleHeight / 2 - 0.5;\n moveHandle_1.ensureState('emphasis').style = dataZoomModel.getModel(['emphasis', 'moveHandleStyle']).getItemStyle();\n var moveZoneExpandSize = Math.min(size[1] / 2, Math.max(moveHandleHeight, 10));\n actualMoveZone = displayables.moveZone = new graphic.Rect({\n invisible: true,\n shape: {\n y: size[1] - moveZoneExpandSize,\n height: moveHandleHeight + moveZoneExpandSize\n }\n });\n actualMoveZone.on('mouseover', function () {\n api.enterEmphasis(moveHandle_1);\n }).on('mouseout', function () {\n api.leaveEmphasis(moveHandle_1);\n });\n sliderGroup.add(moveHandle_1);\n sliderGroup.add(moveHandleIcon);\n sliderGroup.add(actualMoveZone);\n }\n actualMoveZone.attr({\n draggable: true,\n cursor: 'default',\n drift: bind(this._onDragMove, this, 'all'),\n ondragstart: bind(this._showDataInfo, this, true),\n ondragend: bind(this._onDragEnd, this),\n onmouseover: bind(this._showDataInfo, this, true),\n onmouseout: bind(this._showDataInfo, this, false)\n });\n };\n SliderZoomView.prototype._resetInterval = function () {\n var range = this._range = this.dataZoomModel.getPercentRange();\n var viewExtent = this._getViewExtent();\n this._handleEnds = [linearMap(range[0], [0, 100], viewExtent, true), linearMap(range[1], [0, 100], viewExtent, true)];\n };\n SliderZoomView.prototype._updateInterval = function (handleIndex, delta) {\n var dataZoomModel = this.dataZoomModel;\n var handleEnds = this._handleEnds;\n var viewExtend = this._getViewExtent();\n var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();\n var percentExtent = [0, 100];\n sliderMove(delta, handleEnds, viewExtend, dataZoomModel.get('zoomLock') ? 'all' : handleIndex, minMaxSpan.minSpan != null ? linearMap(minMaxSpan.minSpan, percentExtent, viewExtend, true) : null, minMaxSpan.maxSpan != null ? linearMap(minMaxSpan.maxSpan, percentExtent, viewExtend, true) : null);\n var lastRange = this._range;\n var range = this._range = asc([linearMap(handleEnds[0], viewExtend, percentExtent, true), linearMap(handleEnds[1], viewExtend, percentExtent, true)]);\n return !lastRange || lastRange[0] !== range[0] || lastRange[1] !== range[1];\n };\n SliderZoomView.prototype._updateView = function (nonRealtime) {\n var displaybles = this._displayables;\n var handleEnds = this._handleEnds;\n var handleInterval = asc(handleEnds.slice());\n var size = this._size;\n each([0, 1], function (handleIndex) {\n // Handles\n var handle = displaybles.handles[handleIndex];\n var handleHeight = this._handleHeight;\n handle.attr({\n scaleX: handleHeight / 2,\n scaleY: handleHeight / 2,\n // This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window.\n // NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default.\n x: handleEnds[handleIndex] + (handleIndex ? -1 : 1),\n y: size[1] / 2 - handleHeight / 2\n });\n }, this);\n // Filler\n displaybles.filler.setShape({\n x: handleInterval[0],\n y: 0,\n width: handleInterval[1] - handleInterval[0],\n height: size[1]\n });\n var viewExtent = {\n x: handleInterval[0],\n width: handleInterval[1] - handleInterval[0]\n };\n // Move handle\n if (displaybles.moveHandle) {\n displaybles.moveHandle.setShape(viewExtent);\n displaybles.moveZone.setShape(viewExtent);\n // Force update path on the invisible object\n displaybles.moveZone.getBoundingRect();\n displaybles.moveHandleIcon && displaybles.moveHandleIcon.attr('x', viewExtent.x + viewExtent.width / 2);\n }\n // update clip path of shadow.\n var dataShadowSegs = displaybles.dataShadowSegs;\n var segIntervals = [0, handleInterval[0], handleInterval[1], size[0]];\n for (var i = 0; i < dataShadowSegs.length; i++) {\n var segGroup = dataShadowSegs[i];\n var clipPath = segGroup.getClipPath();\n if (!clipPath) {\n clipPath = new graphic.Rect();\n segGroup.setClipPath(clipPath);\n }\n clipPath.setShape({\n x: segIntervals[i],\n y: 0,\n width: segIntervals[i + 1] - segIntervals[i],\n height: size[1]\n });\n }\n this._updateDataInfo(nonRealtime);\n };\n SliderZoomView.prototype._updateDataInfo = function (nonRealtime) {\n var dataZoomModel = this.dataZoomModel;\n var displaybles = this._displayables;\n var handleLabels = displaybles.handleLabels;\n var orient = this._orient;\n var labelTexts = ['', ''];\n // FIXME\n // date型,支持formatter,autoformatter(ec2 date.getAutoFormatter)\n if (dataZoomModel.get('showDetail')) {\n var axisProxy = dataZoomModel.findRepresentativeAxisProxy();\n if (axisProxy) {\n var axis = axisProxy.getAxisModel().axis;\n var range = this._range;\n var dataInterval = nonRealtime\n // See #4434, data and axis are not processed and reset yet in non-realtime mode.\n ? axisProxy.calculateDataWindow({\n start: range[0],\n end: range[1]\n }).valueWindow : axisProxy.getDataValueWindow();\n labelTexts = [this._formatLabel(dataInterval[0], axis), this._formatLabel(dataInterval[1], axis)];\n }\n }\n var orderedHandleEnds = asc(this._handleEnds.slice());\n setLabel.call(this, 0);\n setLabel.call(this, 1);\n function setLabel(handleIndex) {\n // Label\n // Text should not transform by barGroup.\n // Ignore handlers transform\n var barTransform = graphic.getTransform(displaybles.handles[handleIndex].parent, this.group);\n var direction = graphic.transformDirection(handleIndex === 0 ? 'right' : 'left', barTransform);\n var offset = this._handleWidth / 2 + LABEL_GAP;\n var textPoint = graphic.applyTransform([orderedHandleEnds[handleIndex] + (handleIndex === 0 ? -offset : offset), this._size[1] / 2], barTransform);\n handleLabels[handleIndex].setStyle({\n x: textPoint[0],\n y: textPoint[1],\n verticalAlign: orient === HORIZONTAL ? 'middle' : direction,\n align: orient === HORIZONTAL ? direction : 'center',\n text: labelTexts[handleIndex]\n });\n }\n };\n SliderZoomView.prototype._formatLabel = function (value, axis) {\n var dataZoomModel = this.dataZoomModel;\n var labelFormatter = dataZoomModel.get('labelFormatter');\n var labelPrecision = dataZoomModel.get('labelPrecision');\n if (labelPrecision == null || labelPrecision === 'auto') {\n labelPrecision = axis.getPixelPrecision();\n }\n var valueStr = value == null || isNaN(value) ? ''\n // FIXME Glue code\n : axis.type === 'category' || axis.type === 'time' ? axis.scale.getLabel({\n value: Math.round(value)\n })\n // param of toFixed should less then 20.\n : value.toFixed(Math.min(labelPrecision, 20));\n return isFunction(labelFormatter) ? labelFormatter(value, valueStr) : isString(labelFormatter) ? labelFormatter.replace('{value}', valueStr) : valueStr;\n };\n /**\n * @param isEmphasis true: show, false: hide\n */\n SliderZoomView.prototype._showDataInfo = function (isEmphasis) {\n var handleLabel = this.dataZoomModel.get('handleLabel') || {};\n var normalShow = handleLabel.show || false;\n var emphasisHandleLabel = this.dataZoomModel.getModel(['emphasis', 'handleLabel']);\n var emphasisShow = emphasisHandleLabel.get('show') || false;\n // Dragging is considered as emphasis, unless emphasisShow is false\n var toShow = isEmphasis || this._dragging ? emphasisShow : normalShow;\n var displayables = this._displayables;\n var handleLabels = displayables.handleLabels;\n handleLabels[0].attr('invisible', !toShow);\n handleLabels[1].attr('invisible', !toShow);\n // Highlight move handle\n displayables.moveHandle && this.api[toShow ? 'enterEmphasis' : 'leaveEmphasis'](displayables.moveHandle, 1);\n };\n SliderZoomView.prototype._onDragMove = function (handleIndex, dx, dy, event) {\n this._dragging = true;\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(event.event);\n // Transform dx, dy to bar coordination.\n var barTransform = this._displayables.sliderGroup.getLocalTransform();\n var vertex = graphic.applyTransform([dx, dy], barTransform, true);\n var changed = this._updateInterval(handleIndex, vertex[0]);\n var realtime = this.dataZoomModel.get('realtime');\n this._updateView(!realtime);\n // Avoid dispatch dataZoom repeatly but range not changed,\n // which cause bad visual effect when progressive enabled.\n changed && realtime && this._dispatchZoomAction(true);\n };\n SliderZoomView.prototype._onDragEnd = function () {\n this._dragging = false;\n this._showDataInfo(false);\n // While in realtime mode and stream mode, dispatch action when\n // drag end will cause the whole view rerender, which is unnecessary.\n var realtime = this.dataZoomModel.get('realtime');\n !realtime && this._dispatchZoomAction(false);\n };\n SliderZoomView.prototype._onClickPanel = function (e) {\n var size = this._size;\n var localPoint = this._displayables.sliderGroup.transformCoordToLocal(e.offsetX, e.offsetY);\n if (localPoint[0] < 0 || localPoint[0] > size[0] || localPoint[1] < 0 || localPoint[1] > size[1]) {\n return;\n }\n var handleEnds = this._handleEnds;\n var center = (handleEnds[0] + handleEnds[1]) / 2;\n var changed = this._updateInterval('all', localPoint[0] - center);\n this._updateView();\n changed && this._dispatchZoomAction(false);\n };\n SliderZoomView.prototype._onBrushStart = function (e) {\n var x = e.offsetX;\n var y = e.offsetY;\n this._brushStart = new graphic.Point(x, y);\n this._brushing = true;\n this._brushStartTime = +new Date();\n // this._updateBrushRect(x, y);\n };\n SliderZoomView.prototype._onBrushEnd = function (e) {\n if (!this._brushing) {\n return;\n }\n var brushRect = this._displayables.brushRect;\n this._brushing = false;\n if (!brushRect) {\n return;\n }\n brushRect.attr('ignore', true);\n var brushShape = brushRect.shape;\n var brushEndTime = +new Date();\n // console.log(brushEndTime - this._brushStartTime);\n if (brushEndTime - this._brushStartTime < 200 && Math.abs(brushShape.width) < 5) {\n // Will treat it as a click\n return;\n }\n var viewExtend = this._getViewExtent();\n var percentExtent = [0, 100];\n var handleEnds = this._handleEnds = [brushShape.x, brushShape.x + brushShape.width];\n var minMaxSpan = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();\n // Restrict range.\n sliderMove(0, handleEnds, viewExtend, 0, minMaxSpan.minSpan != null ? linearMap(minMaxSpan.minSpan, percentExtent, viewExtend, true) : null, minMaxSpan.maxSpan != null ? linearMap(minMaxSpan.maxSpan, percentExtent, viewExtend, true) : null);\n this._range = asc([linearMap(handleEnds[0], viewExtend, percentExtent, true), linearMap(handleEnds[1], viewExtend, percentExtent, true)]);\n this._updateView();\n this._dispatchZoomAction(false);\n };\n SliderZoomView.prototype._onBrush = function (e) {\n if (this._brushing) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n this._updateBrushRect(e.offsetX, e.offsetY);\n }\n };\n SliderZoomView.prototype._updateBrushRect = function (mouseX, mouseY) {\n var displayables = this._displayables;\n var dataZoomModel = this.dataZoomModel;\n var brushRect = displayables.brushRect;\n if (!brushRect) {\n brushRect = displayables.brushRect = new Rect({\n silent: true,\n style: dataZoomModel.getModel('brushStyle').getItemStyle()\n });\n displayables.sliderGroup.add(brushRect);\n }\n brushRect.attr('ignore', false);\n var brushStart = this._brushStart;\n var sliderGroup = this._displayables.sliderGroup;\n var endPoint = sliderGroup.transformCoordToLocal(mouseX, mouseY);\n var startPoint = sliderGroup.transformCoordToLocal(brushStart.x, brushStart.y);\n var size = this._size;\n endPoint[0] = Math.max(Math.min(size[0], endPoint[0]), 0);\n brushRect.setShape({\n x: startPoint[0],\n y: 0,\n width: endPoint[0] - startPoint[0],\n height: size[1]\n });\n };\n /**\n * This action will be throttled.\n */\n SliderZoomView.prototype._dispatchZoomAction = function (realtime) {\n var range = this._range;\n this.api.dispatchAction({\n type: 'dataZoom',\n from: this.uid,\n dataZoomId: this.dataZoomModel.id,\n animation: realtime ? REALTIME_ANIMATION_CONFIG : null,\n start: range[0],\n end: range[1]\n });\n };\n SliderZoomView.prototype._findCoordRect = function () {\n // Find the grid corresponding to the first axis referred by dataZoom.\n var rect;\n var coordSysInfoList = collectReferCoordSysModelInfo(this.dataZoomModel).infoList;\n if (!rect && coordSysInfoList.length) {\n var coordSys = coordSysInfoList[0].model.coordinateSystem;\n rect = coordSys.getRect && coordSys.getRect();\n }\n if (!rect) {\n var width = this.api.getWidth();\n var height = this.api.getHeight();\n rect = {\n x: width * 0.2,\n y: height * 0.2,\n width: width * 0.6,\n height: height * 0.6\n };\n }\n return rect;\n };\n SliderZoomView.type = 'dataZoom.slider';\n return SliderZoomView;\n}(DataZoomView);\nfunction getOtherDim(thisDim) {\n // FIXME\n // 这个逻辑和getOtherAxis里一致,但是写在这里是否不好\n var map = {\n x: 'y',\n y: 'x',\n radius: 'angle',\n angle: 'radius'\n };\n return map[thisDim];\n}\nfunction getCursor(orient) {\n return orient === 'vertical' ? 'ns-resize' : 'ew-resize';\n}\nexport default SliderZoomView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport SliderZoomModel from './SliderZoomModel.js';\nimport SliderZoomView from './SliderZoomView.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n registers.registerComponentModel(SliderZoomModel);\n registers.registerComponentView(SliderZoomView);\n installCommon(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installDataZoomInside } from './installDataZoomInside.js';\nimport { install as installDataZoomSlider } from './installDataZoomSlider.js';\nexport function install(registers) {\n use(installDataZoomInside);\n use(installDataZoomSlider);\n // Do not install './dataZoomSelect',\n // since it only work for toolbox dataZoom.\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * @file Visual mapping.\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport tokens from './tokens.js';\nvar visualDefault = {\n /**\n * @public\n */\n get: function (visualType, key, isCategory) {\n var value = zrUtil.clone((defaultOption[visualType] || {})[key]);\n return isCategory ? zrUtil.isArray(value) ? value[value.length - 1] : value : value;\n }\n};\nvar defaultOption = {\n color: {\n active: ['#006edd', '#e0ffff'],\n inactive: [tokens.color.transparent]\n },\n colorHue: {\n active: [0, 360],\n inactive: [0, 0]\n },\n colorSaturation: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n colorLightness: {\n active: [0.9, 0.5],\n inactive: [0, 0]\n },\n colorAlpha: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n opacity: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n symbol: {\n active: ['circle', 'roundRect', 'diamond'],\n inactive: ['none']\n },\n symbolSize: {\n active: [10, 50],\n inactive: [0, 0]\n }\n};\nexport default visualDefault;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport visualDefault from '../../visual/visualDefault.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport * as modelUtil from '../../util/model.js';\nimport * as numberUtil from '../../util/number.js';\nimport ComponentModel from '../../model/Component.js';\nimport tokens from '../../visual/tokens.js';\nvar mapVisual = VisualMapping.mapVisual;\nvar eachVisual = VisualMapping.eachVisual;\nvar isArray = zrUtil.isArray;\nvar each = zrUtil.each;\nvar asc = numberUtil.asc;\nvar linearMap = numberUtil.linearMap;\nvar VisualMapModel = /** @class */function (_super) {\n __extends(VisualMapModel, _super);\n function VisualMapModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = VisualMapModel.type;\n _this.stateList = ['inRange', 'outOfRange'];\n _this.replacableOptionKeys = ['inRange', 'outOfRange', 'target', 'controller', 'color'];\n _this.layoutMode = {\n type: 'box',\n ignoreSize: true\n };\n /**\n * [lowerBound, upperBound]\n */\n _this.dataBound = [-Infinity, Infinity];\n _this.targetVisuals = {};\n _this.controllerVisuals = {};\n return _this;\n }\n VisualMapModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n };\n /**\n * @protected\n */\n VisualMapModel.prototype.optionUpdated = function (newOption, isInit) {\n var thisOption = this.option;\n !isInit && visualSolution.replaceVisualOption(thisOption, newOption, this.replacableOptionKeys);\n this.textStyleModel = this.getModel('textStyle');\n this.resetItemSize();\n this.completeVisualOption();\n };\n /**\n * @protected\n */\n VisualMapModel.prototype.resetVisual = function (supplementVisualOption) {\n var stateList = this.stateList;\n supplementVisualOption = zrUtil.bind(supplementVisualOption, this);\n this.controllerVisuals = visualSolution.createVisualMappings(this.option.controller, stateList, supplementVisualOption);\n this.targetVisuals = visualSolution.createVisualMappings(this.option.target, stateList, supplementVisualOption);\n };\n /**\n * @public\n */\n VisualMapModel.prototype.getItemSymbol = function () {\n return null;\n };\n /**\n * @return An array of series indices.\n */\n VisualMapModel.prototype.getTargetSeriesIndices = function () {\n var optionSeriesId = this.option.seriesId;\n var optionSeriesIndex = this.option.seriesIndex;\n if (optionSeriesIndex == null && optionSeriesId == null) {\n optionSeriesIndex = 'all';\n }\n var seriesModels = modelUtil.queryReferringComponents(this.ecModel, 'series', {\n index: optionSeriesIndex,\n id: optionSeriesId\n }, {\n useDefault: false,\n enableAll: true,\n enableNone: false\n }).models;\n return zrUtil.map(seriesModels, function (seriesModel) {\n return seriesModel.componentIndex;\n });\n };\n /**\n * @public\n */\n VisualMapModel.prototype.eachTargetSeries = function (callback, context) {\n zrUtil.each(this.getTargetSeriesIndices(), function (seriesIndex) {\n var seriesModel = this.ecModel.getSeriesByIndex(seriesIndex);\n if (seriesModel) {\n callback.call(context, seriesModel);\n }\n }, this);\n };\n /**\n * @pubilc\n */\n VisualMapModel.prototype.isTargetSeries = function (seriesModel) {\n var is = false;\n this.eachTargetSeries(function (model) {\n model === seriesModel && (is = true);\n });\n return is;\n };\n /**\n * @example\n * this.formatValueText(someVal); // format single numeric value to text.\n * this.formatValueText(someVal, true); // format single category value to text.\n * this.formatValueText([min, max]); // format numeric min-max to text.\n * this.formatValueText([this.dataBound[0], max]); // using data lower bound.\n * this.formatValueText([min, this.dataBound[1]]); // using data upper bound.\n *\n * @param value Real value, or this.dataBound[0 or 1].\n * @param isCategory Only available when value is number.\n * @param edgeSymbols Open-close symbol when value is interval.\n * @protected\n */\n VisualMapModel.prototype.formatValueText = function (value, isCategory, edgeSymbols) {\n var option = this.option;\n var precision = option.precision;\n var dataBound = this.dataBound;\n var formatter = option.formatter;\n var isMinMax;\n edgeSymbols = edgeSymbols || ['<', '>'];\n if (zrUtil.isArray(value)) {\n value = value.slice();\n isMinMax = true;\n }\n var textValue = isCategory ? value // Value is string when isCategory\n : isMinMax ? [toFixed(value[0]), toFixed(value[1])] : toFixed(value);\n if (zrUtil.isString(formatter)) {\n return formatter.replace('{value}', isMinMax ? textValue[0] : textValue).replace('{value2}', isMinMax ? textValue[1] : textValue);\n } else if (zrUtil.isFunction(formatter)) {\n return isMinMax ? formatter(value[0], value[1]) : formatter(value);\n }\n if (isMinMax) {\n if (value[0] === dataBound[0]) {\n return edgeSymbols[0] + ' ' + textValue[1];\n } else if (value[1] === dataBound[1]) {\n return edgeSymbols[1] + ' ' + textValue[0];\n } else {\n return textValue[0] + ' - ' + textValue[1];\n }\n } else {\n // Format single value (includes category case).\n return textValue;\n }\n function toFixed(val) {\n return val === dataBound[0] ? 'min' : val === dataBound[1] ? 'max' : (+val).toFixed(Math.min(precision, 20));\n }\n };\n /**\n * @protected\n */\n VisualMapModel.prototype.resetExtent = function () {\n var thisOption = this.option;\n // Can not calculate data extent by data here.\n // Because series and data may be modified in processing stage.\n // So we do not support the feature \"auto min/max\".\n var extent = asc([thisOption.min, thisOption.max]);\n this._dataExtent = extent;\n };\n /**\n * PENDING:\n * delete this method if no outer usage.\n *\n * Return Concrete dimension. If null/undefined is returned, no dimension is used.\n */\n // getDataDimension(data: SeriesData) {\n // const optDim = this.option.dimension;\n // if (optDim != null) {\n // return data.getDimension(optDim);\n // }\n // const dimNames = data.dimensions;\n // for (let i = dimNames.length - 1; i >= 0; i--) {\n // const dimName = dimNames[i];\n // const dimInfo = data.getDimensionInfo(dimName);\n // if (!dimInfo.isCalculationCoord) {\n // return dimName;\n // }\n // }\n // }\n VisualMapModel.prototype.getDataDimensionIndex = function (data) {\n var optDim = this.option.dimension;\n if (optDim != null) {\n return data.getDimensionIndex(optDim);\n }\n var dimNames = data.dimensions;\n for (var i = dimNames.length - 1; i >= 0; i--) {\n var dimName = dimNames[i];\n var dimInfo = data.getDimensionInfo(dimName);\n if (!dimInfo.isCalculationCoord) {\n return dimInfo.storeDimIndex;\n }\n }\n };\n VisualMapModel.prototype.getExtent = function () {\n return this._dataExtent.slice();\n };\n VisualMapModel.prototype.completeVisualOption = function () {\n var ecModel = this.ecModel;\n var thisOption = this.option;\n var base = {\n inRange: thisOption.inRange,\n outOfRange: thisOption.outOfRange\n };\n var target = thisOption.target || (thisOption.target = {});\n var controller = thisOption.controller || (thisOption.controller = {});\n zrUtil.merge(target, base); // Do not override\n zrUtil.merge(controller, base); // Do not override\n var isCategory = this.isCategory();\n completeSingle.call(this, target);\n completeSingle.call(this, controller);\n completeInactive.call(this, target, 'inRange', 'outOfRange');\n // completeInactive.call(this, target, 'outOfRange', 'inRange');\n completeController.call(this, controller);\n function completeSingle(base) {\n // Compatible with ec2 dataRange.color.\n // The mapping order of dataRange.color is: [high value, ..., low value]\n // whereas inRange.color and outOfRange.color is [low value, ..., high value]\n // Notice: ec2 has no inverse.\n if (isArray(thisOption.color)\n // If there has been inRange: {symbol: ...}, adding color is a mistake.\n // So adding color only when no inRange defined.\n && !base.inRange) {\n base.inRange = {\n color: thisOption.color.slice().reverse()\n };\n }\n // Compatible with previous logic, always give a default color, otherwise\n // simple config with no inRange and outOfRange will not work.\n // Originally we use visualMap.color as the default color, but setOption at\n // the second time the default color will be erased. So we change to use\n // constant DEFAULT_COLOR.\n // If user do not want the default color, set inRange: {color: null}.\n base.inRange = base.inRange || {\n color: ecModel.get('gradientColor')\n };\n }\n function completeInactive(base, stateExist, stateAbsent) {\n var optExist = base[stateExist];\n var optAbsent = base[stateAbsent];\n if (optExist && !optAbsent) {\n optAbsent = base[stateAbsent] = {};\n each(optExist, function (visualData, visualType) {\n if (!VisualMapping.isValidType(visualType)) {\n return;\n }\n var defa = visualDefault.get(visualType, 'inactive', isCategory);\n if (defa != null) {\n optAbsent[visualType] = defa;\n // Compatibable with ec2:\n // Only inactive color to rgba(0,0,0,0) can not\n // make label transparent, so use opacity also.\n if (visualType === 'color' && !optAbsent.hasOwnProperty('opacity') && !optAbsent.hasOwnProperty('colorAlpha')) {\n optAbsent.opacity = [0, 0];\n }\n }\n });\n }\n }\n function completeController(controller) {\n var symbolExists = (controller.inRange || {}).symbol || (controller.outOfRange || {}).symbol;\n var symbolSizeExists = (controller.inRange || {}).symbolSize || (controller.outOfRange || {}).symbolSize;\n var inactiveColor = this.get('inactiveColor');\n var itemSymbol = this.getItemSymbol();\n var defaultSymbol = itemSymbol || 'roundRect';\n each(this.stateList, function (state) {\n var itemSize = this.itemSize;\n var visuals = controller[state];\n // Set inactive color for controller if no other color\n // attr (like colorAlpha) specified.\n if (!visuals) {\n visuals = controller[state] = {\n color: isCategory ? inactiveColor : [inactiveColor]\n };\n }\n // Consistent symbol and symbolSize if not specified.\n if (visuals.symbol == null) {\n visuals.symbol = symbolExists && zrUtil.clone(symbolExists) || (isCategory ? defaultSymbol : [defaultSymbol]);\n }\n if (visuals.symbolSize == null) {\n visuals.symbolSize = symbolSizeExists && zrUtil.clone(symbolSizeExists) || (isCategory ? itemSize[0] : [itemSize[0], itemSize[0]]);\n }\n // Filter none\n visuals.symbol = mapVisual(visuals.symbol, function (symbol) {\n return symbol === 'none' ? defaultSymbol : symbol;\n });\n // Normalize symbolSize\n var symbolSize = visuals.symbolSize;\n if (symbolSize != null) {\n var max_1 = -Infinity;\n // symbolSize can be object when categories defined.\n eachVisual(symbolSize, function (value) {\n value > max_1 && (max_1 = value);\n });\n visuals.symbolSize = mapVisual(symbolSize, function (value) {\n return linearMap(value, [0, max_1], [0, itemSize[0]], true);\n });\n }\n }, this);\n }\n };\n VisualMapModel.prototype.resetItemSize = function () {\n this.itemSize = [parseFloat(this.get('itemWidth')), parseFloat(this.get('itemHeight'))];\n };\n VisualMapModel.prototype.isCategory = function () {\n return !!this.option.categories;\n };\n /**\n * @public\n * @abstract\n */\n VisualMapModel.prototype.setSelected = function (selected) {};\n VisualMapModel.prototype.getSelected = function () {\n return null;\n };\n /**\n * @public\n * @abstract\n */\n VisualMapModel.prototype.getValueState = function (value) {\n return null;\n };\n /**\n * FIXME\n * Do not publish to thirt-part-dev temporarily\n * util the interface is stable. (Should it return\n * a function but not visual meta?)\n *\n * @pubilc\n * @abstract\n * @param getColorVisual\n * params: value, valueState\n * return: color\n * @return {Object} visualMeta\n * should includes {stops, outerColors}\n * outerColor means [colorBeyondMinValue, colorBeyondMaxValue]\n */\n VisualMapModel.prototype.getVisualMeta = function (getColorVisual) {\n return null;\n };\n VisualMapModel.type = 'visualMap';\n VisualMapModel.dependencies = ['series'];\n VisualMapModel.defaultOption = {\n show: true,\n // zlevel: 0,\n z: 4,\n // seriesIndex: 'all',\n min: 0,\n max: 200,\n left: 0,\n right: null,\n top: null,\n bottom: 0,\n itemWidth: null,\n itemHeight: null,\n inverse: false,\n orient: 'vertical',\n backgroundColor: tokens.color.transparent,\n borderColor: tokens.color.borderTint,\n contentColor: tokens.color.theme[0],\n inactiveColor: tokens.color.disabled,\n borderWidth: 0,\n padding: tokens.size.m,\n // 接受数组分别设定上右下左边距,同css\n textGap: 10,\n precision: 0,\n textStyle: {\n color: tokens.color.secondary // 值域文字颜色\n }\n };\n return VisualMapModel;\n}(ComponentModel);\nexport default VisualMapModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapModel from './VisualMapModel.js';\nimport * as numberUtil from '../../util/number.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nimport tokens from '../../visual/tokens.js';\n// Constant\nvar DEFAULT_BAR_BOUND = [20, 140];\nvar ContinuousModel = /** @class */function (_super) {\n __extends(ContinuousModel, _super);\n function ContinuousModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ContinuousModel.type;\n return _this;\n }\n /**\n * @override\n */\n ContinuousModel.prototype.optionUpdated = function (newOption, isInit) {\n _super.prototype.optionUpdated.apply(this, arguments);\n this.resetExtent();\n this.resetVisual(function (mappingOption) {\n mappingOption.mappingMethod = 'linear';\n mappingOption.dataExtent = this.getExtent();\n });\n this._resetRange();\n };\n /**\n * @protected\n * @override\n */\n ContinuousModel.prototype.resetItemSize = function () {\n _super.prototype.resetItemSize.apply(this, arguments);\n var itemSize = this.itemSize;\n (itemSize[0] == null || isNaN(itemSize[0])) && (itemSize[0] = DEFAULT_BAR_BOUND[0]);\n (itemSize[1] == null || isNaN(itemSize[1])) && (itemSize[1] = DEFAULT_BAR_BOUND[1]);\n };\n /**\n * @private\n */\n ContinuousModel.prototype._resetRange = function () {\n var dataExtent = this.getExtent();\n var range = this.option.range;\n if (!range || range.auto) {\n // `range` should always be array (so we don't use other\n // value like 'auto') for user-friend. (consider getOption).\n dataExtent.auto = 1;\n this.option.range = dataExtent;\n } else if (zrUtil.isArray(range)) {\n if (range[0] > range[1]) {\n range.reverse();\n }\n range[0] = Math.max(range[0], dataExtent[0]);\n range[1] = Math.min(range[1], dataExtent[1]);\n }\n };\n /**\n * @protected\n * @override\n */\n ContinuousModel.prototype.completeVisualOption = function () {\n _super.prototype.completeVisualOption.apply(this, arguments);\n zrUtil.each(this.stateList, function (state) {\n var symbolSize = this.option.controller[state].symbolSize;\n if (symbolSize && symbolSize[0] !== symbolSize[1]) {\n symbolSize[0] = symbolSize[1] / 3; // For good looking.\n }\n }, this);\n };\n /**\n * @override\n */\n ContinuousModel.prototype.setSelected = function (selected) {\n this.option.range = selected.slice();\n this._resetRange();\n };\n /**\n * @public\n */\n ContinuousModel.prototype.getSelected = function () {\n var dataExtent = this.getExtent();\n var dataInterval = numberUtil.asc((this.get('range') || []).slice());\n // Clamp\n dataInterval[0] > dataExtent[1] && (dataInterval[0] = dataExtent[1]);\n dataInterval[1] > dataExtent[1] && (dataInterval[1] = dataExtent[1]);\n dataInterval[0] < dataExtent[0] && (dataInterval[0] = dataExtent[0]);\n dataInterval[1] < dataExtent[0] && (dataInterval[1] = dataExtent[0]);\n return dataInterval;\n };\n /**\n * @override\n */\n ContinuousModel.prototype.getValueState = function (value) {\n var range = this.option.range;\n var dataExtent = this.getExtent();\n var unboundedRange = zrUtil.retrieve2(this.option.unboundedRange, true);\n return (unboundedRange && range[0] <= dataExtent[0] || range[0] <= value) && (unboundedRange && range[1] >= dataExtent[1] || value <= range[1]) ? 'inRange' : 'outOfRange';\n };\n ContinuousModel.prototype.findTargetDataIndices = function (range) {\n var result = [];\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n data.each(this.getDataDimensionIndex(data), function (value, dataIndex) {\n range[0] <= value && value <= range[1] && dataIndices.push(dataIndex);\n }, this);\n result.push({\n seriesId: seriesModel.id,\n dataIndex: dataIndices\n });\n }, this);\n return result;\n };\n /**\n * @implement\n */\n ContinuousModel.prototype.getVisualMeta = function (getColorVisual) {\n var oVals = getColorStopValues(this, 'outOfRange', this.getExtent());\n var iVals = getColorStopValues(this, 'inRange', this.option.range.slice());\n var stops = [];\n function setStop(value, valueState) {\n stops.push({\n value: value,\n color: getColorVisual(value, valueState)\n });\n }\n // Format to: outOfRange -- inRange -- outOfRange.\n var iIdx = 0;\n var oIdx = 0;\n var iLen = iVals.length;\n var oLen = oVals.length;\n for (; oIdx < oLen && (!iVals.length || oVals[oIdx] <= iVals[0]); oIdx++) {\n // If oVal[oIdx] === iVals[iIdx], oVal[oIdx] should be ignored.\n if (oVals[oIdx] < iVals[iIdx]) {\n setStop(oVals[oIdx], 'outOfRange');\n }\n }\n for (var first = 1; iIdx < iLen; iIdx++, first = 0) {\n // If range is full, value beyond min, max will be clamped.\n // make a singularity\n first && stops.length && setStop(iVals[iIdx], 'outOfRange');\n setStop(iVals[iIdx], 'inRange');\n }\n for (var first = 1; oIdx < oLen; oIdx++) {\n if (!iVals.length || iVals[iVals.length - 1] < oVals[oIdx]) {\n // make a singularity\n if (first) {\n stops.length && setStop(stops[stops.length - 1].value, 'outOfRange');\n first = 0;\n }\n setStop(oVals[oIdx], 'outOfRange');\n }\n }\n var stopsLen = stops.length;\n return {\n stops: stops,\n outerColors: [stopsLen ? stops[0].color : 'transparent', stopsLen ? stops[stopsLen - 1].color : 'transparent']\n };\n };\n ContinuousModel.type = 'visualMap.continuous';\n ContinuousModel.defaultOption = inheritDefaultOption(VisualMapModel.defaultOption, {\n align: 'auto',\n calculable: false,\n hoverLink: true,\n realtime: true,\n handleIcon: 'path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z',\n handleSize: '120%',\n handleStyle: {\n borderColor: tokens.color.neutral00,\n borderWidth: 1\n },\n indicatorIcon: 'circle',\n indicatorSize: '50%',\n indicatorStyle: {\n borderColor: tokens.color.neutral00,\n borderWidth: 2,\n shadowBlur: 2,\n shadowOffsetX: 1,\n shadowOffsetY: 1,\n shadowColor: tokens.color.shadow\n }\n // emphasis: {\n // handleStyle: {\n // shadowBlur: 3,\n // shadowOffsetX: 1,\n // shadowOffsetY: 1,\n // shadowColor: tokens.color.shadow\n // }\n // }\n });\n return ContinuousModel;\n}(VisualMapModel);\nfunction getColorStopValues(visualMapModel, valueState, dataExtent) {\n if (dataExtent[0] === dataExtent[1]) {\n return dataExtent.slice();\n }\n // When using colorHue mapping, it is not linear color any more.\n // Moreover, canvas gradient seems not to be accurate linear.\n // FIXME\n // Should be arbitrary value 100? or based on pixel size?\n var count = 200;\n var step = (dataExtent[1] - dataExtent[0]) / count;\n var value = dataExtent[0];\n var stopValues = [];\n for (var i = 0; i <= count && value < dataExtent[1]; i++) {\n stopValues.push(value);\n value += step;\n }\n stopValues.push(dataExtent[1]);\n return stopValues;\n}\nexport default ContinuousModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { Rect } from '../../util/graphic.js';\nimport * as formatUtil from '../../util/format.js';\nimport * as layout from '../../util/layout.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport ComponentView from '../../view/Component.js';\nvar VisualMapView = /** @class */function (_super) {\n __extends(VisualMapView, _super);\n function VisualMapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = VisualMapView.type;\n _this.autoPositionValues = {\n left: 1,\n right: 1,\n top: 1,\n bottom: 1\n };\n return _this;\n }\n VisualMapView.prototype.init = function (ecModel, api) {\n this.ecModel = ecModel;\n this.api = api;\n };\n /**\n * @protected\n */\n VisualMapView.prototype.render = function (visualMapModel, ecModel, api, payload // TODO: TYPE\n ) {\n this.visualMapModel = visualMapModel;\n if (visualMapModel.get('show') === false) {\n this.group.removeAll();\n return;\n }\n this.doRender(visualMapModel, ecModel, api, payload);\n };\n /**\n * @protected\n */\n VisualMapView.prototype.renderBackground = function (group) {\n var visualMapModel = this.visualMapModel;\n var padding = formatUtil.normalizeCssArray(visualMapModel.get('padding') || 0);\n var rect = group.getBoundingRect();\n group.add(new Rect({\n z2: -1,\n silent: true,\n shape: {\n x: rect.x - padding[3],\n y: rect.y - padding[0],\n width: rect.width + padding[3] + padding[1],\n height: rect.height + padding[0] + padding[2]\n },\n style: {\n fill: visualMapModel.get('backgroundColor'),\n stroke: visualMapModel.get('borderColor'),\n lineWidth: visualMapModel.get('borderWidth')\n }\n }));\n };\n /**\n * @protected\n * @param targetValue can be Infinity or -Infinity\n * @param visualCluster Only can be 'color' 'opacity' 'symbol' 'symbolSize'\n * @param opts\n * @param opts.forceState Specify state, instead of using getValueState method.\n * @param opts.convertOpacityToAlpha For color gradient in controller widget.\n * @return {*} Visual value.\n */\n VisualMapView.prototype.getControllerVisual = function (targetValue, visualCluster, opts) {\n opts = opts || {};\n var forceState = opts.forceState;\n var visualMapModel = this.visualMapModel;\n var visualObj = {};\n // Default values.\n if (visualCluster === 'color') {\n var defaultColor = visualMapModel.get('contentColor');\n visualObj.color = defaultColor;\n }\n function getter(key) {\n return visualObj[key];\n }\n function setter(key, value) {\n visualObj[key] = value;\n }\n var mappings = visualMapModel.controllerVisuals[forceState || visualMapModel.getValueState(targetValue)];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n zrUtil.each(visualTypes, function (type) {\n var visualMapping = mappings[type];\n if (opts.convertOpacityToAlpha && type === 'opacity') {\n type = 'colorAlpha';\n visualMapping = mappings.__alphaForOpacity;\n }\n if (VisualMapping.dependsOn(type, visualCluster)) {\n visualMapping && visualMapping.applyVisual(targetValue, getter, setter);\n }\n });\n return visualObj[visualCluster];\n };\n VisualMapView.prototype.positionGroup = function (group) {\n var model = this.visualMapModel;\n var api = this.api;\n var refContainer = layout.createBoxLayoutReference(model, api).refContainer;\n layout.positionElement(group, model.getBoxLayoutParams(), refContainer);\n };\n VisualMapView.prototype.doRender = function (visualMapModel, ecModel, api, payload) {};\n VisualMapView.type = 'visualMap';\n return VisualMapView;\n}(ComponentView);\nexport default VisualMapView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { getLayoutRect } from '../../util/layout.js';\nvar paramsSet = [['left', 'right', 'width'], ['top', 'bottom', 'height']];\n/**\n * @param visualMapModel\n * @param api\n * @param itemSize always [short, long]\n * @return {string} 'left' or 'right' or 'top' or 'bottom'\n */\nexport function getItemAlign(visualMapModel, api, itemSize) {\n var modelOption = visualMapModel.option;\n var itemAlign = modelOption.align;\n if (itemAlign != null && itemAlign !== 'auto') {\n return itemAlign;\n }\n // Auto decision align.\n var ecSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var realIndex = modelOption.orient === 'horizontal' ? 1 : 0;\n var reals = paramsSet[realIndex];\n var fakeValue = [0, null, 10];\n var layoutInput = {};\n for (var i = 0; i < 3; i++) {\n layoutInput[paramsSet[1 - realIndex][i]] = fakeValue[i];\n layoutInput[reals[i]] = i === 2 ? itemSize[0] : modelOption[reals[i]];\n }\n var rParam = [['x', 'width', 3], ['y', 'height', 0]][realIndex];\n var rect = getLayoutRect(layoutInput, ecSize, modelOption.padding);\n return reals[(rect.margin[rParam[2]] || 0) + rect[rParam[0]] + rect[rParam[1]] * 0.5 < ecSize[rParam[1]] * 0.5 ? 0 : 1];\n}\n/**\n * Prepare dataIndex for outside usage, where dataIndex means rawIndex, and\n * dataIndexInside means filtered index.\n */\n// TODO: TYPE more specified payload types.\nexport function makeHighDownBatch(batch, visualMapModel) {\n zrUtil.each(batch || [], function (batchItem) {\n if (batchItem.dataIndex != null) {\n batchItem.dataIndexInside = batchItem.dataIndex;\n batchItem.dataIndex = null;\n }\n batchItem.highlightKey = 'visualMap' + (visualMapModel ? visualMapModel.componentIndex : '');\n });\n return batch;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport LinearGradient from 'zrender/lib/graphic/LinearGradient.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport VisualMapView from './VisualMapView.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as numberUtil from '../../util/number.js';\nimport sliderMove from '../helper/sliderMove.js';\nimport * as helper from './helper.js';\nimport * as modelUtil from '../../util/model.js';\nimport { parsePercent } from 'zrender/lib/contain/text.js';\nimport { setAsHighDownDispatcher } from '../../util/states.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { findEventDispatcher } from '../../util/event.js';\nvar linearMap = numberUtil.linearMap;\nvar each = zrUtil.each;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\n// Arbitrary value\nvar HOVER_LINK_SIZE = 12;\nvar HOVER_LINK_OUT = 6;\n// Notice:\n// Any \"interval\" should be by the order of [low, high].\n// \"handle0\" (handleIndex === 0) maps to\n// low data value: this._dataInterval[0] and has low coord.\n// \"handle1\" (handleIndex === 1) maps to\n// high data value: this._dataInterval[1] and has high coord.\n// The logic of transform is implemented in this._createBarGroup.\nvar ContinuousView = /** @class */function (_super) {\n __extends(ContinuousView, _super);\n function ContinuousView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ContinuousView.type;\n _this._shapes = {};\n _this._dataInterval = [];\n _this._handleEnds = [];\n _this._hoverLinkDataIndices = [];\n return _this;\n }\n ContinuousView.prototype.init = function (ecModel, api) {\n _super.prototype.init.call(this, ecModel, api);\n this._hoverLinkFromSeriesMouseOver = zrUtil.bind(this._hoverLinkFromSeriesMouseOver, this);\n this._hideIndicator = zrUtil.bind(this._hideIndicator, this);\n };\n ContinuousView.prototype.doRender = function (visualMapModel, ecModel, api, payload) {\n if (!payload || payload.type !== 'selectDataRange' || payload.from !== this.uid) {\n this._buildView();\n }\n };\n ContinuousView.prototype._buildView = function () {\n this.group.removeAll();\n var visualMapModel = this.visualMapModel;\n var thisGroup = this.group;\n this._orient = visualMapModel.get('orient');\n this._useHandle = visualMapModel.get('calculable');\n this._resetInterval();\n this._renderBar(thisGroup);\n var dataRangeText = visualMapModel.get('text');\n this._renderEndsText(thisGroup, dataRangeText, 0);\n this._renderEndsText(thisGroup, dataRangeText, 1);\n // Do this for background size calculation.\n this._updateView(true);\n // After updating view, inner shapes is built completely,\n // and then background can be rendered.\n this.renderBackground(thisGroup);\n // Real update view\n this._updateView();\n this._enableHoverLinkToSeries();\n this._enableHoverLinkFromSeries();\n this.positionGroup(thisGroup);\n };\n ContinuousView.prototype._renderEndsText = function (group, dataRangeText, endsIndex) {\n if (!dataRangeText) {\n return;\n }\n // Compatible with ec2, text[0] map to high value, text[1] map low value.\n var text = dataRangeText[1 - endsIndex];\n text = text != null ? text + '' : '';\n var visualMapModel = this.visualMapModel;\n var textGap = visualMapModel.get('textGap');\n var itemSize = visualMapModel.itemSize;\n var barGroup = this._shapes.mainGroup;\n var position = this._applyTransform([itemSize[0] / 2, endsIndex === 0 ? -textGap : itemSize[1] + textGap], barGroup);\n var align = this._applyTransform(endsIndex === 0 ? 'bottom' : 'top', barGroup);\n var orient = this._orient;\n var textStyleModel = this.visualMapModel.textStyleModel;\n this.group.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n x: position[0],\n y: position[1],\n verticalAlign: textStyleModel.get('verticalAlign') || (orient === 'horizontal' ? 'middle' : align),\n align: textStyleModel.get('align') || (orient === 'horizontal' ? align : 'center'),\n text: text\n })\n }));\n };\n ContinuousView.prototype._renderBar = function (targetGroup) {\n var visualMapModel = this.visualMapModel;\n var shapes = this._shapes;\n var itemSize = visualMapModel.itemSize;\n var orient = this._orient;\n var useHandle = this._useHandle;\n var itemAlign = helper.getItemAlign(visualMapModel, this.api, itemSize);\n var mainGroup = shapes.mainGroup = this._createBarGroup(itemAlign);\n var gradientBarGroup = new graphic.Group();\n mainGroup.add(gradientBarGroup);\n // Bar\n gradientBarGroup.add(shapes.outOfRange = createPolygon());\n gradientBarGroup.add(shapes.inRange = createPolygon(null, useHandle ? getCursor(this._orient) : null, zrUtil.bind(this._dragHandle, this, 'all', false), zrUtil.bind(this._dragHandle, this, 'all', true)));\n // A border radius clip.\n gradientBarGroup.setClipPath(new graphic.Rect({\n shape: {\n x: 0,\n y: 0,\n width: itemSize[0],\n height: itemSize[1],\n r: 3\n }\n }));\n var textRect = visualMapModel.textStyleModel.getTextRect('国');\n var textSize = mathMax(textRect.width, textRect.height);\n // Handle\n if (useHandle) {\n shapes.handleThumbs = [];\n shapes.handleLabels = [];\n shapes.handleLabelPoints = [];\n this._createHandle(visualMapModel, mainGroup, 0, itemSize, textSize, orient);\n this._createHandle(visualMapModel, mainGroup, 1, itemSize, textSize, orient);\n }\n this._createIndicator(visualMapModel, mainGroup, itemSize, textSize, orient);\n targetGroup.add(mainGroup);\n };\n ContinuousView.prototype._createHandle = function (visualMapModel, mainGroup, handleIndex, itemSize, textSize, orient) {\n var onDrift = zrUtil.bind(this._dragHandle, this, handleIndex, false);\n var onDragEnd = zrUtil.bind(this._dragHandle, this, handleIndex, true);\n var handleSize = parsePercent(visualMapModel.get('handleSize'), itemSize[0]);\n var handleThumb = createSymbol(visualMapModel.get('handleIcon'), -handleSize / 2, -handleSize / 2, handleSize, handleSize, null, true);\n var cursor = getCursor(this._orient);\n handleThumb.attr({\n cursor: cursor,\n draggable: true,\n drift: onDrift,\n ondragend: onDragEnd,\n onmousemove: function (e) {\n eventTool.stop(e.event);\n }\n });\n handleThumb.x = itemSize[0] / 2;\n handleThumb.useStyle(visualMapModel.getModel('handleStyle').getItemStyle());\n handleThumb.setStyle({\n strokeNoScale: true,\n strokeFirst: true\n });\n handleThumb.style.lineWidth *= 2;\n handleThumb.ensureState('emphasis').style = visualMapModel.getModel(['emphasis', 'handleStyle']).getItemStyle();\n setAsHighDownDispatcher(handleThumb, true);\n mainGroup.add(handleThumb);\n // Text is always horizontal layout but should not be effected by\n // transform (orient/inverse). So label is built separately but not\n // use zrender/graphic/helper/RectText, and is located based on view\n // group (according to handleLabelPoint) but not barGroup.\n var textStyleModel = this.visualMapModel.textStyleModel;\n var handleLabel = new graphic.Text({\n cursor: cursor,\n draggable: true,\n drift: onDrift,\n onmousemove: function (e) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n ondragend: onDragEnd,\n style: createTextStyle(textStyleModel, {\n x: 0,\n y: 0,\n text: ''\n })\n });\n handleLabel.ensureState('blur').style = {\n opacity: 0.1\n };\n handleLabel.stateTransition = {\n duration: 200\n };\n this.group.add(handleLabel);\n var handleLabelPoint = [handleSize, 0];\n var shapes = this._shapes;\n shapes.handleThumbs[handleIndex] = handleThumb;\n shapes.handleLabelPoints[handleIndex] = handleLabelPoint;\n shapes.handleLabels[handleIndex] = handleLabel;\n };\n ContinuousView.prototype._createIndicator = function (visualMapModel, mainGroup, itemSize, textSize, orient) {\n var scale = parsePercent(visualMapModel.get('indicatorSize'), itemSize[0]);\n var indicator = createSymbol(visualMapModel.get('indicatorIcon'), -scale / 2, -scale / 2, scale, scale, null, true);\n indicator.attr({\n cursor: 'move',\n invisible: true,\n silent: true,\n x: itemSize[0] / 2\n });\n var indicatorStyle = visualMapModel.getModel('indicatorStyle').getItemStyle();\n if (indicator instanceof ZRImage) {\n var pathStyle = indicator.style;\n indicator.useStyle(zrUtil.extend({\n // TODO other properties like x, y ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, indicatorStyle));\n } else {\n indicator.useStyle(indicatorStyle);\n }\n mainGroup.add(indicator);\n var textStyleModel = this.visualMapModel.textStyleModel;\n var indicatorLabel = new graphic.Text({\n silent: true,\n invisible: true,\n style: createTextStyle(textStyleModel, {\n x: 0,\n y: 0,\n text: ''\n })\n });\n this.group.add(indicatorLabel);\n var indicatorLabelPoint = [(orient === 'horizontal' ? textSize / 2 : HOVER_LINK_OUT) + itemSize[0] / 2, 0];\n var shapes = this._shapes;\n shapes.indicator = indicator;\n shapes.indicatorLabel = indicatorLabel;\n shapes.indicatorLabelPoint = indicatorLabelPoint;\n this._firstShowIndicator = true;\n };\n ContinuousView.prototype._dragHandle = function (handleIndex, isEnd,\n // dx is event from ondragend if isEnd is true. It's not used\n dx, dy) {\n if (!this._useHandle) {\n return;\n }\n this._dragging = !isEnd;\n if (!isEnd) {\n // Transform dx, dy to bar coordination.\n var vertex = this._applyTransform([dx, dy], this._shapes.mainGroup, true);\n this._updateInterval(handleIndex, vertex[1]);\n this._hideIndicator();\n // Considering realtime, update view should be executed\n // before dispatch action.\n this._updateView();\n }\n // dragEnd do not dispatch action when realtime.\n if (isEnd === !this.visualMapModel.get('realtime')) {\n // jshint ignore:line\n this.api.dispatchAction({\n type: 'selectDataRange',\n from: this.uid,\n visualMapId: this.visualMapModel.id,\n selected: this._dataInterval.slice()\n });\n }\n if (isEnd) {\n !this._hovering && this._clearHoverLinkToSeries();\n } else if (useHoverLinkOnHandle(this.visualMapModel)) {\n this._doHoverLinkToSeries(this._handleEnds[handleIndex], false);\n }\n };\n ContinuousView.prototype._resetInterval = function () {\n var visualMapModel = this.visualMapModel;\n var dataInterval = this._dataInterval = visualMapModel.getSelected();\n var dataExtent = visualMapModel.getExtent();\n var sizeExtent = [0, visualMapModel.itemSize[1]];\n this._handleEnds = [linearMap(dataInterval[0], dataExtent, sizeExtent, true), linearMap(dataInterval[1], dataExtent, sizeExtent, true)];\n };\n /**\n * @private\n * @param {(number|string)} handleIndex 0 or 1 or 'all'\n * @param {number} dx\n * @param {number} dy\n */\n ContinuousView.prototype._updateInterval = function (handleIndex, delta) {\n delta = delta || 0;\n var visualMapModel = this.visualMapModel;\n var handleEnds = this._handleEnds;\n var sizeExtent = [0, visualMapModel.itemSize[1]];\n sliderMove(delta, handleEnds, sizeExtent, handleIndex,\n // cross is forbidden\n 0);\n var dataExtent = visualMapModel.getExtent();\n // Update data interval.\n this._dataInterval = [linearMap(handleEnds[0], sizeExtent, dataExtent, true), linearMap(handleEnds[1], sizeExtent, dataExtent, true)];\n };\n ContinuousView.prototype._updateView = function (forSketch) {\n var visualMapModel = this.visualMapModel;\n var dataExtent = visualMapModel.getExtent();\n var shapes = this._shapes;\n var outOfRangeHandleEnds = [0, visualMapModel.itemSize[1]];\n var inRangeHandleEnds = forSketch ? outOfRangeHandleEnds : this._handleEnds;\n var visualInRange = this._createBarVisual(this._dataInterval, dataExtent, inRangeHandleEnds, 'inRange');\n var visualOutOfRange = this._createBarVisual(dataExtent, dataExtent, outOfRangeHandleEnds, 'outOfRange');\n shapes.inRange.setStyle({\n fill: visualInRange.barColor\n // opacity: visualInRange.opacity\n }).setShape('points', visualInRange.barPoints);\n shapes.outOfRange.setStyle({\n fill: visualOutOfRange.barColor\n // opacity: visualOutOfRange.opacity\n }).setShape('points', visualOutOfRange.barPoints);\n this._updateHandle(inRangeHandleEnds, visualInRange);\n };\n ContinuousView.prototype._createBarVisual = function (dataInterval, dataExtent, handleEnds, forceState) {\n var opts = {\n forceState: forceState,\n convertOpacityToAlpha: true\n };\n var colorStops = this._makeColorGradient(dataInterval, opts);\n var symbolSizes = [this.getControllerVisual(dataInterval[0], 'symbolSize', opts), this.getControllerVisual(dataInterval[1], 'symbolSize', opts)];\n var barPoints = this._createBarPoints(handleEnds, symbolSizes);\n return {\n barColor: new LinearGradient(0, 0, 0, 1, colorStops),\n barPoints: barPoints,\n handlesColor: [colorStops[0].color, colorStops[colorStops.length - 1].color]\n };\n };\n ContinuousView.prototype._makeColorGradient = function (dataInterval, opts) {\n // Considering colorHue, which is not linear, so we have to sample\n // to calculate gradient color stops, but not only calculate head\n // and tail.\n var sampleNumber = 100; // Arbitrary value.\n var colorStops = [];\n var step = (dataInterval[1] - dataInterval[0]) / sampleNumber;\n colorStops.push({\n color: this.getControllerVisual(dataInterval[0], 'color', opts),\n offset: 0\n });\n for (var i = 1; i < sampleNumber; i++) {\n var currValue = dataInterval[0] + step * i;\n if (currValue > dataInterval[1]) {\n break;\n }\n colorStops.push({\n color: this.getControllerVisual(currValue, 'color', opts),\n offset: i / sampleNumber\n });\n }\n colorStops.push({\n color: this.getControllerVisual(dataInterval[1], 'color', opts),\n offset: 1\n });\n return colorStops;\n };\n ContinuousView.prototype._createBarPoints = function (handleEnds, symbolSizes) {\n var itemSize = this.visualMapModel.itemSize;\n return [[itemSize[0] - symbolSizes[0], handleEnds[0]], [itemSize[0], handleEnds[0]], [itemSize[0], handleEnds[1]], [itemSize[0] - symbolSizes[1], handleEnds[1]]];\n };\n ContinuousView.prototype._createBarGroup = function (itemAlign) {\n var orient = this._orient;\n var inverse = this.visualMapModel.get('inverse');\n return new graphic.Group(orient === 'horizontal' && !inverse ? {\n scaleX: itemAlign === 'bottom' ? 1 : -1,\n rotation: Math.PI / 2\n } : orient === 'horizontal' && inverse ? {\n scaleX: itemAlign === 'bottom' ? -1 : 1,\n rotation: -Math.PI / 2\n } : orient === 'vertical' && !inverse ? {\n scaleX: itemAlign === 'left' ? 1 : -1,\n scaleY: -1\n } : {\n scaleX: itemAlign === 'left' ? 1 : -1\n });\n };\n ContinuousView.prototype._updateHandle = function (handleEnds, visualInRange) {\n if (!this._useHandle) {\n return;\n }\n var shapes = this._shapes;\n var visualMapModel = this.visualMapModel;\n var handleThumbs = shapes.handleThumbs;\n var handleLabels = shapes.handleLabels;\n var itemSize = visualMapModel.itemSize;\n var dataExtent = visualMapModel.getExtent();\n var align = this._applyTransform('left', shapes.mainGroup);\n each([0, 1], function (handleIndex) {\n var handleThumb = handleThumbs[handleIndex];\n handleThumb.setStyle('fill', visualInRange.handlesColor[handleIndex]);\n handleThumb.y = handleEnds[handleIndex];\n var val = linearMap(handleEnds[handleIndex], [0, itemSize[1]], dataExtent, true);\n var symbolSize = this.getControllerVisual(val, 'symbolSize');\n handleThumb.scaleX = handleThumb.scaleY = symbolSize / itemSize[0];\n handleThumb.x = itemSize[0] - symbolSize / 2;\n // Update handle label position.\n var textPoint = graphic.applyTransform(shapes.handleLabelPoints[handleIndex], graphic.getTransform(handleThumb, this.group));\n if (this._orient === 'horizontal') {\n // If visualMap controls symbol size, an additional offset needs to be added to labels to avoid collision at minimum size.\n // Offset reaches value of 0 at \"maximum\" position, so maximum position is not altered at all.\n var minimumOffset = align === 'left' || align === 'top' ? (itemSize[0] - symbolSize) / 2 : (itemSize[0] - symbolSize) / -2;\n textPoint[1] += minimumOffset;\n }\n handleLabels[handleIndex].setStyle({\n x: textPoint[0],\n y: textPoint[1],\n text: visualMapModel.formatValueText(this._dataInterval[handleIndex]),\n verticalAlign: 'middle',\n align: this._orient === 'vertical' ? this._applyTransform('left', shapes.mainGroup) : 'center'\n });\n }, this);\n };\n ContinuousView.prototype._showIndicator = function (cursorValue, textValue, rangeSymbol, halfHoverLinkSize) {\n var visualMapModel = this.visualMapModel;\n var dataExtent = visualMapModel.getExtent();\n var itemSize = visualMapModel.itemSize;\n var sizeExtent = [0, itemSize[1]];\n var shapes = this._shapes;\n var indicator = shapes.indicator;\n if (!indicator) {\n return;\n }\n indicator.attr('invisible', false);\n var opts = {\n convertOpacityToAlpha: true\n };\n var color = this.getControllerVisual(cursorValue, 'color', opts);\n var symbolSize = this.getControllerVisual(cursorValue, 'symbolSize');\n var y = linearMap(cursorValue, dataExtent, sizeExtent, true);\n var x = itemSize[0] - symbolSize / 2;\n var oldIndicatorPos = {\n x: indicator.x,\n y: indicator.y\n };\n // Update handle label position.\n indicator.y = y;\n indicator.x = x;\n var textPoint = graphic.applyTransform(shapes.indicatorLabelPoint, graphic.getTransform(indicator, this.group));\n var indicatorLabel = shapes.indicatorLabel;\n indicatorLabel.attr('invisible', false);\n var align = this._applyTransform('left', shapes.mainGroup);\n var orient = this._orient;\n var isHorizontal = orient === 'horizontal';\n indicatorLabel.setStyle({\n text: (rangeSymbol ? rangeSymbol : '') + visualMapModel.formatValueText(textValue),\n verticalAlign: isHorizontal ? align : 'middle',\n align: isHorizontal ? 'center' : align\n });\n var indicatorNewProps = {\n x: x,\n y: y,\n style: {\n fill: color\n }\n };\n var labelNewProps = {\n style: {\n x: textPoint[0],\n y: textPoint[1]\n }\n };\n if (visualMapModel.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {\n var animationCfg = {\n duration: 100,\n easing: 'cubicInOut',\n additive: true\n };\n indicator.x = oldIndicatorPos.x;\n indicator.y = oldIndicatorPos.y;\n indicator.animateTo(indicatorNewProps, animationCfg);\n indicatorLabel.animateTo(labelNewProps, animationCfg);\n } else {\n indicator.attr(indicatorNewProps);\n indicatorLabel.attr(labelNewProps);\n }\n this._firstShowIndicator = false;\n var handleLabels = this._shapes.handleLabels;\n if (handleLabels) {\n for (var i = 0; i < handleLabels.length; i++) {\n // Fade out handle labels.\n // NOTE: Must use api enter/leave on emphasis/blur/select state. Or the global states manager will change it.\n this.api.enterBlur(handleLabels[i]);\n }\n }\n };\n ContinuousView.prototype._enableHoverLinkToSeries = function () {\n var self = this;\n this._shapes.mainGroup.on('mousemove', function (e) {\n self._hovering = true;\n if (!self._dragging) {\n var itemSize = self.visualMapModel.itemSize;\n var pos = self._applyTransform([e.offsetX, e.offsetY], self._shapes.mainGroup, true, true);\n // For hover link show when hover handle, which might be\n // below or upper than sizeExtent.\n pos[1] = mathMin(mathMax(0, pos[1]), itemSize[1]);\n self._doHoverLinkToSeries(pos[1], 0 <= pos[0] && pos[0] <= itemSize[0]);\n }\n }).on('mouseout', function () {\n // When mouse is out of handle, hoverLink still need\n // to be displayed when realtime is set as false.\n self._hovering = false;\n !self._dragging && self._clearHoverLinkToSeries();\n });\n };\n ContinuousView.prototype._enableHoverLinkFromSeries = function () {\n var zr = this.api.getZr();\n if (this.visualMapModel.option.hoverLink) {\n zr.on('mouseover', this._hoverLinkFromSeriesMouseOver, this);\n zr.on('mouseout', this._hideIndicator, this);\n } else {\n this._clearHoverLinkFromSeries();\n }\n };\n ContinuousView.prototype._doHoverLinkToSeries = function (cursorPos, hoverOnBar) {\n var visualMapModel = this.visualMapModel;\n var itemSize = visualMapModel.itemSize;\n if (!visualMapModel.option.hoverLink) {\n return;\n }\n var sizeExtent = [0, itemSize[1]];\n var dataExtent = visualMapModel.getExtent();\n // For hover link show when hover handle, which might be below or upper than sizeExtent.\n cursorPos = mathMin(mathMax(sizeExtent[0], cursorPos), sizeExtent[1]);\n var halfHoverLinkSize = getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent);\n var hoverRange = [cursorPos - halfHoverLinkSize, cursorPos + halfHoverLinkSize];\n var cursorValue = linearMap(cursorPos, sizeExtent, dataExtent, true);\n var valueRange = [linearMap(hoverRange[0], sizeExtent, dataExtent, true), linearMap(hoverRange[1], sizeExtent, dataExtent, true)];\n // Consider data range is out of visualMap range, see test/visualMap-continuous.html,\n // where china and india has very large population.\n hoverRange[0] < sizeExtent[0] && (valueRange[0] = -Infinity);\n hoverRange[1] > sizeExtent[1] && (valueRange[1] = Infinity);\n // Do not show indicator when mouse is over handle,\n // otherwise labels overlap, especially when dragging.\n if (hoverOnBar) {\n if (valueRange[0] === -Infinity) {\n this._showIndicator(cursorValue, valueRange[1], '< ', halfHoverLinkSize);\n } else if (valueRange[1] === Infinity) {\n this._showIndicator(cursorValue, valueRange[0], '> ', halfHoverLinkSize);\n } else {\n this._showIndicator(cursorValue, cursorValue, '≈ ', halfHoverLinkSize);\n }\n }\n // When realtime is set as false, handles, which are in barGroup,\n // also trigger hoverLink, which help user to realize where they\n // focus on when dragging. (see test/heatmap-large.html)\n // When realtime is set as true, highlight will not show when hover\n // handle, because the label on handle, which displays a exact value\n // but not range, might mislead users.\n var oldBatch = this._hoverLinkDataIndices;\n var newBatch = [];\n if (hoverOnBar || useHoverLinkOnHandle(visualMapModel)) {\n newBatch = this._hoverLinkDataIndices = visualMapModel.findTargetDataIndices(valueRange);\n }\n var resultBatches = modelUtil.compressBatches(oldBatch, newBatch);\n this._dispatchHighDown('downplay', helper.makeHighDownBatch(resultBatches[0], visualMapModel));\n this._dispatchHighDown('highlight', helper.makeHighDownBatch(resultBatches[1], visualMapModel));\n };\n ContinuousView.prototype._hoverLinkFromSeriesMouseOver = function (e) {\n var ecData;\n findEventDispatcher(e.target, function (target) {\n var currECData = getECData(target);\n if (currECData.dataIndex != null) {\n ecData = currECData;\n return true;\n }\n }, true);\n if (!ecData) {\n return;\n }\n var dataModel = this.ecModel.getSeriesByIndex(ecData.seriesIndex);\n var visualMapModel = this.visualMapModel;\n if (!visualMapModel.isTargetSeries(dataModel)) {\n return;\n }\n var data = dataModel.getData(ecData.dataType);\n var value = data.getStore().get(visualMapModel.getDataDimensionIndex(data), ecData.dataIndex);\n if (!isNaN(value)) {\n this._showIndicator(value, value);\n }\n };\n ContinuousView.prototype._hideIndicator = function () {\n var shapes = this._shapes;\n shapes.indicator && shapes.indicator.attr('invisible', true);\n shapes.indicatorLabel && shapes.indicatorLabel.attr('invisible', true);\n var handleLabels = this._shapes.handleLabels;\n if (handleLabels) {\n for (var i = 0; i < handleLabels.length; i++) {\n // Fade out handle labels.\n // NOTE: Must use api enter/leave on emphasis/blur/select state. Or the global states manager will change it.\n this.api.leaveBlur(handleLabels[i]);\n }\n }\n };\n ContinuousView.prototype._clearHoverLinkToSeries = function () {\n this._hideIndicator();\n var indices = this._hoverLinkDataIndices;\n this._dispatchHighDown('downplay', helper.makeHighDownBatch(indices, this.visualMapModel));\n indices.length = 0;\n };\n ContinuousView.prototype._clearHoverLinkFromSeries = function () {\n this._hideIndicator();\n var zr = this.api.getZr();\n zr.off('mouseover', this._hoverLinkFromSeriesMouseOver);\n zr.off('mouseout', this._hideIndicator);\n };\n ContinuousView.prototype._applyTransform = function (vertex, element, inverse, global) {\n var transform = graphic.getTransform(element, global ? null : this.group);\n return zrUtil.isArray(vertex) ? graphic.applyTransform(vertex, transform, inverse) : graphic.transformDirection(vertex, transform, inverse);\n };\n // TODO: TYPE more specified payload types.\n ContinuousView.prototype._dispatchHighDown = function (type, batch) {\n batch && batch.length && this.api.dispatchAction({\n type: type,\n batch: batch\n });\n };\n /**\n * @override\n */\n ContinuousView.prototype.dispose = function () {\n this._clearHoverLinkFromSeries();\n this._clearHoverLinkToSeries();\n };\n ContinuousView.type = 'visualMap.continuous';\n return ContinuousView;\n}(VisualMapView);\nfunction createPolygon(points, cursor, onDrift, onDragEnd) {\n return new graphic.Polygon({\n shape: {\n points: points\n },\n draggable: !!onDrift,\n cursor: cursor,\n drift: onDrift,\n onmousemove: function (e) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n ondragend: onDragEnd\n });\n}\nfunction getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent) {\n var halfHoverLinkSize = HOVER_LINK_SIZE / 2;\n var hoverLinkDataSize = visualMapModel.get('hoverLinkDataSize');\n if (hoverLinkDataSize) {\n halfHoverLinkSize = linearMap(hoverLinkDataSize, dataExtent, sizeExtent, true) / 2;\n }\n return halfHoverLinkSize;\n}\nfunction useHoverLinkOnHandle(visualMapModel) {\n var hoverLinkOnHandle = visualMapModel.get('hoverLinkOnHandle');\n return !!(hoverLinkOnHandle == null ? visualMapModel.get('realtime') : hoverLinkOnHandle);\n}\nfunction getCursor(orient) {\n return orient === 'vertical' ? 'ns-resize' : 'ew-resize';\n}\nexport default ContinuousView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport var visualMapActionInfo = {\n type: 'selectDataRange',\n event: 'dataRangeSelected',\n // FIXME use updateView appears wrong\n update: 'update'\n};\nexport var visualMapActionHander = function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'visualMap',\n query: payload\n }, function (model) {\n model.setSelected(payload.selected);\n });\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nexport var visualMapEncodingHandlers = [{\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var resetDefines = [];\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n var pipelineContext = seriesModel.pipelineContext;\n if (!visualMapModel.isTargetSeries(seriesModel) || pipelineContext && pipelineContext.large) {\n return;\n }\n resetDefines.push(visualSolution.incrementalApplyVisual(visualMapModel.stateList, visualMapModel.targetVisuals, zrUtil.bind(visualMapModel.getValueState, visualMapModel), visualMapModel.getDataDimensionIndex(seriesModel.getData())));\n });\n return resetDefines;\n }\n},\n// Only support color.\n{\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n var visualMetaList = [];\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n if (visualMapModel.isTargetSeries(seriesModel)) {\n var visualMeta = visualMapModel.getVisualMeta(zrUtil.bind(getColorVisual, null, seriesModel, visualMapModel)) || {\n stops: [],\n outerColors: []\n };\n var dimIdx = visualMapModel.getDataDimensionIndex(data);\n if (dimIdx >= 0) {\n // visualMeta.dimension should be dimension index, but not concrete dimension.\n visualMeta.dimension = dimIdx;\n visualMetaList.push(visualMeta);\n }\n }\n });\n // console.log(JSON.stringify(visualMetaList.map(a => a.stops)));\n seriesModel.getData().setVisual('visualMeta', visualMetaList);\n }\n}];\n// FIXME\n// performance and export for heatmap?\n// value can be Infinity or -Infinity\nfunction getColorVisual(seriesModel, visualMapModel, value, valueState) {\n var mappings = visualMapModel.targetVisuals[valueState];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n var resultVisual = {\n color: getVisualFromData(seriesModel.getData(), 'color') // default color.\n };\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n var mapping = mappings[type === 'opacity' ? '__alphaForOpacity' : type];\n mapping && mapping.applyVisual(value, getVisual, setVisual);\n }\n return resultVisual.color;\n function getVisual(key) {\n return resultVisual[key];\n }\n function setVisual(key, value) {\n resultVisual[key] = value;\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar each = zrUtil.each;\nexport default function visualMapPreprocessor(option) {\n var visualMap = option && option.visualMap;\n if (!zrUtil.isArray(visualMap)) {\n visualMap = visualMap ? [visualMap] : [];\n }\n each(visualMap, function (opt) {\n if (!opt) {\n return;\n }\n // rename splitList to pieces\n if (has(opt, 'splitList') && !has(opt, 'pieces')) {\n opt.pieces = opt.splitList;\n delete opt.splitList;\n }\n var pieces = opt.pieces;\n if (pieces && zrUtil.isArray(pieces)) {\n each(pieces, function (piece) {\n if (zrUtil.isObject(piece)) {\n if (has(piece, 'start') && !has(piece, 'min')) {\n piece.min = piece.start;\n }\n if (has(piece, 'end') && !has(piece, 'max')) {\n piece.max = piece.end;\n }\n }\n });\n }\n });\n}\nfunction has(obj, name) {\n return obj && obj.hasOwnProperty && obj.hasOwnProperty(name);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { visualMapActionInfo, visualMapActionHander } from './visualMapAction.js';\nimport { visualMapEncodingHandlers } from './visualEncoding.js';\nimport { each } from 'zrender/lib/core/util.js';\nimport preprocessor from './preprocessor.js';\nvar installed = false;\nexport default function installCommon(registers) {\n if (installed) {\n return;\n }\n installed = true;\n registers.registerSubTypeDefaulter('visualMap', function (option) {\n // Compatible with ec2, when splitNumber === 0, continuous visualMap will be used.\n return !option.categories && (!(option.pieces ? option.pieces.length > 0 : option.splitNumber > 0) || option.calculable) ? 'continuous' : 'piecewise';\n });\n registers.registerAction(visualMapActionInfo, visualMapActionHander);\n each(visualMapEncodingHandlers, function (handler) {\n registers.registerVisual(registers.PRIORITY.VISUAL.COMPONENT, handler);\n });\n registers.registerPreprocessor(preprocessor);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport ContinuousModel from './ContinuousModel.js';\nimport ContinuousView from './ContinuousView.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n registers.registerComponentModel(ContinuousModel);\n registers.registerComponentView(ContinuousView);\n installCommon(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapModel from './VisualMapModel.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport visualDefault from '../../visual/visualDefault.js';\nimport { reformIntervals } from '../../util/number.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar PiecewiseModel = /** @class */function (_super) {\n __extends(PiecewiseModel, _super);\n function PiecewiseModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PiecewiseModel.type;\n /**\n * The order is always [low, ..., high].\n * [{text: string, interval: Array.<number>}, ...]\n */\n _this._pieceList = [];\n return _this;\n }\n PiecewiseModel.prototype.optionUpdated = function (newOption, isInit) {\n _super.prototype.optionUpdated.apply(this, arguments);\n this.resetExtent();\n var mode = this._mode = this._determineMode();\n this._pieceList = [];\n resetMethods[this._mode].call(this, this._pieceList);\n this._resetSelected(newOption, isInit);\n var categories = this.option.categories;\n this.resetVisual(function (mappingOption, state) {\n if (mode === 'categories') {\n mappingOption.mappingMethod = 'category';\n mappingOption.categories = zrUtil.clone(categories);\n } else {\n mappingOption.dataExtent = this.getExtent();\n mappingOption.mappingMethod = 'piecewise';\n mappingOption.pieceList = zrUtil.map(this._pieceList, function (piece) {\n piece = zrUtil.clone(piece);\n if (state !== 'inRange') {\n // FIXME\n // outOfRange do not support special visual in pieces.\n piece.visual = null;\n }\n return piece;\n });\n }\n });\n };\n /**\n * @protected\n * @override\n */\n PiecewiseModel.prototype.completeVisualOption = function () {\n // Consider this case:\n // visualMap: {\n // pieces: [{symbol: 'circle', lt: 0}, {symbol: 'rect', gte: 0}]\n // }\n // where no inRange/outOfRange set but only pieces. So we should make\n // default inRange/outOfRange for this case, otherwise visuals that only\n // appear in `pieces` will not be taken into account in visual encoding.\n var option = this.option;\n var visualTypesInPieces = {};\n var visualTypes = VisualMapping.listVisualTypes();\n var isCategory = this.isCategory();\n zrUtil.each(option.pieces, function (piece) {\n zrUtil.each(visualTypes, function (visualType) {\n if (piece.hasOwnProperty(visualType)) {\n visualTypesInPieces[visualType] = 1;\n }\n });\n });\n zrUtil.each(visualTypesInPieces, function (v, visualType) {\n var exists = false;\n zrUtil.each(this.stateList, function (state) {\n exists = exists || has(option, state, visualType) || has(option.target, state, visualType);\n }, this);\n !exists && zrUtil.each(this.stateList, function (state) {\n (option[state] || (option[state] = {}))[visualType] = visualDefault.get(visualType, state === 'inRange' ? 'active' : 'inactive', isCategory);\n });\n }, this);\n function has(obj, state, visualType) {\n return obj && obj[state] && obj[state].hasOwnProperty(visualType);\n }\n _super.prototype.completeVisualOption.apply(this, arguments);\n };\n PiecewiseModel.prototype._resetSelected = function (newOption, isInit) {\n var thisOption = this.option;\n var pieceList = this._pieceList;\n // Selected do not merge but all override.\n var selected = (isInit ? thisOption : newOption).selected || {};\n thisOption.selected = selected;\n // Consider 'not specified' means true.\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n if (!selected.hasOwnProperty(key)) {\n selected[key] = true;\n }\n }, this);\n if (thisOption.selectedMode === 'single') {\n // Ensure there is only one selected.\n var hasSel_1 = false;\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n if (selected[key]) {\n hasSel_1 ? selected[key] = false : hasSel_1 = true;\n }\n }, this);\n }\n // thisOption.selectedMode === 'multiple', default: all selected.\n };\n /**\n * @public\n */\n PiecewiseModel.prototype.getItemSymbol = function () {\n return this.get('itemSymbol');\n };\n /**\n * @public\n */\n PiecewiseModel.prototype.getSelectedMapKey = function (piece) {\n return this._mode === 'categories' ? piece.value + '' : piece.index + '';\n };\n /**\n * @public\n */\n PiecewiseModel.prototype.getPieceList = function () {\n return this._pieceList;\n };\n /**\n * @return {string}\n */\n PiecewiseModel.prototype._determineMode = function () {\n var option = this.option;\n return option.pieces && option.pieces.length > 0 ? 'pieces' : this.option.categories ? 'categories' : 'splitNumber';\n };\n /**\n * @override\n */\n PiecewiseModel.prototype.setSelected = function (selected) {\n this.option.selected = zrUtil.clone(selected);\n };\n /**\n * @override\n */\n PiecewiseModel.prototype.getValueState = function (value) {\n var index = VisualMapping.findPieceIndex(value, this._pieceList);\n return index != null ? this.option.selected[this.getSelectedMapKey(this._pieceList[index])] ? 'inRange' : 'outOfRange' : 'outOfRange';\n };\n /**\n * @public\n * @param pieceIndex piece index in visualMapModel.getPieceList()\n */\n PiecewiseModel.prototype.findTargetDataIndices = function (pieceIndex) {\n var result = [];\n var pieceList = this._pieceList;\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n data.each(this.getDataDimensionIndex(data), function (value, dataIndex) {\n // Should always base on model pieceList, because it is order sensitive.\n var pIdx = VisualMapping.findPieceIndex(value, pieceList);\n pIdx === pieceIndex && dataIndices.push(dataIndex);\n }, this);\n result.push({\n seriesId: seriesModel.id,\n dataIndex: dataIndices\n });\n }, this);\n return result;\n };\n /**\n * @private\n * @param piece piece.value or piece.interval is required.\n * @return Can be Infinity or -Infinity\n */\n PiecewiseModel.prototype.getRepresentValue = function (piece) {\n var representValue;\n if (this.isCategory()) {\n representValue = piece.value;\n } else {\n if (piece.value != null) {\n representValue = piece.value;\n } else {\n var pieceInterval = piece.interval || [];\n representValue = pieceInterval[0] === -Infinity && pieceInterval[1] === Infinity ? 0 : (pieceInterval[0] + pieceInterval[1]) / 2;\n }\n }\n return representValue;\n };\n PiecewiseModel.prototype.getVisualMeta = function (getColorVisual) {\n // Do not support category. (category axis is ordinal, numerical)\n if (this.isCategory()) {\n return;\n }\n var stops = [];\n var outerColors = ['', ''];\n var visualMapModel = this;\n function setStop(interval, valueState) {\n var representValue = visualMapModel.getRepresentValue({\n interval: interval\n }); // Not category\n if (!valueState) {\n valueState = visualMapModel.getValueState(representValue);\n }\n var color = getColorVisual(representValue, valueState);\n if (interval[0] === -Infinity) {\n outerColors[0] = color;\n } else if (interval[1] === Infinity) {\n outerColors[1] = color;\n } else {\n stops.push({\n value: interval[0],\n color: color\n }, {\n value: interval[1],\n color: color\n });\n }\n }\n // Suplement\n var pieceList = this._pieceList.slice();\n if (!pieceList.length) {\n pieceList.push({\n interval: [-Infinity, Infinity]\n });\n } else {\n var edge = pieceList[0].interval[0];\n edge !== -Infinity && pieceList.unshift({\n interval: [-Infinity, edge]\n });\n edge = pieceList[pieceList.length - 1].interval[1];\n edge !== Infinity && pieceList.push({\n interval: [edge, Infinity]\n });\n }\n var curr = -Infinity;\n zrUtil.each(pieceList, function (piece) {\n var interval = piece.interval;\n if (interval) {\n // Fulfill gap.\n interval[0] > curr && setStop([curr, interval[0]], 'outOfRange');\n setStop(interval.slice());\n curr = interval[1];\n }\n }, this);\n return {\n stops: stops,\n outerColors: outerColors\n };\n };\n PiecewiseModel.type = 'visualMap.piecewise';\n PiecewiseModel.defaultOption = inheritDefaultOption(VisualMapModel.defaultOption, {\n selected: null,\n minOpen: false,\n maxOpen: false,\n align: 'auto',\n itemWidth: 20,\n itemHeight: 14,\n itemSymbol: 'roundRect',\n pieces: null,\n categories: null,\n splitNumber: 5,\n selectedMode: 'multiple',\n itemGap: 10,\n hoverLink: true // Enable hover highlight.\n });\n return PiecewiseModel;\n}(VisualMapModel);\n;\n/**\n * Key is this._mode\n * @type {Object}\n * @this {module:echarts/component/viusalMap/PiecewiseMode}\n */\nvar resetMethods = {\n splitNumber: function (outPieceList) {\n var thisOption = this.option;\n var precision = Math.min(thisOption.precision, 20);\n var dataExtent = this.getExtent();\n var splitNumber = thisOption.splitNumber;\n splitNumber = Math.max(parseInt(splitNumber, 10), 1);\n thisOption.splitNumber = splitNumber;\n var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber;\n // Precision auto-adaption\n while (+splitStep.toFixed(precision) !== splitStep && precision < 5) {\n precision++;\n }\n thisOption.precision = precision;\n splitStep = +splitStep.toFixed(precision);\n if (thisOption.minOpen) {\n outPieceList.push({\n interval: [-Infinity, dataExtent[0]],\n close: [0, 0]\n });\n }\n for (var index = 0, curr = dataExtent[0]; index < splitNumber; curr += splitStep, index++) {\n var max = index === splitNumber - 1 ? dataExtent[1] : curr + splitStep;\n outPieceList.push({\n interval: [curr, max],\n close: [1, 1]\n });\n }\n if (thisOption.maxOpen) {\n outPieceList.push({\n interval: [dataExtent[1], Infinity],\n close: [0, 0]\n });\n }\n reformIntervals(outPieceList);\n zrUtil.each(outPieceList, function (piece, index) {\n piece.index = index;\n piece.text = this.formatValueText(piece.interval);\n }, this);\n },\n categories: function (outPieceList) {\n var thisOption = this.option;\n zrUtil.each(thisOption.categories, function (cate) {\n // FIXME category模式也使用pieceList,但在visualMapping中不是使用pieceList。\n // 是否改一致。\n outPieceList.push({\n text: this.formatValueText(cate, true),\n value: cate\n });\n }, this);\n // See \"Order Rule\".\n normalizeReverse(thisOption, outPieceList);\n },\n pieces: function (outPieceList) {\n var thisOption = this.option;\n zrUtil.each(thisOption.pieces, function (pieceListItem, index) {\n if (!zrUtil.isObject(pieceListItem)) {\n pieceListItem = {\n value: pieceListItem\n };\n }\n var item = {\n text: '',\n index: index\n };\n if (pieceListItem.label != null) {\n item.text = pieceListItem.label;\n }\n if (pieceListItem.hasOwnProperty('value')) {\n var value = item.value = pieceListItem.value;\n item.interval = [value, value];\n item.close = [1, 1];\n } else {\n // `min` `max` is legacy option.\n // `lt` `gt` `lte` `gte` is recommended.\n var interval = item.interval = [];\n var close_1 = item.close = [0, 0];\n var closeList = [1, 0, 1];\n var infinityList = [-Infinity, Infinity];\n var useMinMax = [];\n for (var lg = 0; lg < 2; lg++) {\n var names = [['gte', 'gt', 'min'], ['lte', 'lt', 'max']][lg];\n for (var i = 0; i < 3 && interval[lg] == null; i++) {\n interval[lg] = pieceListItem[names[i]];\n close_1[lg] = closeList[i];\n useMinMax[lg] = i === 2;\n }\n interval[lg] == null && (interval[lg] = infinityList[lg]);\n }\n useMinMax[0] && interval[1] === Infinity && (close_1[0] = 0);\n useMinMax[1] && interval[0] === -Infinity && (close_1[1] = 0);\n if (process.env.NODE_ENV !== 'production') {\n if (interval[0] > interval[1]) {\n console.warn('Piece ' + index + 'is illegal: ' + interval + ' lower bound should not greater then uppper bound.');\n }\n }\n if (interval[0] === interval[1] && close_1[0] && close_1[1]) {\n // Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}],\n // we use value to lift the priority when min === max\n item.value = interval[0];\n }\n }\n item.visual = VisualMapping.retrieveVisuals(pieceListItem);\n outPieceList.push(item);\n }, this);\n // See \"Order Rule\".\n normalizeReverse(thisOption, outPieceList);\n // Only pieces\n reformIntervals(outPieceList);\n zrUtil.each(outPieceList, function (piece) {\n var close = piece.close;\n var edgeSymbols = [['<', '≤'][close[1]], ['>', '≥'][close[0]]];\n piece.text = piece.text || this.formatValueText(piece.value != null ? piece.value : piece.interval, false, edgeSymbols);\n }, this);\n }\n};\nfunction normalizeReverse(thisOption, pieceList) {\n var inverse = thisOption.inverse;\n if (thisOption.orient === 'vertical' ? !inverse : inverse) {\n pieceList.reverse();\n }\n}\nexport default PiecewiseModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapView from './VisualMapView.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport * as layout from '../../util/layout.js';\nimport * as helper from './helper.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nvar PiecewiseVisualMapView = /** @class */function (_super) {\n __extends(PiecewiseVisualMapView, _super);\n function PiecewiseVisualMapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PiecewiseVisualMapView.type;\n return _this;\n }\n PiecewiseVisualMapView.prototype.doRender = function () {\n var thisGroup = this.group;\n thisGroup.removeAll();\n var visualMapModel = this.visualMapModel;\n var textGap = visualMapModel.get('textGap');\n var textStyleModel = visualMapModel.textStyleModel;\n var itemAlign = this._getItemAlign();\n var itemSize = visualMapModel.itemSize;\n var viewData = this._getViewData();\n var endsText = viewData.endsText;\n var showLabel = zrUtil.retrieve(visualMapModel.get('showLabel', true), !endsText);\n var silent = !visualMapModel.get('selectedMode');\n endsText && this._renderEndsText(thisGroup, endsText[0], itemSize, showLabel, itemAlign);\n zrUtil.each(viewData.viewPieceList, function (item) {\n var piece = item.piece;\n var itemGroup = new graphic.Group();\n itemGroup.onclick = zrUtil.bind(this._onItemClick, this, piece);\n this._enableHoverLink(itemGroup, item.indexInModelPieceList);\n // TODO Category\n var representValue = visualMapModel.getRepresentValue(piece);\n this._createItemSymbol(itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]], silent);\n if (showLabel) {\n var visualState = this.visualMapModel.getValueState(representValue);\n var align = textStyleModel.get('align') || itemAlign;\n itemGroup.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n x: align === 'right' ? -textGap : itemSize[0] + textGap,\n y: itemSize[1] / 2,\n text: piece.text,\n verticalAlign: textStyleModel.get('verticalAlign') || 'middle',\n align: align,\n opacity: zrUtil.retrieve2(textStyleModel.get('opacity'), visualState === 'outOfRange' ? 0.5 : 1)\n }),\n silent: silent\n }));\n }\n thisGroup.add(itemGroup);\n }, this);\n endsText && this._renderEndsText(thisGroup, endsText[1], itemSize, showLabel, itemAlign);\n layout.box(visualMapModel.get('orient'), thisGroup, visualMapModel.get('itemGap'));\n this.renderBackground(thisGroup);\n this.positionGroup(thisGroup);\n };\n PiecewiseVisualMapView.prototype._enableHoverLink = function (itemGroup, pieceIndex) {\n var _this = this;\n itemGroup.on('mouseover', function () {\n return onHoverLink('highlight');\n }).on('mouseout', function () {\n return onHoverLink('downplay');\n });\n var onHoverLink = function (method) {\n var visualMapModel = _this.visualMapModel;\n // TODO: TYPE More detailed action types\n visualMapModel.option.hoverLink && _this.api.dispatchAction({\n type: method,\n batch: helper.makeHighDownBatch(visualMapModel.findTargetDataIndices(pieceIndex), visualMapModel)\n });\n };\n };\n PiecewiseVisualMapView.prototype._getItemAlign = function () {\n var visualMapModel = this.visualMapModel;\n var modelOption = visualMapModel.option;\n if (modelOption.orient === 'vertical') {\n return helper.getItemAlign(visualMapModel, this.api, visualMapModel.itemSize);\n } else {\n // horizontal, most case left unless specifying right.\n var align = modelOption.align;\n if (!align || align === 'auto') {\n align = 'left';\n }\n return align;\n }\n };\n PiecewiseVisualMapView.prototype._renderEndsText = function (group, text, itemSize, showLabel, itemAlign) {\n if (!text) {\n return;\n }\n var itemGroup = new graphic.Group();\n var textStyleModel = this.visualMapModel.textStyleModel;\n itemGroup.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n x: showLabel ? itemAlign === 'right' ? itemSize[0] : 0 : itemSize[0] / 2,\n y: itemSize[1] / 2,\n verticalAlign: 'middle',\n align: showLabel ? itemAlign : 'center',\n text: text\n })\n }));\n group.add(itemGroup);\n };\n /**\n * @private\n * @return {Object} {peiceList, endsText} The order is the same as screen pixel order.\n */\n PiecewiseVisualMapView.prototype._getViewData = function () {\n var visualMapModel = this.visualMapModel;\n var viewPieceList = zrUtil.map(visualMapModel.getPieceList(), function (piece, index) {\n return {\n piece: piece,\n indexInModelPieceList: index\n };\n });\n var endsText = visualMapModel.get('text');\n // Consider orient and inverse.\n var orient = visualMapModel.get('orient');\n var inverse = visualMapModel.get('inverse');\n // Order of model pieceList is always [low, ..., high]\n if (orient === 'horizontal' ? inverse : !inverse) {\n viewPieceList.reverse();\n }\n // Origin order of endsText is [high, low]\n else if (endsText) {\n endsText = endsText.slice().reverse();\n }\n return {\n viewPieceList: viewPieceList,\n endsText: endsText\n };\n };\n PiecewiseVisualMapView.prototype._createItemSymbol = function (group, representValue, shapeParam, silent) {\n var itemSymbol = createSymbol(\n // symbol will be string\n this.getControllerVisual(representValue, 'symbol'), shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3],\n // color will be string\n this.getControllerVisual(representValue, 'color'));\n itemSymbol.silent = silent;\n group.add(itemSymbol);\n };\n PiecewiseVisualMapView.prototype._onItemClick = function (piece) {\n var visualMapModel = this.visualMapModel;\n var option = visualMapModel.option;\n var selectedMode = option.selectedMode;\n if (!selectedMode) {\n return;\n }\n var selected = zrUtil.clone(option.selected);\n var newKey = visualMapModel.getSelectedMapKey(piece);\n if (selectedMode === 'single' || selectedMode === true) {\n selected[newKey] = true;\n zrUtil.each(selected, function (o, key) {\n selected[key] = key === newKey;\n });\n } else {\n selected[newKey] = !selected[newKey];\n }\n this.api.dispatchAction({\n type: 'selectDataRange',\n from: this.uid,\n visualMapId: this.visualMapModel.id,\n selected: selected\n });\n };\n PiecewiseVisualMapView.type = 'visualMap.piecewise';\n return PiecewiseVisualMapView;\n}(VisualMapView);\nexport default PiecewiseVisualMapView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport PiecewiseModel from './PiecewiseModel.js';\nimport PiecewiseView from './PiecewiseView.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n registers.registerComponentModel(PiecewiseModel);\n registers.registerComponentView(PiecewiseView);\n installCommon(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installVisualMapContinuous } from './installVisualMapContinuous.js';\nimport { install as installVisualMapPiecewise } from './installVisualMapPiecewise.js';\nexport function install(registers) {\n use(installVisualMapContinuous);\n use(installVisualMapPiecewise);\n // Do not install './dataZoomSelect',\n // since it only work for toolbox dataZoom.\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { makeInner } from '../util/model.js';\nimport { getDecalFromPalette } from '../model/mixin/palette.js';\nvar DEFAULT_OPTION = {\n label: {\n enabled: true\n },\n decal: {\n show: false\n }\n};\nvar inner = makeInner();\nvar decalPaletteScope = {};\nexport default function ariaVisual(ecModel, api) {\n var ariaModel = ecModel.getModel('aria');\n // See \"area enabled\" detection code in `GlobalModel.ts`.\n if (!ariaModel.get('enabled')) {\n return;\n }\n var defaultOption = zrUtil.clone(DEFAULT_OPTION);\n zrUtil.merge(defaultOption.label, ecModel.getLocaleModel().get('aria'), false);\n zrUtil.merge(ariaModel.option, defaultOption, false);\n setDecal();\n setLabel();\n function setDecal() {\n var decalModel = ariaModel.getModel('decal');\n var useDecal = decalModel.get('show');\n if (useDecal) {\n // Each type of series use one scope.\n // Pie and funnel are using different scopes.\n var paletteScopeGroupByType_1 = zrUtil.createHashMap();\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.isColorBySeries()) {\n return;\n }\n var decalScope = paletteScopeGroupByType_1.get(seriesModel.type);\n if (!decalScope) {\n decalScope = {};\n paletteScopeGroupByType_1.set(seriesModel.type, decalScope);\n }\n inner(seriesModel).scope = decalScope;\n });\n ecModel.eachRawSeries(function (seriesModel) {\n if (ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n if (zrUtil.isFunction(seriesModel.enableAriaDecal)) {\n // Let series define how to use decal palette on data\n seriesModel.enableAriaDecal();\n return;\n }\n var data = seriesModel.getData();\n if (!seriesModel.isColorBySeries()) {\n var dataAll_1 = seriesModel.getRawData();\n var idxMap_1 = {};\n var decalScope_1 = inner(seriesModel).scope;\n data.each(function (idx) {\n var rawIdx = data.getRawIndex(idx);\n idxMap_1[rawIdx] = idx;\n });\n var dataCount_1 = dataAll_1.count();\n dataAll_1.each(function (rawIdx) {\n var idx = idxMap_1[rawIdx];\n var name = dataAll_1.getName(rawIdx) || rawIdx + '';\n var paletteDecal = getDecalFromPalette(seriesModel.ecModel, name, decalScope_1, dataCount_1);\n var specifiedDecal = data.getItemVisual(idx, 'decal');\n data.setItemVisual(idx, 'decal', mergeDecal(specifiedDecal, paletteDecal));\n });\n } else {\n var paletteDecal = getDecalFromPalette(seriesModel.ecModel, seriesModel.name, decalPaletteScope, ecModel.getSeriesCount());\n var specifiedDecal = data.getVisual('decal');\n data.setVisual('decal', mergeDecal(specifiedDecal, paletteDecal));\n }\n function mergeDecal(specifiedDecal, paletteDecal) {\n // Merge decal from palette to decal from itemStyle.\n // User do not need to specify all of the decal props.\n var resultDecal = specifiedDecal ? zrUtil.extend(zrUtil.extend({}, paletteDecal), specifiedDecal) : paletteDecal;\n resultDecal.dirty = true;\n return resultDecal;\n }\n });\n }\n }\n function setLabel() {\n var dom = api.getZr().dom;\n // TODO: support for SSR\n if (!dom) {\n return;\n }\n var labelLocale = ecModel.getLocaleModel().get('aria');\n var labelModel = ariaModel.getModel('label');\n labelModel.option = zrUtil.defaults(labelModel.option, labelLocale);\n if (!labelModel.get('enabled')) {\n return;\n }\n dom.setAttribute('role', 'img');\n if (labelModel.get('description')) {\n dom.setAttribute('aria-label', labelModel.get('description'));\n return;\n }\n var seriesCnt = ecModel.getSeriesCount();\n var maxDataCnt = labelModel.get(['data', 'maxCount']) || 10;\n var maxSeriesCnt = labelModel.get(['series', 'maxCount']) || 10;\n var displaySeriesCnt = Math.min(seriesCnt, maxSeriesCnt);\n var ariaLabel;\n if (seriesCnt < 1) {\n // No series, no aria label\n return;\n } else {\n var title = getTitle();\n if (title) {\n var withTitle = labelModel.get(['general', 'withTitle']);\n ariaLabel = replace(withTitle, {\n title: title\n });\n } else {\n ariaLabel = labelModel.get(['general', 'withoutTitle']);\n }\n var seriesLabels_1 = [];\n var prefix = seriesCnt > 1 ? labelModel.get(['series', 'multiple', 'prefix']) : labelModel.get(['series', 'single', 'prefix']);\n ariaLabel += replace(prefix, {\n seriesCount: seriesCnt\n });\n ecModel.eachSeries(function (seriesModel, idx) {\n if (idx < displaySeriesCnt) {\n var seriesLabel = void 0;\n var seriesName = seriesModel.get('name');\n var withName = seriesName ? 'withName' : 'withoutName';\n seriesLabel = seriesCnt > 1 ? labelModel.get(['series', 'multiple', withName]) : labelModel.get(['series', 'single', withName]);\n seriesLabel = replace(seriesLabel, {\n seriesId: seriesModel.seriesIndex,\n seriesName: seriesModel.get('name'),\n seriesType: getSeriesTypeName(seriesModel.subType)\n });\n var data = seriesModel.getData();\n if (data.count() > maxDataCnt) {\n // Show part of data\n var partialLabel = labelModel.get(['data', 'partialData']);\n seriesLabel += replace(partialLabel, {\n displayCnt: maxDataCnt\n });\n } else {\n seriesLabel += labelModel.get(['data', 'allData']);\n }\n var middleSeparator_1 = labelModel.get(['data', 'separator', 'middle']);\n var endSeparator_1 = labelModel.get(['data', 'separator', 'end']);\n var excludeDimensionId_1 = labelModel.get(['data', 'excludeDimensionId']);\n var dataLabels = [];\n for (var i = 0; i < data.count(); i++) {\n if (i < maxDataCnt) {\n var name_1 = data.getName(i);\n var value = !excludeDimensionId_1 ? data.getValues(i) : zrUtil.filter(data.getValues(i), function (v, j) {\n return zrUtil.indexOf(excludeDimensionId_1, j) === -1;\n });\n var dataLabel = labelModel.get(['data', name_1 ? 'withName' : 'withoutName']);\n dataLabels.push(replace(dataLabel, {\n name: name_1,\n value: value.join(middleSeparator_1)\n }));\n }\n }\n seriesLabel += dataLabels.join(middleSeparator_1) + endSeparator_1;\n seriesLabels_1.push(seriesLabel);\n }\n });\n var separatorModel = labelModel.getModel(['series', 'multiple', 'separator']);\n var middleSeparator = separatorModel.get('middle');\n var endSeparator = separatorModel.get('end');\n ariaLabel += seriesLabels_1.join(middleSeparator) + endSeparator;\n dom.setAttribute('aria-label', ariaLabel);\n }\n }\n function replace(str, keyValues) {\n if (!zrUtil.isString(str)) {\n return str;\n }\n var result = str;\n zrUtil.each(keyValues, function (value, key) {\n result = result.replace(new RegExp('\\\\{\\\\s*' + key + '\\\\s*\\\\}', 'g'), value);\n });\n return result;\n }\n function getTitle() {\n var title = ecModel.get('title');\n if (title && title.length) {\n title = title[0];\n }\n return title && title.text;\n }\n function getSeriesTypeName(type) {\n var typeNames = ecModel.getLocaleModel().get(['series', 'typeNames']);\n return typeNames[type] || typeNames.chart;\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function ariaPreprocessor(option) {\n if (!option || !option.aria) {\n return;\n }\n var aria = option.aria;\n // aria.show is deprecated and should use aria.enabled instead\n if (aria.show != null) {\n aria.enabled = aria.show;\n }\n aria.label = aria.label || {};\n // move description, general, series, data to be under aria.label\n zrUtil.each(['description', 'general', 'series', 'data'], function (name) {\n if (aria[name] != null) {\n aria.label[name] = aria[name];\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport ariaVisual from '../../visual/aria.js';\nimport ariaPreprocessor from './preprocessor.js';\nexport function install(registers) {\n registers.registerPreprocessor(ariaPreprocessor);\n registers.registerVisual(registers.PRIORITY.VISUAL.ARIA, ariaVisual);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * This module is imported by echarts directly.\n *\n * Notice:\n * Always keep this file exists for backward compatibility.\n * Because before 4.1.0, dataset is an optional component,\n * some users may import this module manually.\n */\nimport ComponentModel from '../../model/Component.js';\nimport ComponentView from '../../view/Component.js';\nimport { SERIES_LAYOUT_BY_COLUMN } from '../../util/types.js';\nimport { disableTransformOptionMerge, SourceManager } from '../../data/helper/sourceManager.js';\nvar DatasetModel = /** @class */function (_super) {\n __extends(DatasetModel, _super);\n function DatasetModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dataset';\n return _this;\n }\n DatasetModel.prototype.init = function (option, parentModel, ecModel) {\n _super.prototype.init.call(this, option, parentModel, ecModel);\n this._sourceManager = new SourceManager(this);\n disableTransformOptionMerge(this);\n };\n DatasetModel.prototype.mergeOption = function (newOption, ecModel) {\n _super.prototype.mergeOption.call(this, newOption, ecModel);\n disableTransformOptionMerge(this);\n };\n DatasetModel.prototype.optionUpdated = function () {\n this._sourceManager.dirty();\n };\n DatasetModel.prototype.getSourceManager = function () {\n return this._sourceManager;\n };\n DatasetModel.type = 'dataset';\n DatasetModel.defaultOption = {\n seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN\n };\n return DatasetModel;\n}(ComponentModel);\nexport { DatasetModel };\nvar DatasetView = /** @class */function (_super) {\n __extends(DatasetView, _super);\n function DatasetView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dataset';\n return _this;\n }\n DatasetView.type = 'dataset';\n return DatasetView;\n}(ComponentView);\nexport function install(registers) {\n registers.registerComponentModel(DatasetModel);\n registers.registerComponentView(DatasetView);\n}"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122],"mappings":";;;;;;;;;AAiDA,IAAIA,WAAQ,WAAW;AACvB,IAAI,QAAQC;AACZ,IAAI,OAAOC;;;;AAIX,IAAI,kBAA+B,WAAY;CAC7C,SAAS,kBAAkB;AACzB,OAAK,YAAY;;;;;AAKjB,OAAK,qBAAqB;;;;;AAK5B,iBAAgB,UAAU,SAAS,SAAU,WAAW,kBAAkB,KAAK,aAAa;EAC1F,IAAI,QAAQ,iBAAiB,IAAI,QAAQ;EACzC,IAAI,SAAS,iBAAiB,IAAI,SAAS;AAG3C,OAAK,aAAa;AAClB,OAAK,oBAAoB;AACzB,OAAK,OAAO;AAIZ,MAAI,CAAC,eAAe,KAAK,eAAe,SAAS,KAAK,gBAAgB,OACpE;AAEF,OAAK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