diff --git a/public/data/thumb-dark/area-pieces.jpg b/public/data/thumb-dark/area-pieces.jpg new file mode 100644 index 00000000..60dc18eb Binary files /dev/null and b/public/data/thumb-dark/area-pieces.jpg differ diff --git a/public/data/thumb-dark/calendar-charts.jpg b/public/data/thumb-dark/calendar-charts.jpg index eb9fecb5..4fa1d19e 100644 Binary files a/public/data/thumb-dark/calendar-charts.jpg and b/public/data/thumb-dark/calendar-charts.jpg differ diff --git a/public/data/thumb-dark/calendar-effectscatter.jpg b/public/data/thumb-dark/calendar-effectscatter.jpg index fd469812..5b0a869e 100644 Binary files a/public/data/thumb-dark/calendar-effectscatter.jpg and b/public/data/thumb-dark/calendar-effectscatter.jpg differ diff --git a/public/data/thumb-dark/confidence-band.jpg b/public/data/thumb-dark/confidence-band.jpg index e19bcaa2..e96f1bba 100644 Binary files a/public/data/thumb-dark/confidence-band.jpg and b/public/data/thumb-dark/confidence-band.jpg differ diff --git a/public/data/thumb-dark/custom-hexbin.jpg b/public/data/thumb-dark/custom-hexbin.jpg index 368657bf..6cdb0bce 100644 Binary files a/public/data/thumb-dark/custom-hexbin.jpg and b/public/data/thumb-dark/custom-hexbin.jpg differ diff --git a/public/data/thumb-dark/custom-profile.jpg b/public/data/thumb-dark/custom-profile.jpg index 091924ea..db8b0f63 100644 Binary files a/public/data/thumb-dark/custom-profile.jpg and b/public/data/thumb-dark/custom-profile.jpg differ diff --git a/public/data/thumb-dark/dynamic-data.jpg b/public/data/thumb-dark/dynamic-data.jpg index 2a50be4f..33c986dc 100644 Binary files a/public/data/thumb-dark/dynamic-data.jpg and b/public/data/thumb-dark/dynamic-data.jpg differ diff --git a/public/data/thumb-dark/effectScatter-bmap.jpg b/public/data/thumb-dark/effectScatter-bmap.jpg index 6a96d24d..88f65146 100644 Binary files a/public/data/thumb-dark/effectScatter-bmap.jpg and b/public/data/thumb-dark/effectScatter-bmap.jpg differ diff --git a/public/data/thumb-dark/effectScatter-map.jpg b/public/data/thumb-dark/effectScatter-map.jpg index 8fd18d71..bcf7b6f9 100644 Binary files a/public/data/thumb-dark/effectScatter-map.jpg and b/public/data/thumb-dark/effectScatter-map.jpg differ diff --git a/public/data/thumb-dark/geo-lines.jpg b/public/data/thumb-dark/geo-lines.jpg index c68907f6..bb1052a1 100644 Binary files a/public/data/thumb-dark/geo-lines.jpg and b/public/data/thumb-dark/geo-lines.jpg differ diff --git a/public/data/thumb-dark/geo-map-scatter.jpg b/public/data/thumb-dark/geo-map-scatter.jpg index 5175683f..532aed65 100644 Binary files a/public/data/thumb-dark/geo-map-scatter.jpg and b/public/data/thumb-dark/geo-map-scatter.jpg differ diff --git a/public/data/thumb-dark/graph-force.jpg b/public/data/thumb-dark/graph-force.jpg index 1bede63e..f9394649 100644 Binary files a/public/data/thumb-dark/graph-force.jpg and b/public/data/thumb-dark/graph-force.jpg differ diff --git a/public/data/thumb-dark/graph-life-expectancy.jpg b/public/data/thumb-dark/graph-life-expectancy.jpg index 12527229..ecfd7c8e 100644 Binary files a/public/data/thumb-dark/graph-life-expectancy.jpg and b/public/data/thumb-dark/graph-life-expectancy.jpg differ diff --git a/public/data/thumb-dark/graph-webkit-dep.jpg b/public/data/thumb-dark/graph-webkit-dep.jpg index 68795d44..8b5c093c 100644 Binary files a/public/data/thumb-dark/graph-webkit-dep.jpg and b/public/data/thumb-dark/graph-webkit-dep.jpg differ diff --git a/public/data/thumb-dark/graph.jpg b/public/data/thumb-dark/graph.jpg index 21be08a8..e812c6b8 100644 Binary files a/public/data/thumb-dark/graph.jpg and b/public/data/thumb-dark/graph.jpg differ diff --git a/public/data/thumb-dark/heatmap-bmap.jpg b/public/data/thumb-dark/heatmap-bmap.jpg index 5ba65071..7bbfde79 100644 Binary files a/public/data/thumb-dark/heatmap-bmap.jpg and b/public/data/thumb-dark/heatmap-bmap.jpg differ diff --git a/public/data/thumb-dark/heatmap-map.jpg b/public/data/thumb-dark/heatmap-map.jpg index 4bb61f75..99d1ed8b 100644 Binary files a/public/data/thumb-dark/heatmap-map.jpg and b/public/data/thumb-dark/heatmap-map.jpg differ diff --git a/public/data/thumb-dark/line-graphic.jpg b/public/data/thumb-dark/line-graphic.jpg index 4c7b1b9d..25086a4b 100644 Binary files a/public/data/thumb-dark/line-graphic.jpg and b/public/data/thumb-dark/line-graphic.jpg differ diff --git a/public/data/thumb-dark/lines-bmap-bus.jpg b/public/data/thumb-dark/lines-bmap-bus.jpg index e0c20c84..60eca0fc 100644 Binary files a/public/data/thumb-dark/lines-bmap-bus.jpg and b/public/data/thumb-dark/lines-bmap-bus.jpg differ diff --git a/public/data/thumb-dark/lines-bmap.jpg b/public/data/thumb-dark/lines-bmap.jpg index 4ba1d890..bcadd6c9 100644 Binary files a/public/data/thumb-dark/lines-bmap.jpg and b/public/data/thumb-dark/lines-bmap.jpg differ diff --git a/public/data/thumb-dark/map-bin.jpg b/public/data/thumb-dark/map-bin.jpg index 77df94d4..18631043 100644 Binary files a/public/data/thumb-dark/map-bin.jpg and b/public/data/thumb-dark/map-bin.jpg differ diff --git a/public/data/thumb-dark/map-china-dataRange.jpg b/public/data/thumb-dark/map-china-dataRange.jpg index 179b1956..ace34cea 100644 Binary files a/public/data/thumb-dark/map-china-dataRange.jpg and b/public/data/thumb-dark/map-china-dataRange.jpg differ diff --git a/public/data/thumb-dark/map-china.jpg b/public/data/thumb-dark/map-china.jpg index 21b9a0f2..d5266eb5 100644 Binary files a/public/data/thumb-dark/map-china.jpg and b/public/data/thumb-dark/map-china.jpg differ diff --git a/public/data/thumb-dark/map-labels.jpg b/public/data/thumb-dark/map-labels.jpg index 862f0aa2..fd9b30d6 100644 Binary files a/public/data/thumb-dark/map-labels.jpg and b/public/data/thumb-dark/map-labels.jpg differ diff --git a/public/data/thumb-dark/map-locate.jpg b/public/data/thumb-dark/map-locate.jpg index 5248d802..9ce2fd8a 100644 Binary files a/public/data/thumb-dark/map-locate.jpg and b/public/data/thumb-dark/map-locate.jpg differ diff --git a/public/data/thumb-dark/map-polygon.jpg b/public/data/thumb-dark/map-polygon.jpg index 43d6ef3e..e8841686 100644 Binary files a/public/data/thumb-dark/map-polygon.jpg and b/public/data/thumb-dark/map-polygon.jpg differ diff --git a/public/data/thumb-dark/mix-timeline-finance.jpg b/public/data/thumb-dark/mix-timeline-finance.jpg index 0d79169c..4414c6a1 100644 Binary files a/public/data/thumb-dark/mix-timeline-finance.jpg and b/public/data/thumb-dark/mix-timeline-finance.jpg differ diff --git a/public/data/thumb-dark/pictorialBar-dotted.jpg b/public/data/thumb-dark/pictorialBar-dotted.jpg index 4eafbe87..83ce7102 100644 Binary files a/public/data/thumb-dark/pictorialBar-dotted.jpg and b/public/data/thumb-dark/pictorialBar-dotted.jpg differ diff --git a/public/data/thumb-dark/scatter-effect.jpg b/public/data/thumb-dark/scatter-effect.jpg index 2e9a5d91..9adf02ad 100644 Binary files a/public/data/thumb-dark/scatter-effect.jpg and b/public/data/thumb-dark/scatter-effect.jpg differ diff --git a/public/data/thumb-dark/scatter-life-expectancy-timeline.jpg b/public/data/thumb-dark/scatter-life-expectancy-timeline.jpg index 2b9fadd0..d89aa5d6 100644 Binary files a/public/data/thumb-dark/scatter-life-expectancy-timeline.jpg and b/public/data/thumb-dark/scatter-life-expectancy-timeline.jpg differ diff --git a/public/data/thumb-dark/scatter-map-brush.jpg b/public/data/thumb-dark/scatter-map-brush.jpg index 5f2a1781..ebb94afe 100644 Binary files a/public/data/thumb-dark/scatter-map-brush.jpg and b/public/data/thumb-dark/scatter-map-brush.jpg differ diff --git a/public/data/thumb-dark/scatter-map.jpg b/public/data/thumb-dark/scatter-map.jpg index 6e6769ca..7572c29d 100644 Binary files a/public/data/thumb-dark/scatter-map.jpg and b/public/data/thumb-dark/scatter-map.jpg differ diff --git a/public/data/thumb-dark/scatter-nebula.jpg b/public/data/thumb-dark/scatter-nebula.jpg index d793bf10..53713911 100644 Binary files a/public/data/thumb-dark/scatter-nebula.jpg and b/public/data/thumb-dark/scatter-nebula.jpg differ diff --git a/public/data/thumb-dark/scatter-nutrients-matrix.jpg b/public/data/thumb-dark/scatter-nutrients-matrix.jpg index 58967cc2..e6d1d183 100644 Binary files a/public/data/thumb-dark/scatter-nutrients-matrix.jpg and b/public/data/thumb-dark/scatter-nutrients-matrix.jpg differ diff --git a/public/data/thumb-dark/scatter-nutrients.jpg b/public/data/thumb-dark/scatter-nutrients.jpg index 522b662b..2e188f54 100644 Binary files a/public/data/thumb-dark/scatter-nutrients.jpg and b/public/data/thumb-dark/scatter-nutrients.jpg differ diff --git a/public/data/thumb-dark/scatter-weibo.jpg b/public/data/thumb-dark/scatter-weibo.jpg index a4534cdf..8f2107fc 100644 Binary files a/public/data/thumb-dark/scatter-weibo.jpg and b/public/data/thumb-dark/scatter-weibo.jpg differ diff --git a/public/data/thumb-dark/tree-polyline.jpg b/public/data/thumb-dark/tree-polyline.jpg index 27d69019..f02f6d75 100644 Binary files a/public/data/thumb-dark/tree-polyline.jpg and b/public/data/thumb-dark/tree-polyline.jpg differ diff --git a/public/data/thumb-dark/treemap-obama.jpg b/public/data/thumb-dark/treemap-obama.jpg index f5c8281c..bc5c85b2 100644 Binary files a/public/data/thumb-dark/treemap-obama.jpg and b/public/data/thumb-dark/treemap-obama.jpg differ diff --git a/public/data/thumb-light/area-pieces.jpg b/public/data/thumb-light/area-pieces.jpg new file mode 100644 index 00000000..34e25a4c Binary files /dev/null and b/public/data/thumb-light/area-pieces.jpg differ diff --git a/public/data/thumb-light/calendar-charts.jpg b/public/data/thumb-light/calendar-charts.jpg index e3f274bf..16d452e6 100644 Binary files a/public/data/thumb-light/calendar-charts.jpg and b/public/data/thumb-light/calendar-charts.jpg differ diff --git a/public/data/thumb-light/calendar-effectscatter.jpg b/public/data/thumb-light/calendar-effectscatter.jpg index 7a263b13..358e384f 100644 Binary files a/public/data/thumb-light/calendar-effectscatter.jpg and b/public/data/thumb-light/calendar-effectscatter.jpg differ diff --git a/public/data/thumb-light/confidence-band.jpg b/public/data/thumb-light/confidence-band.jpg index 8148a70f..9f65858a 100644 Binary files a/public/data/thumb-light/confidence-band.jpg and b/public/data/thumb-light/confidence-band.jpg differ diff --git a/public/data/thumb-light/custom-hexbin.jpg b/public/data/thumb-light/custom-hexbin.jpg index 368657bf..6cdb0bce 100644 Binary files a/public/data/thumb-light/custom-hexbin.jpg and b/public/data/thumb-light/custom-hexbin.jpg differ diff --git a/public/data/thumb-light/custom-profile.jpg b/public/data/thumb-light/custom-profile.jpg index d1859e7f..4759393c 100644 Binary files a/public/data/thumb-light/custom-profile.jpg and b/public/data/thumb-light/custom-profile.jpg differ diff --git a/public/data/thumb-light/dynamic-data.jpg b/public/data/thumb-light/dynamic-data.jpg index cd4a064d..0bbc4d1b 100644 Binary files a/public/data/thumb-light/dynamic-data.jpg and b/public/data/thumb-light/dynamic-data.jpg differ diff --git a/public/data/thumb-light/dynamic-data2.jpg b/public/data/thumb-light/dynamic-data2.jpg index fa7a8a86..4616ee3b 100644 Binary files a/public/data/thumb-light/dynamic-data2.jpg and b/public/data/thumb-light/dynamic-data2.jpg differ diff --git a/public/data/thumb-light/effectScatter-bmap.jpg b/public/data/thumb-light/effectScatter-bmap.jpg index 556e5a76..6bbefa08 100644 Binary files a/public/data/thumb-light/effectScatter-bmap.jpg and b/public/data/thumb-light/effectScatter-bmap.jpg differ diff --git a/public/data/thumb-light/effectScatter-map.jpg b/public/data/thumb-light/effectScatter-map.jpg index 7f2797af..be22534f 100644 Binary files a/public/data/thumb-light/effectScatter-map.jpg and b/public/data/thumb-light/effectScatter-map.jpg differ diff --git a/public/data/thumb-light/geo-lines.jpg b/public/data/thumb-light/geo-lines.jpg index d622f9e1..8ab24eb1 100644 Binary files a/public/data/thumb-light/geo-lines.jpg and b/public/data/thumb-light/geo-lines.jpg differ diff --git a/public/data/thumb-light/geo-map-scatter.jpg b/public/data/thumb-light/geo-map-scatter.jpg index 5f4f1ab3..9179a099 100644 Binary files a/public/data/thumb-light/geo-map-scatter.jpg and b/public/data/thumb-light/geo-map-scatter.jpg differ diff --git a/public/data/thumb-light/graph-force.jpg b/public/data/thumb-light/graph-force.jpg index 059bc724..beda1064 100644 Binary files a/public/data/thumb-light/graph-force.jpg and b/public/data/thumb-light/graph-force.jpg differ diff --git a/public/data/thumb-light/graph-life-expectancy.jpg b/public/data/thumb-light/graph-life-expectancy.jpg index 9e4ba29c..2cfdd5ad 100644 Binary files a/public/data/thumb-light/graph-life-expectancy.jpg and b/public/data/thumb-light/graph-life-expectancy.jpg differ diff --git a/public/data/thumb-light/graph-webkit-dep.jpg b/public/data/thumb-light/graph-webkit-dep.jpg index 830a60d8..91758c40 100644 Binary files a/public/data/thumb-light/graph-webkit-dep.jpg and b/public/data/thumb-light/graph-webkit-dep.jpg differ diff --git a/public/data/thumb-light/graph.jpg b/public/data/thumb-light/graph.jpg index 1cdfd6b5..9b21664e 100644 Binary files a/public/data/thumb-light/graph.jpg and b/public/data/thumb-light/graph.jpg differ diff --git a/public/data/thumb-light/heatmap-bmap.jpg b/public/data/thumb-light/heatmap-bmap.jpg index e672d833..6703db7b 100644 Binary files a/public/data/thumb-light/heatmap-bmap.jpg and b/public/data/thumb-light/heatmap-bmap.jpg differ diff --git a/public/data/thumb-light/heatmap-map.jpg b/public/data/thumb-light/heatmap-map.jpg index 4bb61f75..99d1ed8b 100644 Binary files a/public/data/thumb-light/heatmap-map.jpg and b/public/data/thumb-light/heatmap-map.jpg differ diff --git a/public/data/thumb-light/line-graphic.jpg b/public/data/thumb-light/line-graphic.jpg index 50b892ae..267e6136 100644 Binary files a/public/data/thumb-light/line-graphic.jpg and b/public/data/thumb-light/line-graphic.jpg differ diff --git a/public/data/thumb-light/lines-bmap-bus.jpg b/public/data/thumb-light/lines-bmap-bus.jpg index ef94b4c8..dec84eec 100644 Binary files a/public/data/thumb-light/lines-bmap-bus.jpg and b/public/data/thumb-light/lines-bmap-bus.jpg differ diff --git a/public/data/thumb-light/lines-bmap.jpg b/public/data/thumb-light/lines-bmap.jpg index 26da7ae7..93bfa253 100644 Binary files a/public/data/thumb-light/lines-bmap.jpg and b/public/data/thumb-light/lines-bmap.jpg differ diff --git a/public/data/thumb-light/map-bin.jpg b/public/data/thumb-light/map-bin.jpg index 51fc0436..ec71ca2a 100644 Binary files a/public/data/thumb-light/map-bin.jpg and b/public/data/thumb-light/map-bin.jpg differ diff --git a/public/data/thumb-light/map-china-dataRange.jpg b/public/data/thumb-light/map-china-dataRange.jpg index e9b12aea..466b0751 100644 Binary files a/public/data/thumb-light/map-china-dataRange.jpg and b/public/data/thumb-light/map-china-dataRange.jpg differ diff --git a/public/data/thumb-light/map-china.jpg b/public/data/thumb-light/map-china.jpg index 4678c5c6..218819bc 100644 Binary files a/public/data/thumb-light/map-china.jpg and b/public/data/thumb-light/map-china.jpg differ diff --git a/public/data/thumb-light/map-labels.jpg b/public/data/thumb-light/map-labels.jpg index e350b789..b386ec3a 100644 Binary files a/public/data/thumb-light/map-labels.jpg and b/public/data/thumb-light/map-labels.jpg differ diff --git a/public/data/thumb-light/map-locate.jpg b/public/data/thumb-light/map-locate.jpg index 5eeec3d8..3f94a2eb 100644 Binary files a/public/data/thumb-light/map-locate.jpg and b/public/data/thumb-light/map-locate.jpg differ diff --git a/public/data/thumb-light/map-polygon.jpg b/public/data/thumb-light/map-polygon.jpg index 0ba50865..f3131da6 100644 Binary files a/public/data/thumb-light/map-polygon.jpg and b/public/data/thumb-light/map-polygon.jpg differ diff --git a/public/data/thumb-light/mix-timeline-finance.jpg b/public/data/thumb-light/mix-timeline-finance.jpg index 22d29b24..cdae51bb 100644 Binary files a/public/data/thumb-light/mix-timeline-finance.jpg and b/public/data/thumb-light/mix-timeline-finance.jpg differ diff --git a/public/data/thumb-light/pictorialBar-dotted.jpg b/public/data/thumb-light/pictorialBar-dotted.jpg index 4c1ab6e5..c6299f80 100644 Binary files a/public/data/thumb-light/pictorialBar-dotted.jpg and b/public/data/thumb-light/pictorialBar-dotted.jpg differ diff --git a/public/data/thumb-light/scatter-effect.jpg b/public/data/thumb-light/scatter-effect.jpg index bdad2341..417168aa 100644 Binary files a/public/data/thumb-light/scatter-effect.jpg and b/public/data/thumb-light/scatter-effect.jpg differ diff --git a/public/data/thumb-light/scatter-life-expectancy-timeline.jpg b/public/data/thumb-light/scatter-life-expectancy-timeline.jpg index 30430645..b6385de8 100644 Binary files a/public/data/thumb-light/scatter-life-expectancy-timeline.jpg and b/public/data/thumb-light/scatter-life-expectancy-timeline.jpg differ diff --git a/public/data/thumb-light/scatter-map-brush.jpg b/public/data/thumb-light/scatter-map-brush.jpg index 98590fe6..f23f6ff2 100644 Binary files a/public/data/thumb-light/scatter-map-brush.jpg and b/public/data/thumb-light/scatter-map-brush.jpg differ diff --git a/public/data/thumb-light/scatter-map.jpg b/public/data/thumb-light/scatter-map.jpg index 9a0610ec..56363967 100644 Binary files a/public/data/thumb-light/scatter-map.jpg and b/public/data/thumb-light/scatter-map.jpg differ diff --git a/public/data/thumb-light/scatter-nutrients-matrix.jpg b/public/data/thumb-light/scatter-nutrients-matrix.jpg index b9f7416f..9f2c9ca5 100644 Binary files a/public/data/thumb-light/scatter-nutrients-matrix.jpg and b/public/data/thumb-light/scatter-nutrients-matrix.jpg differ diff --git a/public/data/thumb-light/scatter-nutrients.jpg b/public/data/thumb-light/scatter-nutrients.jpg index f1893b85..3f5deeda 100644 Binary files a/public/data/thumb-light/scatter-nutrients.jpg and b/public/data/thumb-light/scatter-nutrients.jpg differ diff --git a/public/data/thumb-light/scatter-weibo.jpg b/public/data/thumb-light/scatter-weibo.jpg index a4534cdf..8f2107fc 100644 Binary files a/public/data/thumb-light/scatter-weibo.jpg and b/public/data/thumb-light/scatter-weibo.jpg differ diff --git a/public/data/thumb-light/tree-polyline.jpg b/public/data/thumb-light/tree-polyline.jpg index 2c62a218..4f93effd 100644 Binary files a/public/data/thumb-light/tree-polyline.jpg and b/public/data/thumb-light/tree-polyline.jpg differ diff --git a/public/data/thumb-light/treemap-obama.jpg b/public/data/thumb-light/treemap-obama.jpg index ae99d7e7..0b53e39b 100644 Binary files a/public/data/thumb-light/treemap-obama.jpg and b/public/data/thumb-light/treemap-obama.jpg differ diff --git a/public/data/thumb/area-pieces.jpg b/public/data/thumb/area-pieces.jpg new file mode 100644 index 00000000..1060f081 Binary files /dev/null and b/public/data/thumb/area-pieces.jpg differ diff --git a/public/data/thumb/calendar-charts.jpg b/public/data/thumb/calendar-charts.jpg index 1f4830be..7d89f6e2 100644 Binary files a/public/data/thumb/calendar-charts.jpg and b/public/data/thumb/calendar-charts.jpg differ diff --git a/public/data/thumb/calendar-effectscatter.jpg b/public/data/thumb/calendar-effectscatter.jpg index ec3cb2d9..a4846f81 100644 Binary files a/public/data/thumb/calendar-effectscatter.jpg and b/public/data/thumb/calendar-effectscatter.jpg differ diff --git a/public/data/thumb/confidence-band.jpg b/public/data/thumb/confidence-band.jpg index ec7418d2..8148a70f 100644 Binary files a/public/data/thumb/confidence-band.jpg and b/public/data/thumb/confidence-band.jpg differ diff --git a/public/data/thumb/custom-hexbin.jpg b/public/data/thumb/custom-hexbin.jpg index 368657bf..6cdb0bce 100644 Binary files a/public/data/thumb/custom-hexbin.jpg and b/public/data/thumb/custom-hexbin.jpg differ diff --git a/public/data/thumb/custom-profile.jpg b/public/data/thumb/custom-profile.jpg index ee6fa59f..8237f41a 100644 Binary files a/public/data/thumb/custom-profile.jpg and b/public/data/thumb/custom-profile.jpg differ diff --git a/public/data/thumb/dynamic-data.jpg b/public/data/thumb/dynamic-data.jpg index 726217c2..3800b075 100644 Binary files a/public/data/thumb/dynamic-data.jpg and b/public/data/thumb/dynamic-data.jpg differ diff --git a/public/data/thumb/effectScatter-bmap.jpg b/public/data/thumb/effectScatter-bmap.jpg index 20419d48..604b950c 100644 Binary files a/public/data/thumb/effectScatter-bmap.jpg and b/public/data/thumb/effectScatter-bmap.jpg differ diff --git a/public/data/thumb/effectScatter-map.jpg b/public/data/thumb/effectScatter-map.jpg index c7eef043..b0f3da2b 100644 Binary files a/public/data/thumb/effectScatter-map.jpg and b/public/data/thumb/effectScatter-map.jpg differ diff --git a/public/data/thumb/geo-lines.jpg b/public/data/thumb/geo-lines.jpg index eb4215ec..7265a2ee 100644 Binary files a/public/data/thumb/geo-lines.jpg and b/public/data/thumb/geo-lines.jpg differ diff --git a/public/data/thumb/geo-map-scatter.jpg b/public/data/thumb/geo-map-scatter.jpg index 5f4f1ab3..9179a099 100644 Binary files a/public/data/thumb/geo-map-scatter.jpg and b/public/data/thumb/geo-map-scatter.jpg differ diff --git a/public/data/thumb/graph-force.jpg b/public/data/thumb/graph-force.jpg index bacd460b..69ce6097 100644 Binary files a/public/data/thumb/graph-force.jpg and b/public/data/thumb/graph-force.jpg differ diff --git a/public/data/thumb/graph-life-expectancy.jpg b/public/data/thumb/graph-life-expectancy.jpg index b4fa2e70..b46e75a4 100644 Binary files a/public/data/thumb/graph-life-expectancy.jpg and b/public/data/thumb/graph-life-expectancy.jpg differ diff --git a/public/data/thumb/graph-webkit-dep.jpg b/public/data/thumb/graph-webkit-dep.jpg index fbeac11d..3b6702cf 100644 Binary files a/public/data/thumb/graph-webkit-dep.jpg and b/public/data/thumb/graph-webkit-dep.jpg differ diff --git a/public/data/thumb/graph.jpg b/public/data/thumb/graph.jpg index a0985a2f..ea1c67c4 100644 Binary files a/public/data/thumb/graph.jpg and b/public/data/thumb/graph.jpg differ diff --git a/public/data/thumb/heatmap-bmap.jpg b/public/data/thumb/heatmap-bmap.jpg index e672d833..6703db7b 100644 Binary files a/public/data/thumb/heatmap-bmap.jpg and b/public/data/thumb/heatmap-bmap.jpg differ diff --git a/public/data/thumb/heatmap-map.jpg b/public/data/thumb/heatmap-map.jpg index 4bb61f75..99d1ed8b 100644 Binary files a/public/data/thumb/heatmap-map.jpg and b/public/data/thumb/heatmap-map.jpg differ diff --git a/public/data/thumb/line-graphic.jpg b/public/data/thumb/line-graphic.jpg index f3e04d95..267e6136 100644 Binary files a/public/data/thumb/line-graphic.jpg and b/public/data/thumb/line-graphic.jpg differ diff --git a/public/data/thumb/lines-bmap-bus.jpg b/public/data/thumb/lines-bmap-bus.jpg index 6cbddac5..dec84eec 100644 Binary files a/public/data/thumb/lines-bmap-bus.jpg and b/public/data/thumb/lines-bmap-bus.jpg differ diff --git a/public/data/thumb/lines-bmap.jpg b/public/data/thumb/lines-bmap.jpg index 26da7ae7..93bfa253 100644 Binary files a/public/data/thumb/lines-bmap.jpg and b/public/data/thumb/lines-bmap.jpg differ diff --git a/public/data/thumb/map-bin.jpg b/public/data/thumb/map-bin.jpg index 51fc0436..ec71ca2a 100644 Binary files a/public/data/thumb/map-bin.jpg and b/public/data/thumb/map-bin.jpg differ diff --git a/public/data/thumb/map-china-dataRange.jpg b/public/data/thumb/map-china-dataRange.jpg index ae00cea7..07a3e045 100644 Binary files a/public/data/thumb/map-china-dataRange.jpg and b/public/data/thumb/map-china-dataRange.jpg differ diff --git a/public/data/thumb/map-china.jpg b/public/data/thumb/map-china.jpg index 4678c5c6..218819bc 100644 Binary files a/public/data/thumb/map-china.jpg and b/public/data/thumb/map-china.jpg differ diff --git a/public/data/thumb/map-labels.jpg b/public/data/thumb/map-labels.jpg index e350b789..b386ec3a 100644 Binary files a/public/data/thumb/map-labels.jpg and b/public/data/thumb/map-labels.jpg differ diff --git a/public/data/thumb/map-locate.jpg b/public/data/thumb/map-locate.jpg index 5eeec3d8..3f94a2eb 100644 Binary files a/public/data/thumb/map-locate.jpg and b/public/data/thumb/map-locate.jpg differ diff --git a/public/data/thumb/map-polygon.jpg b/public/data/thumb/map-polygon.jpg index b7969529..bd8cf9d9 100644 Binary files a/public/data/thumb/map-polygon.jpg and b/public/data/thumb/map-polygon.jpg differ diff --git a/public/data/thumb/mix-timeline-finance.jpg b/public/data/thumb/mix-timeline-finance.jpg index ca29f66b..f7314ae0 100644 Binary files a/public/data/thumb/mix-timeline-finance.jpg and b/public/data/thumb/mix-timeline-finance.jpg differ diff --git a/public/data/thumb/pictorialBar-dotted.jpg b/public/data/thumb/pictorialBar-dotted.jpg index a4d1fe8c..d857c369 100644 Binary files a/public/data/thumb/pictorialBar-dotted.jpg and b/public/data/thumb/pictorialBar-dotted.jpg differ diff --git a/public/data/thumb/scatter-effect.jpg b/public/data/thumb/scatter-effect.jpg index 076b6791..1b510709 100644 Binary files a/public/data/thumb/scatter-effect.jpg and b/public/data/thumb/scatter-effect.jpg differ diff --git a/public/data/thumb/scatter-life-expectancy-timeline.jpg b/public/data/thumb/scatter-life-expectancy-timeline.jpg index 7d8f9797..e54cf23a 100644 Binary files a/public/data/thumb/scatter-life-expectancy-timeline.jpg and b/public/data/thumb/scatter-life-expectancy-timeline.jpg differ diff --git a/public/data/thumb/scatter-map-brush.jpg b/public/data/thumb/scatter-map-brush.jpg index 98590fe6..f23f6ff2 100644 Binary files a/public/data/thumb/scatter-map-brush.jpg and b/public/data/thumb/scatter-map-brush.jpg differ diff --git a/public/data/thumb/scatter-map.jpg b/public/data/thumb/scatter-map.jpg index 30452afc..41aaede7 100644 Binary files a/public/data/thumb/scatter-map.jpg and b/public/data/thumb/scatter-map.jpg differ diff --git a/public/data/thumb/scatter-nebula.jpg b/public/data/thumb/scatter-nebula.jpg index 0a6af815..f8f92cc1 100644 Binary files a/public/data/thumb/scatter-nebula.jpg and b/public/data/thumb/scatter-nebula.jpg differ diff --git a/public/data/thumb/scatter-nutrients-matrix.jpg b/public/data/thumb/scatter-nutrients-matrix.jpg index a2bf8cdc..b0fcc7a8 100644 Binary files a/public/data/thumb/scatter-nutrients-matrix.jpg and b/public/data/thumb/scatter-nutrients-matrix.jpg differ diff --git a/public/data/thumb/scatter-nutrients.jpg b/public/data/thumb/scatter-nutrients.jpg index 891cbc84..cb0d533b 100644 Binary files a/public/data/thumb/scatter-nutrients.jpg and b/public/data/thumb/scatter-nutrients.jpg differ diff --git a/public/data/thumb/scatter-weibo.jpg b/public/data/thumb/scatter-weibo.jpg index a4534cdf..3f5c655b 100644 Binary files a/public/data/thumb/scatter-weibo.jpg and b/public/data/thumb/scatter-weibo.jpg differ diff --git a/public/data/thumb/tree-polyline.jpg b/public/data/thumb/tree-polyline.jpg index 2c62a218..4f93effd 100644 Binary files a/public/data/thumb/tree-polyline.jpg and b/public/data/thumb/tree-polyline.jpg differ diff --git a/public/data/thumb/treemap-obama.jpg b/public/data/thumb/treemap-obama.jpg index a990f4a3..278bacc4 100644 Binary files a/public/data/thumb/treemap-obama.jpg and b/public/data/thumb/treemap-obama.jpg differ diff --git a/public/javascripts/chart-list-data.js b/public/javascripts/chart-list-data.js index 1675eba7..190f0393 100644 --- a/public/javascripts/chart-list-data.js +++ b/public/javascripts/chart-list-data.js @@ -113,6 +113,15 @@ var EXAMPLES = [ "title": "Share Dataset", "difficulty": 4 }, + { + "category": [ + "line", + "visualMap" + ], + "id": "area-pieces", + "title": "Area Pieces", + "difficulty": 10 + }, { "category": [ "line" diff --git a/public/vendors/echarts/echarts.js b/public/vendors/echarts/echarts.js index 187186c9..49a25822 100644 --- a/public/vendors/echarts/echarts.js +++ b/public/vendors/echarts/echarts.js @@ -1285,7 +1285,11 @@ Draggable.prototype = { _dragStart: function (e) { var draggingTarget = e.target; - if (draggingTarget && draggingTarget.draggable) { + // Find if there is draggable in the ancestor + while (draggingTarget && !draggingTarget.draggable) { + draggingTarget = draggingTarget.parent; + } + if (draggingTarget) { this._draggingTarget = draggingTarget; draggingTarget.dragging = true; this._x = e.offsetX; @@ -1714,6 +1718,8 @@ function buildTransformer(src, dest) { var detCache = {}; var det = determinant(mA, 8, 0, 0, 0, detCache); if (det === 0) { + // can not make transformer when and only when + // any three of the markers are collinear. return; } @@ -1736,6 +1742,153 @@ function buildTransformer(src, dest) { }; } +var EVENT_SAVED_PROP = '___zrEVENTSAVED'; +var _calcOut$1 = []; + +/** + * Transform "local coord" from `elFrom` to `elTarget`. + * "local coord": the coord based on the input `el`. The origin point is at + * the position of "left: 0; top: 0;" in the `el`. + * + * Support when CSS transform is used. + * + * Having the `out` (that is, `[outX, outY]`), we can create an DOM element + * and set the CSS style as "left: outX; top: outY;" and append it to `elTarge` + * to locate the element. + * + * For example, this code below positions a child of `document.body` on the event + * point, no matter whether `body` has `margin`/`paddin`/`transfrom`/... : + * ```js + * transformLocalCoord(out, container, document.body, event.offsetX, event.offsetY); + * if (!eqNaN(out[0])) { + * // Then locate the tip element on the event point. + * var tipEl = document.createElement('div'); + * tipEl.style.cssText = 'position: absolute; left:' + out[0] + ';top:' + out[1] + ';'; + * document.body.appendChild(tipEl); + * } + * ``` + * + * Notice: In some env this method is not supported. If called, `out` will be `[NaN, NaN]`. + * + * @param {Array.} out [inX: number, inY: number] The output.. + * If can not transform, `out` will not be modified but return `false`. + * @param {HTMLElement} elFrom The `[inX, inY]` is based on elFrom. + * @param {HTMLElement} elTarget The `out` is based on elTarget. + * @param {number} inX + * @param {number} inY + * @return {boolean} Whether transform successfully. + */ +function transformLocalCoord(out, elFrom, elTarget, inX, inY) { + return transformCoordWithViewport(_calcOut$1, elFrom, inX, inY, true) + && transformCoordWithViewport(out, elTarget, _calcOut$1[0], _calcOut$1[1]); +} + +/** + * Transform between a "viewport coord" and a "local coord". + * "viewport coord": the coord based on the left-top corner of the viewport + * of the browser. + * "local coord": the coord based on the input `el`. The origin point is at + * the position of "left: 0; top: 0;" in the `el`. + * + * Support the case when CSS transform is used on el. + * + * @param {Array.} out [inX: number, inY: number] The output. If `inverse: false`, + * it represents "local coord", otherwise "vireport coord". + * If can not transform, `out` will not be modified but return `false`. + * @param {HTMLElement} el The "local coord" is based on the `el`, see comment above. + * @param {number} inX If `inverse: false`, + * it represents "vireport coord", otherwise "local coord". + * @param {number} inY If `inverse: false`, + * it represents "vireport coord", otherwise "local coord". + * @param {boolean} [inverse=false] + * `true`: from "viewport coord" to "local coord". + * `false`: from "local coord" to "viewport coord". + * @return {boolean} Whether transform successfully. + */ +function transformCoordWithViewport(out, el, inX, inY, inverse) { + if (el.getBoundingClientRect && env$1.domSupported && !isCanvasEl(el)) { + var saved = el[EVENT_SAVED_PROP] || (el[EVENT_SAVED_PROP] = {}); + var markers = prepareCoordMarkers(el, saved); + var transformer = preparePointerTransformer(markers, saved, inverse); + if (transformer) { + transformer(out, inX, inY); + return true; + } + } + return false; +} + +function prepareCoordMarkers(el, saved) { + var markers = saved.markers; + if (markers) { + return markers; + } + + markers = saved.markers = []; + var propLR = ['left', 'right']; + var propTB = ['top', 'bottom']; + + for (var i = 0; i < 4; i++) { + var marker = document.createElement('div'); + var stl = marker.style; + var idxLR = i % 2; + var idxTB = (i >> 1) % 2; + stl.cssText = [ + 'position: absolute', + 'visibility: hidden', + 'padding: 0', + 'margin: 0', + 'border-width: 0', + 'user-select: none', + 'width:0', + 'height:0', + // 'width: 5px', + // 'height: 5px', + propLR[idxLR] + ':0', + propTB[idxTB] + ':0', + propLR[1 - idxLR] + ':auto', + propTB[1 - idxTB] + ':auto', + '' + ].join('!important;'); + el.appendChild(marker); + markers.push(marker); + } + + return markers; +} + +function preparePointerTransformer(markers, saved, inverse) { + var transformerName = inverse ? 'invTrans' : 'trans'; + var transformer = saved[transformerName]; + var oldSrcCoords = saved.srcCoords; + var oldCoordTheSame = true; + var srcCoords = []; + var destCoords = []; + + for (var i = 0; i < 4; i++) { + var rect = markers[i].getBoundingClientRect(); + var ii = 2 * i; + var x = rect.left; + var y = rect.top; + srcCoords.push(x, y); + oldCoordTheSame = oldCoordTheSame && oldSrcCoords && x === oldSrcCoords[ii] && y === oldSrcCoords[ii + 1]; + destCoords.push(markers[i].offsetLeft, markers[i].offsetTop); + } + // Cache to avoid time consuming of `buildTransformer`. + return (oldCoordTheSame && transformer) + ? transformer + : ( + saved.srcCoords = srcCoords, + saved[transformerName] = inverse + ? buildTransformer(destCoords, srcCoords) + : buildTransformer(srcCoords, destCoords) + ); +} + +function isCanvasEl(el) { + return el.nodeName.toUpperCase() === 'CANVAS'; +} + /** * Utilities for mouse or touch events. */ @@ -1743,7 +1896,6 @@ function buildTransformer(src, dest) { var isDomLevel2 = (typeof window !== 'undefined') && !!window.addEventListener; var MOUSE_EVENT_REG = /^(?:mouse|pointer|contextmenu|drag|drop)|click/; -var EVENT_SAVED_PROP = '___zrEVENTSAVED'; var _calcOut = []; /** @@ -1808,11 +1960,11 @@ function clientToLocal(el, e, out, calculate) { function calculateZrXY(el, e, out) { // BlackBerry 5, iOS 3 (original iPhone) don't have getBoundingRect. - if (el.getBoundingClientRect && env$1.domSupported) { + if (env$1.domSupported && el.getBoundingClientRect) { var ex = e.clientX; var ey = e.clientY; - if (el.nodeName.toUpperCase() === 'CANVAS') { + if (isCanvasEl(el)) { // Original approach, which do not support CSS transform. // marker can not be locationed in a canvas container // (getBoundingClientRect is always 0). We do not support @@ -1824,10 +1976,7 @@ function calculateZrXY(el, e, out) { return; } else { - var saved = el[EVENT_SAVED_PROP] || (el[EVENT_SAVED_PROP] = {}); - var transformer = preparePointerTransformer(prepareCoordMarkers(el, saved), saved); - if (transformer) { - transformer(_calcOut, ex, ey); + if (transformCoordWithViewport(_calcOut, el, ex, ey)) { out.zrX = _calcOut[0]; out.zrY = _calcOut[1]; return; @@ -1837,70 +1986,6 @@ function calculateZrXY(el, e, out) { out.zrX = out.zrY = 0; } -function prepareCoordMarkers(el, saved) { - var markers = saved.markers; - if (markers) { - return markers; - } - - markers = saved.markers = []; - var propLR = ['left', 'right']; - var propTB = ['top', 'bottom']; - - for (var i = 0; i < 4; i++) { - var marker = document.createElement('div'); - var stl = marker.style; - var idxLR = i % 2; - var idxTB = (i >> 1) % 2; - stl.cssText = [ - 'position:absolute', - 'visibility: hidden', - 'padding: 0', - 'margin: 0', - 'border-width: 0', - 'width:0', - 'height:0', - // 'width: 5px', - // 'height: 5px', - propLR[idxLR] + ':0', - propTB[idxTB] + ':0', - propLR[1 - idxLR] + ':auto', - propTB[1 - idxTB] + ':auto', - '' - ].join('!important;'); - el.appendChild(marker); - markers.push(marker); - } - - return markers; -} - -function preparePointerTransformer(markers, saved) { - var transformer = saved.transformer; - var oldSrcCoords = saved.srcCoords; - var useOld = true; - var srcCoords = []; - var destCoords = []; - - for (var i = 0; i < 4; i++) { - var rect = markers[i].getBoundingClientRect(); - var ii = 2 * i; - var x = rect.left; - var y = rect.top; - srcCoords.push(x, y); - useOld &= oldSrcCoords && x === oldSrcCoords[ii] && y === oldSrcCoords[ii + 1]; - destCoords.push(markers[i].offsetLeft, markers[i].offsetTop); - } - - // Cache to avoid time consuming of `buildTransformer`. - return useOld - ? transformer - : ( - saved.srcCoords = srcCoords, - saved.transformer = buildTransformer(srcCoords, destCoords) - ); -} - /** * Find native event compat for legency IE. * Should be called at the begining of a native event listener. @@ -4770,7 +4855,7 @@ var Animator = function (target, loop, getter, setter) { Animator.prototype = { /** - * 设置动画关键帧 + * Set Animation keyframe * @param {number} time 关键帧时间,单位是ms * @param {Object} props 关键帧的属性值,key-value表示 * @return {module:zrender/animation/Animator} @@ -4849,7 +4934,7 @@ Animator.prototype = { } }, /** - * 开始执行动画 + * Start the animation * @param {string|Function} [easing] * 动画缓动函数,详见{@link module:zrender/animation/easing} * @param {boolean} forceAnimate @@ -4910,7 +4995,7 @@ Animator.prototype = { return this; }, /** - * 停止动画 + * Stop animation * @param {boolean} forwardToLast If move to last frame before stop */ stop: function (forwardToLast) { @@ -4927,7 +5012,7 @@ Animator.prototype = { clipList.length = 0; }, /** - * 设置动画延迟开始的时间 + * Set when animation delay starts * @param {number} time 单位ms * @return {module:zrender/animation/Animator} */ @@ -4936,7 +5021,7 @@ Animator.prototype = { return this; }, /** - * 添加动画结束的回调 + * Add callback for animation end * @param {Function} cb * @return {module:zrender/animation/Animator} */ @@ -4988,7 +5073,7 @@ if (debugMode === 1) { var logError$1 = logError; /** - * @alias modue:zrender/mixin/Animatable + * @alias module:zrender/mixin/Animatable * @constructor */ var Animatable = function () { @@ -10666,7 +10751,7 @@ Painter.prototype = { }; /** - * 动画主类, 调度和管理所有动画控制器 + * Animation main class, dispatch and manage all animation controllers * * @module zrender/animation/Animation * @author pissang(https://github.com/pissang) @@ -10731,14 +10816,14 @@ Animation.prototype = { constructor: Animation, /** - * 添加 clip + * Add clip * @param {module:zrender/animation/Clip} clip */ addClip: function (clip) { this._clips.push(clip); }, /** - * 添加 animator + * Add animator * @param {module:zrender/animation/Animator} animator */ addAnimator: function (animator) { @@ -10749,7 +10834,7 @@ Animation.prototype = { } }, /** - * 删除动画片段 + * Delete animation clip * @param {module:zrender/animation/Clip} clip */ removeClip: function (clip) { @@ -10760,7 +10845,7 @@ Animation.prototype = { }, /** - * 删除动画片段 + * Delete animation clip * @param {module:zrender/animation/Animator} animator */ removeAnimator: function (animator) { @@ -11027,13 +11112,16 @@ function normalizeGlobalEvent(instance, event) { * Detect whether the given el is in `painterRoot`. */ function isLocalEl(instance, el) { + var elTmp = el; var isLocal = false; - do { - el = el && el.parentNode; + while (elTmp && elTmp.nodeType !== 9 + && !( + isLocal = elTmp.domBelongToZr + || (elTmp !== el && elTmp === instance.painterRoot) + ) + ) { + elTmp = elTmp.parentNode; } - while (el && el.nodeType !== 9 && !( - isLocal = el === instance.painterRoot - )); return isLocal; } @@ -11488,7 +11576,7 @@ var instances$1 = {}; // ZRender实例map索引 /** * @type {string} */ -var version$1 = '4.2.0'; +var version$1 = '4.3.0'; /** * Initializing a zrender instance @@ -16433,12 +16521,10 @@ var round = Math.round; * @param {number} [inputShape.x2] * @param {number} [inputShape.y2] * @param {Object} [style] - * @param {number} [style.lineWidth] + * @param {number} [style.lineWidth] If `null`/`undefined`/`0`, do not optimize. */ function subPixelOptimizeLine$1(outputShape, inputShape, style) { - var lineWidth = style && style.lineWidth; - - if (!inputShape || !lineWidth) { + if (!inputShape) { return; } @@ -16447,20 +16533,22 @@ function subPixelOptimizeLine$1(outputShape, inputShape, style) { var y1 = inputShape.y1; var y2 = inputShape.y2; + outputShape.x1 = x1; + outputShape.x2 = x2; + outputShape.y1 = y1; + outputShape.y2 = y2; + + var lineWidth = style && style.lineWidth; + if (!lineWidth) { + return; + } + if (round(x1 * 2) === round(x2 * 2)) { outputShape.x1 = outputShape.x2 = subPixelOptimize$1(x1, lineWidth, true); } - else { - outputShape.x1 = x1; - outputShape.x2 = x2; - } if (round(y1 * 2) === round(y2 * 2)) { outputShape.y1 = outputShape.y2 = subPixelOptimize$1(y1, lineWidth, true); } - else { - outputShape.y1 = y1; - outputShape.y2 = y2; - } } /** @@ -16476,12 +16564,10 @@ function subPixelOptimizeLine$1(outputShape, inputShape, style) { * @param {number} [inputShape.width] * @param {number} [inputShape.height] * @param {Object} [style] - * @param {number} [style.lineWidth] + * @param {number} [style.lineWidth] If `null`/`undefined`/`0`, do not optimize. */ function subPixelOptimizeRect$1(outputShape, inputShape, style) { - var lineWidth = style && style.lineWidth; - - if (!inputShape || !lineWidth) { + if (!inputShape) { return; } @@ -16490,6 +16576,16 @@ function subPixelOptimizeRect$1(outputShape, inputShape, style) { var originWidth = inputShape.width; var originHeight = inputShape.height; + outputShape.x = originX; + outputShape.y = originY; + outputShape.width = originWidth; + outputShape.height = originHeight; + + var lineWidth = style && style.lineWidth; + if (!lineWidth) { + return; + } + outputShape.x = subPixelOptimize$1(originX, lineWidth, true); outputShape.y = subPixelOptimize$1(originY, lineWidth, true); outputShape.width = Math.max( @@ -16506,11 +16602,14 @@ function subPixelOptimizeRect$1(outputShape, inputShape, style) { * Sub pixel optimize for canvas * * @param {number} position Coordinate, such as x, y - * @param {number} lineWidth Should be nonnegative integer. + * @param {number} lineWidth If `null`/`undefined`/`0`, do not optimize. * @param {boolean=} positiveOrNegative Default false (negative). * @return {number} Optimized position. */ function subPixelOptimize$1(position, lineWidth, positiveOrNegative) { + if (!lineWidth) { + return position; + } // Assure that (position + lineWidth / 2) is near integer edge, // otherwise line will be fuzzy in canvas. var doubledPosition = round(position * 2); @@ -18211,7 +18310,7 @@ function animateOrSetProps(isUpdate, el, props, animatableModel, dataIndex, cb) * configuration in series. * * Caution: this method will stop previous animation. - * So if do not use this method to one element twice before + * So do not use this method to one element twice before * animation starts, unless you know what you are doing. * * @param {module:zrender/Element} el @@ -18237,7 +18336,7 @@ function updateProps(el, props, animatableModel, dataIndex, cb) { * configuration in series. * * Caution: this method will stop previous animation. - * So if do not use this method to one element twice before + * So do not use this method to one element twice before * animation starts, unless you know what you are doing. * * @param {module:zrender/Element} el @@ -25098,8 +25197,11 @@ var createRenderPlanner = function () { var originalLarge = fields.large; var originalProgressive = fields.progressiveRender; - var large = fields.large = pipelineContext.large; - var progressive = fields.progressiveRender = pipelineContext.progressiveRender; + // FIXME: if the planner works on a filtered series, `pipelineContext` does not + // exists. See #11611 . Probably we need to modify this structure, see the comment + // on `performRawSeries` in `Schedular.js`. + var large = fields.large = pipelineContext && pipelineContext.large; + var progressive = fields.progressiveRender = pipelineContext && pipelineContext.progressiveRender; return !!((originalLarge ^ large) || (originalProgressive ^ progressive)) && 'reset'; }; @@ -26274,6 +26376,14 @@ function performStageTasks(scheduler, stageHandlers, ecModel, payload, opt) { task.dirty(); } var performArgs = scheduler.getPerformArgs(task, opt.block); + // FIXME + // if intending to decalare `performRawSeries` in handlers, only + // stream-independent (specifically, data item independent) operations can be + // performed. Because is a series is filtered, most of the tasks will not + // be performed. A stream-dependent operation probably cause wrong biz logic. + // Perhaps we should not provide a separate callback for this case instead + // of providing the config `performRawSeries`. The stream-dependent operaions + // and stream-independent operations should better not be mixed. performArgs.skip = !stageHandler.performRawSeries && ecModel.isSeriesFiltered(task.context.model); updatePayload(task, payload); @@ -27652,10 +27762,10 @@ var isFunction = isFunction$1; var isObject = isObject$1; var parseClassType = ComponentModel.parseClassType; -var version = '4.6.0'; +var version = '4.7.0'; var dependencies = { - zrender: '4.2.0' + zrender: '4.3.0' }; var TEST_FRAME_REMAIN_TIME = 1; @@ -33940,7 +34050,7 @@ var IntervalScale = Scale.extend({ if (extent[0] < niceTickExtent[0]) { if (expandToNicedExtent) { - ticks.push(roundNumber(niceTickExtent[0] - interval)); + ticks.push(roundNumber(niceTickExtent[0] - interval, intervalPrecision)); } else { ticks.push(extent[0]); @@ -33966,7 +34076,7 @@ var IntervalScale = Scale.extend({ var lastNiceTick = ticks.length ? ticks[ticks.length - 1] : niceTickExtent[1]; if (extent[1] > lastNiceTick) { if (expandToNicedExtent) { - ticks.push(lastNiceTick + interval); + ticks.push(roundNumber(lastNiceTick + interval, intervalPrecision)); } else { ticks.push(extent[1]); @@ -34541,11 +34651,6 @@ function layout(seriesType, ecModel) { var value = data.get(valueDim, idx); var baseValue = data.get(baseDim, idx); - // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in "axisProxy". - if (isNaN(value) || isNaN(baseValue)) { - continue; - } - var sign = value >= 0 ? 'p' : 'n'; var baseCoord = valueAxisStart; @@ -34578,7 +34683,10 @@ function layout(seriesType, ecModel) { if (Math.abs(width) < barMinHeight) { width = (width < 0 ? -1 : 1) * barMinHeight; } - stacked && (lastStackCoords[stackId][baseValue][sign] += width); + // Ignore stack from NaN value + if (!isNaN(width)) { + stacked && (lastStackCoords[stackId][baseValue][sign] += width); + } } else { var coord = cartesian.dataToPoint([baseValue, value]); @@ -34591,7 +34699,10 @@ function layout(seriesType, ecModel) { // Include zero to has a positive bar height = (height <= 0 ? -1 : 1) * barMinHeight; } - stacked && (lastStackCoords[stackId][baseValue][sign] += height); + // Ignore stack from NaN value + if (!isNaN(height)) { + stacked && (lastStackCoords[stackId][baseValue][sign] += height); + } } data.setItemLayout(idx, { @@ -34619,6 +34730,7 @@ var largeLayout = { var data = seriesModel.getData(); var cartesian = seriesModel.coordinateSystem; + var coordLayout = cartesian.grid.getRect(); var baseAxis = cartesian.getBaseAxis(); var valueAxis = cartesian.getOtherAxis(baseAxis); var valueDim = data.mapDimension(valueAxis.dim); @@ -34638,6 +34750,7 @@ var largeLayout = { function progress(params, data) { var count = params.count; var largePoints = new LargeArr(count * 2); + var largeBackgroundPoints = new LargeArr(count * 2); var largeDataIndices = new LargeArr(count); var dataIndex; var coord = []; @@ -34651,7 +34764,9 @@ var largeLayout = { coord = cartesian.dataToPoint(valuePair, null, coord); // Data index might not be in order, depends on `progressiveChunkMode`. + largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coordLayout.x + coordLayout.width : coord[0]; largePoints[pointsOffset++] = coord[0]; + largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coord[1] : coordLayout.y + coordLayout.height; largePoints[pointsOffset++] = coord[1]; largeDataIndices[idxOffset++] = dataIndex; } @@ -34659,8 +34774,10 @@ var largeLayout = { data.setLayout({ largePoints: largePoints, largeDataIndices: largeDataIndices, + largeBackgroundPoints: largeBackgroundPoints, barWidth: barWidth, valueAxisStart: getValueAxisStart(baseAxis, valueAxis, false), + backgroundStart: valueAxisHorizontal ? coordLayout.x : coordLayout.y, valueAxisHorizontal: valueAxisHorizontal }); } @@ -42547,6 +42664,117 @@ function layout$1(gridModel, axisModel, opt) { * under the License. */ +function rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel) { + var axis = axisModel.axis; + + if (axis.scale.isBlank()) { + return; + } + + var splitAreaModel = axisModel.getModel('splitArea'); + var areaStyleModel = splitAreaModel.getModel('areaStyle'); + var areaColors = areaStyleModel.get('color'); + + var gridRect = gridModel.coordinateSystem.getRect(); + + var ticksCoords = axis.getTicksCoords({ + tickModel: splitAreaModel, + clamp: true + }); + + if (!ticksCoords.length) { + return; + } + + // For Making appropriate splitArea animation, the color and anid + // should be corresponding to previous one if possible. + var areaColorsLen = areaColors.length; + var lastSplitAreaColors = axisView.__splitAreaColors; + var newSplitAreaColors = createHashMap(); + var colorIndex = 0; + if (lastSplitAreaColors) { + for (var i = 0; i < ticksCoords.length; i++) { + var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue); + if (cIndex != null) { + colorIndex = (cIndex + (areaColorsLen - 1) * i) % areaColorsLen; + break; + } + } + } + + var prev = axis.toGlobalCoord(ticksCoords[0].coord); + + var areaStyle = areaStyleModel.getAreaStyle(); + areaColors = isArray(areaColors) ? areaColors : [areaColors]; + + for (var i = 1; i < ticksCoords.length; i++) { + var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord); + + var x; + var y; + var width; + var height; + if (axis.isHorizontal()) { + x = prev; + y = gridRect.y; + width = tickCoord - x; + height = gridRect.height; + prev = x + width; + } + else { + x = gridRect.x; + y = prev; + width = gridRect.width; + height = tickCoord - y; + prev = y + height; + } + + var tickValue = ticksCoords[i - 1].tickValue; + tickValue != null && newSplitAreaColors.set(tickValue, colorIndex); + + axisGroup.add(new Rect({ + anid: tickValue != null ? 'area_' + tickValue : null, + shape: { + x: x, + y: y, + width: width, + height: height + }, + style: defaults({ + fill: areaColors[colorIndex] + }, areaStyle), + silent: true + })); + + colorIndex = (colorIndex + 1) % areaColorsLen; + } + + axisView.__splitAreaColors = newSplitAreaColors; +} + +function rectCoordAxisHandleRemove(axisView) { + axisView.__splitAreaColors = null; +} + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + var axisBuilderAttrs = [ 'axisLine', 'axisTickLabel', 'axisName' ]; @@ -42598,7 +42826,7 @@ var CartesianAxisView = AxisView.extend({ }, remove: function () { - this._splitAreaColors = null; + rectCoordAxisHandleRemove(this); }, /** @@ -42730,91 +42958,7 @@ var CartesianAxisView = AxisView.extend({ * @private */ _splitArea: function (axisModel, gridModel) { - var axis = axisModel.axis; - - if (axis.scale.isBlank()) { - return; - } - - var splitAreaModel = axisModel.getModel('splitArea'); - var areaStyleModel = splitAreaModel.getModel('areaStyle'); - var areaColors = areaStyleModel.get('color'); - - var gridRect = gridModel.coordinateSystem.getRect(); - - var ticksCoords = axis.getTicksCoords({ - tickModel: splitAreaModel, - clamp: true - }); - - if (!ticksCoords.length) { - return; - } - - // For Making appropriate splitArea animation, the color and anid - // should be corresponding to previous one if possible. - var areaColorsLen = areaColors.length; - var lastSplitAreaColors = this._splitAreaColors; - var newSplitAreaColors = createHashMap(); - var colorIndex = 0; - if (lastSplitAreaColors) { - for (var i = 0; i < ticksCoords.length; i++) { - var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue); - if (cIndex != null) { - colorIndex = (cIndex + (areaColorsLen - 1) * i) % areaColorsLen; - break; - } - } - } - - var prev = axis.toGlobalCoord(ticksCoords[0].coord); - - var areaStyle = areaStyleModel.getAreaStyle(); - areaColors = isArray(areaColors) ? areaColors : [areaColors]; - - for (var i = 1; i < ticksCoords.length; i++) { - var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord); - - var x; - var y; - var width; - var height; - if (axis.isHorizontal()) { - x = prev; - y = gridRect.y; - width = tickCoord - x; - height = gridRect.height; - prev = x + width; - } - else { - x = gridRect.x; - y = prev; - width = gridRect.width; - height = tickCoord - y; - prev = y + height; - } - - var tickValue = ticksCoords[i - 1].tickValue; - tickValue != null && newSplitAreaColors.set(tickValue, colorIndex); - - this._axisGroup.add(new Rect({ - anid: tickValue != null ? 'area_' + tickValue : null, - shape: { - x: x, - y: y, - width: width, - height: height - }, - style: defaults({ - fill: areaColors[colorIndex] - }, areaStyle), - silent: true - })); - - colorIndex = (colorIndex + 1) % areaColorsLen; - } - - this._splitAreaColors = newSplitAreaColors; + rectCoordAxisBuildSplitArea(this, this._axisGroup, axisModel, gridModel); } }); @@ -43060,7 +43204,21 @@ BaseBarSeries.extend({ // If use caps on two sides of bars // Only available on tangential polar bar - roundCap: false + roundCap: false, + + showBackground: false, + backgroundStyle: { + color: 'rgba(180, 180, 180, 0.2)', + borderColor: null, + borderWidth: 0, + borderType: 'solid', + borderRadius: 0, + shadowBlur: 0, + shadowColor: null, + shadowOffsetX: 0, + shadowOffsetY: 0, + opacity: 1 + } } }); @@ -43365,15 +43523,28 @@ extendChartView({ var roundCap = seriesModel.get('roundCap', true); + var drawBackground = seriesModel.get('showBackground', true); + var backgroundModel = seriesModel.getModel('backgroundStyle'); + + var bgEls = []; + var oldBgEls = this._backgroundEls || []; + data.diff(oldData) .add(function (dataIndex) { + var itemModel = data.getItemModel(dataIndex); + var layout = getLayout[coord.type](data, dataIndex, itemModel); + + if (drawBackground) { + var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, layout); + bgEl.useStyle(backgroundModel.getBarItemStyle()); + bgEls[dataIndex] = bgEl; + } + + // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in "axisProxy". if (!data.hasValue(dataIndex)) { return; } - var itemModel = data.getItemModel(dataIndex); - var layout = getLayout[coord.type](data, dataIndex, itemModel); - if (needsClip) { // Clip will modify the layout params. // And return a boolean to determine if the shape are fully clipped. @@ -43396,16 +43567,24 @@ extendChartView({ ); }) .update(function (newIndex, oldIndex) { - var el = oldData.getItemGraphicEl(oldIndex); + var itemModel = data.getItemModel(newIndex); + var layout = getLayout[coord.type](data, newIndex, itemModel); + + if (drawBackground) { + var bgEl = oldBgEls[oldIndex]; + bgEl.useStyle(backgroundModel.getBarItemStyle()); + bgEls[newIndex] = bgEl; + var shape = createBackgroundShape(isHorizontalOrRadial, layout, coord); + updateProps(bgEl, { shape: shape }, animationModel, newIndex); + } + + var el = oldData.getItemGraphicEl(oldIndex); if (!data.hasValue(newIndex)) { group.remove(el); return; } - var itemModel = data.getItemModel(newIndex); - var layout = getLayout[coord.type](data, newIndex, itemModel); - if (needsClip) { var isClipped = clip[coord.type](coordSysClipArea, layout); if (isClipped) { @@ -43443,6 +43622,15 @@ extendChartView({ }) .execute(); + var bgGroup = this._backgroundGroup || (this._backgroundGroup = new Group()); + bgGroup.removeAll(); + + for (var i = 0; i < bgEls.length; ++i) { + bgGroup.add(bgEls[i]); + } + group.add(bgGroup); + this._backgroundEls = bgEls; + this._data = data; }, @@ -43463,6 +43651,7 @@ extendChartView({ }, _incrementalRenderLarge: function (params, seriesModel) { + this._removeBackground(); createLarge(seriesModel, this.group, true); }, @@ -43476,6 +43665,9 @@ extendChartView({ var group = this.group; var data = this._data; if (ecModel && ecModel.get('animation') && data && !this._isLargeDraw) { + this._removeBackground(); + this._backgroundEls = []; + data.eachItemGraphicEl(function (el) { if (el.type === 'sector') { removeSector(el.dataIndex, ecModel, el); @@ -43489,6 +43681,11 @@ extendChartView({ group.removeAll(); } this._data = null; + }, + + _removeBackground: function () { + this.group.remove(this._backgroundGroup); + this._backgroundGroup = null; } }); @@ -43546,7 +43743,12 @@ var elementCreator = { dataIndex, layout, isHorizontal, animationModel, isUpdate ) { - var rect = new Rect({shape: extend({}, layout)}); + var rect = new Rect({ + shape: extend({}, layout), + z2: 1 + }); + + rect.name = 'item'; // Animation if (animationModel) { @@ -43576,9 +43778,12 @@ var elementCreator = { var ShapeClass = (!isRadial && roundCap) ? Sausage : Sector; var sector = new ShapeClass({ - shape: defaults({clockwise: clockwise}, layout) + shape: defaults({clockwise: clockwise}, layout), + z2: 1 }); + sector.name = 'item'; + // Animation if (animationModel) { var sectorShape = sector.shape; @@ -43698,7 +43903,10 @@ function updateStyle( // In case width or height are too small. function getLineWidth(itemModel, rawLayout) { var lineWidth = itemModel.get(BAR_BORDER_WIDTH_QUERY) || 0; - return Math.min(lineWidth, Math.abs(rawLayout.width), Math.abs(rawLayout.height)); + // width or height may be NaN for empty data + var width = isNaN(rawLayout.width) ? Number.MAX_VALUE : Math.abs(rawLayout.width); + var height = isNaN(rawLayout.height) ? Number.MAX_VALUE : Math.abs(rawLayout.height); + return Math.min(lineWidth, width, height); } @@ -43730,13 +43938,38 @@ function createLarge(seriesModel, group, incremental) { var baseDimIdx = data.getLayout('valueAxisHorizontal') ? 1 : 0; startPoint[1 - baseDimIdx] = data.getLayout('valueAxisStart'); + var largeDataIndices = data.getLayout('largeDataIndices'); + var barWidth = data.getLayout('barWidth'); + + var backgroundModel = seriesModel.getModel('backgroundStyle'); + var drawBackground = seriesModel.get('showBackground', true); + + if (drawBackground) { + var points = data.getLayout('largeBackgroundPoints'); + var backgroundStartPoint = []; + backgroundStartPoint[1 - baseDimIdx] = data.getLayout('backgroundStart'); + + var bgEl = new LargePath({ + shape: {points: points}, + incremental: !!incremental, + __startPoint: backgroundStartPoint, + __baseDimIdx: baseDimIdx, + __largeDataIndices: largeDataIndices, + __barWidth: barWidth, + silent: true, + z2: 0 + }); + setLargeBackgroundStyle(bgEl, backgroundModel, data); + group.add(bgEl); + } + var el = new LargePath({ shape: {points: data.getLayout('largePoints')}, incremental: !!incremental, __startPoint: startPoint, __baseDimIdx: baseDimIdx, - __largeDataIndices: data.getLayout('largeDataIndices'), - __barWidth: data.getLayout('barWidth') + __largeDataIndices: largeDataIndices, + __barWidth: barWidth }); group.add(el); setLargeStyle(el, seriesModel, data); @@ -43801,6 +44034,55 @@ function setLargeStyle(el, seriesModel, data) { el.style.lineWidth = data.getLayout('barWidth'); } +function setLargeBackgroundStyle(el, backgroundModel, data) { + var borderColor = backgroundModel.get('borderColor') || backgroundModel.get('color'); + var itemStyle = backgroundModel.getItemStyle(['color', 'borderColor']); + + el.useStyle(itemStyle); + el.style.fill = null; + el.style.stroke = borderColor; + el.style.lineWidth = data.getLayout('barWidth'); +} + +function createBackgroundShape(isHorizontalOrRadial, layout, coord) { + var coordLayout; + var isPolar = coord.type === 'polar'; + if (isPolar) { + coordLayout = coord.getArea(); + } + else { + coordLayout = coord.grid.getRect(); + } + + if (isPolar) { + return { + cx: coordLayout.cx, + cy: coordLayout.cy, + r0: isHorizontalOrRadial ? coordLayout.r0 : layout.r0, + r: isHorizontalOrRadial ? coordLayout.r : layout.r, + startAngle: isHorizontalOrRadial ? layout.startAngle : 0, + endAngle: isHorizontalOrRadial ? layout.endAngle : Math.PI * 2 + }; + } + else { + return { + x: isHorizontalOrRadial ? layout.x : coordLayout.x, + y: isHorizontalOrRadial ? coordLayout.y : layout.y, + width: isHorizontalOrRadial ? layout.width : coordLayout.width, + height: isHorizontalOrRadial ? coordLayout.height : layout.height + }; + } +} + +function createBackgroundEl(coord, isHorizontalOrRadial, layout) { + var ElementClz = coord.type === 'polar' ? Sector : Rect; + return new ElementClz({ + shape: createBackgroundShape(isHorizontalOrRadial, layout, coord), + silent: true, + z2: 0 + }); +} + /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -44410,7 +44692,7 @@ piePieceProto.updateData = function (data, idx, firstCreate) { toggleItemSelected( this, data.getItemLayout(idx), - seriesModel.isSelected(null, idx), + seriesModel.isSelected(data.getName(idx)), seriesModel.get('selectedOffset'), seriesModel.get('animation') ); @@ -45162,7 +45444,7 @@ var labelLayout = function (seriesModel, r, viewWidth, viewHeight, viewLeft, vie inside: isLabelInside, labelDistance: labelDistance, labelAlignTo: labelAlignTo, - labelMargin:labelMargin, + labelMargin: labelMargin, bleedMargin: bleedMargin, textRect: textRect, text: text, @@ -46205,6 +46487,7 @@ Radar.prototype.update = function (ecModel, api) { var fixedMax = axisModel.getMax(); var interval = scale.getInterval(); + if (fixedMin != null && fixedMax != null) { // User set min, max, divide to get new interval scale.setExtent(+fixedMin, +fixedMax); @@ -46240,13 +46523,10 @@ Radar.prototype.update = function (ecModel, api) { if (nicedSplitNumber > splitNumber) { interval = increaseInterval(interval); } - // PENDING - var center = Math.round((rawExtent[0] + rawExtent[1]) / 2 / interval) * interval; - var halfSplitNumber = Math.round(splitNumber / 2); - scale.setExtent( - round$1(center - halfSplitNumber * interval), - round$1(center + (splitNumber - halfSplitNumber) * interval) - ); + // TODO + var max = Math.ceil(rawExtent[1] / interval) * interval; + var min = round$1(max - interval * splitNumber); + scale.setExtent(min, max); scale.setInterval(interval); } }); @@ -46694,6 +46974,28 @@ var RadarSeries = SeriesModel.extend({ }).join('
'); }, + /** + * @implement + */ + getTooltipPosition: function (dataIndex) { + if (dataIndex != null) { + var data = this.getData(); + var coordSys = this.coordinateSystem; + var values = data.getValues( + map(coordSys.dimensions, function (dim) { + return data.mapDimension(dim); + }), dataIndex, true + ); + + for (var i = 0, len = values.length; i < len; i++) { + if (!isNaN(values[i])) { + var indicatorAxes = coordSys.getIndicatorAxes(); + return coordSys.coordToPoint(indicatorAxes[i].dataToCoord(values[i]), i); + } + } + } + }, + defaultOption: { zlevel: 0, z: 2, @@ -48468,13 +48770,13 @@ MapDraw.prototype = { var regionsGroup = this._regionsGroup; var group = this.group; - if (geo._roamTransformable.transform) { - group.transform = geo._roamTransformable.transform.slice(); - group.decomposeTransform(); - } + var transformInfo = geo.getTransformInfo(); + group.transform = transformInfo.roamTransform; + group.decomposeTransform(); + group.dirty(); - var scale = geo._rawTransformable.scale; - var position = geo._rawTransformable.position; + var scale = transformInfo.rawScale; + var position = transformInfo.rawPosition; regionsGroup.removeAll(); @@ -49280,7 +49582,6 @@ View.prototype = { /** * Remove roam */ - _updateCenterAndZoom: function () { // Must update after view transform updated var rawTransformMatrix = this._rawTransformable.getLocalTransform(); @@ -49324,6 +49625,16 @@ View.prototype = { this.decomposeTransform(); }, + getTransformInfo: function () { + var roamTransform = this._roamTransformable.transform; + var rawTransformable = this._rawTransformable; + return { + roamTransform: roamTransform ? slice(roamTransform) : create$1(), + rawScale: slice(rawTransformable.scale), + rawPosition: slice(rawTransformable.position) + }; + }, + /** * @return {module:zrender/core/BoundingRect} */ @@ -50940,6 +51251,11 @@ SeriesModel.extend({ // the layout of the tree, two value can be selected, 'orthogonal' or 'radial' layout: 'orthogonal', + // value can be 'polyline' + edgeShape: 'curve', + + edgeForkPosition: '50%', + // true | false | 'move' | 'scale', see module:component/helper/RoamController. roam: false, @@ -51344,6 +51660,58 @@ function defaultSeparation(node1, node2) { * under the License. */ +var TreeShape = extendShape({ + shape: { + parentPoint: [], + childPoints: [], + orient: '', + forkPosition: '' + }, + + style: { + stroke: '#000', + fill: null + }, + + buildPath: function (ctx, shape) { + var childPoints = shape.childPoints; + var childLen = childPoints.length; + var parentPoint = shape.parentPoint; + var firstChildPos = childPoints[0]; + var lastChildPos = childPoints[childLen - 1]; + + if (childLen === 1) { + ctx.moveTo(parentPoint[0], parentPoint[1]); + ctx.lineTo(firstChildPos[0], firstChildPos[1]); + return; + } + + var orient = shape.orient; + var forkDim = (orient === 'TB' || orient === 'BT') ? 0 : 1; + var otherDim = 1 - forkDim; + var forkPosition = parsePercent$1(shape.forkPosition, 1); + var tmpPoint = []; + tmpPoint[forkDim] = parentPoint[forkDim]; + tmpPoint[otherDim] = parentPoint[otherDim] + (lastChildPos[otherDim] - parentPoint[otherDim]) * forkPosition; + + ctx.moveTo(parentPoint[0], parentPoint[1]); + ctx.lineTo(tmpPoint[0], tmpPoint[1]); + ctx.moveTo(firstChildPos[0], firstChildPos[1]); + tmpPoint[forkDim] = firstChildPos[forkDim]; + ctx.lineTo(tmpPoint[0], tmpPoint[1]); + tmpPoint[forkDim] = lastChildPos[forkDim]; + ctx.lineTo(tmpPoint[0], tmpPoint[1]); + ctx.lineTo(lastChildPos[0], lastChildPos[1]); + + for (var i = 1; i < childLen - 1; i++) { + var point = childPoints[i]; + ctx.moveTo(point[0], point[1]); + tmpPoint[forkDim] = point[forkDim]; + ctx.lineTo(tmpPoint[0], tmpPoint[1]); + } + } +}); + extendChartView({ type: 'tree', @@ -51403,6 +51771,8 @@ extendChartView({ var seriesScope = { expandAndCollapse: seriesModel.get('expandAndCollapse'), layout: layout, + edgeShape: seriesModel.get('edgeShape'), + edgeForkPosition: seriesModel.get('edgeForkPosition'), orient: seriesModel.getOrient(), curvature: seriesModel.get('lineStyle.curveness'), symbolRotate: seriesModel.get('symbolRotate'), @@ -51704,22 +52074,72 @@ function updateNode(data, dataIndex, symbolEl, group, seriesModel, seriesScope) }); } - if (node.parentNode && node.parentNode !== virtualRoot) { - var edge = symbolEl.__edge; - if (!edge) { - edge = symbolEl.__edge = new BezierCurve({ - shape: getEdgeShape(seriesScope, sourceOldLayout, sourceOldLayout), - style: defaults({opacity: 0, strokeNoScale: true}, seriesScope.lineStyle) - }); - } + drawEdge( + seriesModel, node, virtualRoot, symbolEl, sourceOldLayout, + sourceLayout, targetLayout, group, seriesScope + ); - updateProps(edge, { - shape: getEdgeShape(seriesScope, sourceLayout, targetLayout), - style: {opacity: 1} - }, seriesModel); +} + +function drawEdge( + seriesModel, node, virtualRoot, symbolEl, sourceOldLayout, + sourceLayout, targetLayout, group, seriesScope +) { + + var edgeShape = seriesScope.edgeShape; + var edge = symbolEl.__edge; + if (edgeShape === 'curve') { + if (node.parentNode && node.parentNode !== virtualRoot) { + if (!edge) { + edge = symbolEl.__edge = new BezierCurve({ + shape: getEdgeShape(seriesScope, sourceOldLayout, sourceOldLayout), + style: defaults({opacity: 0, strokeNoScale: true}, seriesScope.lineStyle) + }); + } + + updateProps(edge, { + shape: getEdgeShape(seriesScope, sourceLayout, targetLayout), + style: {opacity: 1} + }, seriesModel); + } + } + else if (edgeShape === 'polyline') { + if (seriesScope.layout === 'orthogonal') { + if (node !== virtualRoot && node.children && (node.children.length !== 0) && (node.isExpand === true)) { + var children = node.children; + var childPoints = []; + for (var i = 0; i < children.length; i++) { + var childLayout = children[i].getLayout(); + childPoints.push([childLayout.x, childLayout.y]); + } - group.add(edge); + if (!edge) { + edge = symbolEl.__edge = new TreeShape({ + shape: { + parentPoint: [targetLayout.x, targetLayout.y], + childPoints: [[targetLayout.x, targetLayout.y]], + orient: seriesScope.orient, + forkPosition: seriesScope.edgeForkPosition + }, + style: defaults({opacity: 0, strokeNoScale: true}, seriesScope.lineStyle) + }); + } + updateProps(edge, { + shape: { + parentPoint: [targetLayout.x, targetLayout.y], + childPoints: childPoints + }, + style: {opacity: 1} + }, seriesModel); + } + } + else { + if (__DEV__) { + throw new Error('The polyline edgeShape can only be used in orthogonal layout'); + } + } } + group.add(edge); } function removeNode(data, dataIndex, symbolEl, group, seriesModel, seriesScope) { @@ -51729,6 +52149,7 @@ function removeNode(data, dataIndex, symbolEl, group, seriesModel, seriesScope) var seriesScope = getTreeNodeStyle(node, itemModel, seriesScope); var source = node.parentNode === virtualRoot ? node : node.parentNode || node; + var edgeShape = seriesScope.edgeShape; var sourceLayout; while (sourceLayout = source.getLayout(), sourceLayout == null) { source = source.parentNode === virtualRoot ? source : source.parentNode || source; @@ -51743,16 +52164,42 @@ function removeNode(data, dataIndex, symbolEl, group, seriesModel, seriesScope) symbolEl.fadeOut(null, {keepLabel: true}); - var edge = symbolEl.__edge; + var sourceSymbolEl = data.getItemGraphicEl(source.dataIndex); + var sourceEdge = sourceSymbolEl.__edge; + + // 1. when expand the sub tree, delete the children node should delete the edge of + // the source at the same time. because the polyline edge shape is only owned by the source. + // 2.when the node is the only children of the source, delete the node should delete the edge of + // the source at the same time. the same reason as above. + var edge = symbolEl.__edge + || ((source.isExpand === false || source.children.length === 1) ? sourceEdge : undefined); + + var edgeShape = seriesScope.edgeShape; + if (edge) { - updateProps(edge, { - shape: getEdgeShape(seriesScope, sourceLayout, sourceLayout), - style: { - opacity: 0 - } - }, seriesModel, function () { - group.remove(edge); - }); + if (edgeShape === 'curve') { + updateProps(edge, { + shape: getEdgeShape(seriesScope, sourceLayout, sourceLayout), + style: { + opacity: 0 + } + }, seriesModel, function () { + group.remove(edge); + }); + } + else if (edgeShape === 'polyline' && seriesScope.layout === 'orthogonal') { + updateProps(edge, { + shape: { + parentPoint: [sourceLayout.x, sourceLayout.y], + childPoints: [[sourceLayout.x, sourceLayout.y]] + }, + style: { + opacity: 0 + } + }, seriesModel, function () { + group.remove(edge); + }); + } } } @@ -52994,6 +53441,7 @@ extendChartView({ var thisStorage = createStorage(); var oldStorage = this._storage; var willInvisibleEls = []; + var doRenderNode = curry( renderNode, seriesModel, thisStorage, oldStorage, reRoot, @@ -53492,6 +53940,11 @@ function renderNode( // Start of closure variables available in "Procedures in renderNode". var thisLayout = thisNode.getLayout(); + var data = seriesModel.getData(); + + // Only for enabling highlight/downplay. Clear firstly. + // Because some node will not be rendered. + data.setItemGraphicEl(thisNode.dataIndex, null); if (!thisLayout || !thisLayout.isInView) { return; @@ -53531,14 +53984,36 @@ function renderNode( return group; } + var nodeModel = thisNode.getModel(); + // Background var bg = giveGraphic('background', Rect$1, depth, Z_BG); bg && renderBackground(group, bg, isParent && thisLayout.upperHeight); // No children, render content. - if (!isParent) { + if (isParent) { + // Because of the implementation about "traverse" in graphic hover style, we + // can not set hover listener on the "group" of non-leaf node. Otherwise the + // hover event from the descendents will be listenered. + if (isHighDownDispatcher(group)) { + setAsHighDownDispatcher(group, false); + } + if (bg) { + setAsHighDownDispatcher(bg, true); + // Only for enabling highlight/downplay. + data.setItemGraphicEl(thisNode.dataIndex, bg); + } + } + else { var content = giveGraphic('content', Rect$1, depth, Z_CONTENT); content && renderContent(group, content); + + if (bg && isHighDownDispatcher(bg)) { + setAsHighDownDispatcher(bg, false); + } + setAsHighDownDispatcher(group, true); + // Only for enabling highlight/downplay. + data.setItemGraphicEl(thisNode.dataIndex, group); } return group; @@ -53553,10 +54028,17 @@ function renderNode( bg.seriesIndex = seriesModel.seriesIndex; bg.setShape({x: 0, y: 0, width: thisWidth, height: thisHeight}); - var visualBorderColor = thisNode.getVisual('borderColor', true); - var emphasisBorderColor = itemStyleEmphasisModel.get('borderColor'); - updateStyle(bg, function () { + if (thisInvisible) { + // If invisible, do not set visual, otherwise the element will + // change immediately before animation. We think it is OK to + // remain its origin color when moving out of the view window. + processInvisible(bg); + } + else { + bg.invisible = false; + var visualBorderColor = thisNode.getVisual('borderColor', true); + var emphasisBorderColor = itemStyleEmphasisModel.get('borderColor'); var normalStyle = getItemStyleNormal(itemStyleNormalModel); normalStyle.fill = visualBorderColor; var emphasisStyle = getItemStyleEmphasis(itemStyleEmphasisModel); @@ -53576,8 +54058,8 @@ function renderNode( } bg.setStyle(normalStyle); - setHoverStyle(bg, emphasisStyle); - }); + setElementHoverStyle(bg, emphasisStyle); + } group.add(bg); } @@ -53598,8 +54080,15 @@ function renderNode( height: contentHeight }); - var visualColor = thisNode.getVisual('color', true); - updateStyle(content, function () { + if (thisInvisible) { + // If invisible, do not set visual, otherwise the element will + // change immediately before animation. We think it is OK to + // remain its origin color when moving out of the view window. + processInvisible(content); + } + else { + content.invisible = false; + var visualColor = thisNode.getVisual('color', true); var normalStyle = getItemStyleNormal(itemStyleNormalModel); normalStyle.fill = visualColor; var emphasisStyle = getItemStyleEmphasis(itemStyleEmphasisModel); @@ -53607,32 +54096,19 @@ function renderNode( prepareText(normalStyle, emphasisStyle, visualColor, contentWidth, contentHeight); content.setStyle(normalStyle); - setHoverStyle(content, emphasisStyle); - }); + setElementHoverStyle(content, emphasisStyle); + } group.add(content); } - function updateStyle(element, cb) { - if (!thisInvisible) { - // If invisible, do not set visual, otherwise the element will - // change immediately before animation. We think it is OK to - // remain its origin color when moving out of the view window. - cb(); - - if (!element.__tmWillVisible) { - element.invisible = false; - } - } - else { - // Delay invisible setting utill animation finished, - // avoid element vanish suddenly before animation. - !element.invisible && willInvisibleEls.push(element); - } + function processInvisible(element) { + // Delay invisible setting utill animation finished, + // avoid element vanish suddenly before animation. + !element.invisible && willInvisibleEls.push(element); } function prepareText(normalStyle, emphasisStyle, visualColor, width, height, upperLabelRect) { - var nodeModel = thisNode.getModel(); var text = retrieve( seriesModel.getFormattedLabel( thisNode.dataIndex, 'normal', null, null, upperLabelRect ? 'upperLabel' : 'label' @@ -53729,6 +54205,7 @@ function renderNode( // Fade in, user can be aware that these nodes are new. lastCfg.fadein = storageName !== 'nodeGroup'; } + } // We can not set all backgroud with the same z, Because the behaviour of @@ -56144,7 +56621,8 @@ var GraphSeries = extendSeriesModel({ edgeSymbol: ['none', 'none'], edgeSymbolSize: 10, edgeLabel: { - position: 'middle' + position: 'middle', + distance: 5 }, draggable: false, @@ -56398,39 +56876,90 @@ function updateSymbolAndLabelBeforeLineUpdate() { var textPosition; var textAlign; var textVerticalAlign; - - var distance$$1 = 5 * invScale; - // End - if (label.__position === 'end') { - textPosition = [d[0] * distance$$1 + toPos[0], d[1] * distance$$1 + toPos[1]]; - textAlign = d[0] > 0.8 ? 'left' : (d[0] < -0.8 ? 'right' : 'center'); - textVerticalAlign = d[1] > 0.8 ? 'top' : (d[1] < -0.8 ? 'bottom' : 'middle'); - } - // Middle - else if (label.__position === 'middle') { - var halfPercent = percent / 2; - var tangent = line.tangentAt(halfPercent); - var n = [tangent[1], -tangent[0]]; - var cp = line.pointAt(halfPercent); - if (n[1] > 0) { - n[0] = -n[0]; - n[1] = -n[1]; - } - textPosition = [cp[0] + n[0] * distance$$1, cp[1] + n[1] * distance$$1]; - textAlign = 'center'; - textVerticalAlign = 'bottom'; + var textOrigin; + + var distance$$1 = label.__labelDistance; + var distanceX = distance$$1[0] * invScale; + var distanceY = distance$$1[1] * invScale; + var halfPercent = percent / 2; + var tangent = line.tangentAt(halfPercent); + var n = [tangent[1], -tangent[0]]; + var cp = line.pointAt(halfPercent); + if (n[1] > 0) { + n[0] = -n[0]; + n[1] = -n[1]; + } + var dir = tangent[0] < 0 ? -1 : 1; + + if (label.__position !== 'start' && label.__position !== 'end') { var rotation = -Math.atan2(tangent[1], tangent[0]); if (toPos[0] < fromPos[0]) { rotation = Math.PI + rotation; } label.attr('rotation', rotation); } - // Start - else { - textPosition = [-d[0] * distance$$1 + fromPos[0], -d[1] * distance$$1 + fromPos[1]]; - textAlign = d[0] > 0.8 ? 'right' : (d[0] < -0.8 ? 'left' : 'center'); - textVerticalAlign = d[1] > 0.8 ? 'bottom' : (d[1] < -0.8 ? 'top' : 'middle'); + + var dy; + switch (label.__position) { + case 'insideStartTop': + case 'insideMiddleTop': + case 'insideEndTop': + case 'middle': + dy = -distanceY; + textVerticalAlign = 'bottom'; + break; + + case 'insideStartBottom': + case 'insideMiddleBottom': + case 'insideEndBottom': + dy = distanceY; + textVerticalAlign = 'top'; + break; + + default: + dy = 0; + textVerticalAlign = 'middle'; + } + + switch (label.__position) { + case 'end': + textPosition = [d[0] * distanceX + toPos[0], d[1] * distanceY + toPos[1]]; + textAlign = d[0] > 0.8 ? 'left' : (d[0] < -0.8 ? 'right' : 'center'); + textVerticalAlign = d[1] > 0.8 ? 'top' : (d[1] < -0.8 ? 'bottom' : 'middle'); + break; + + case 'start': + textPosition = [-d[0] * distanceX + fromPos[0], -d[1] * distanceY + fromPos[1]]; + textAlign = d[0] > 0.8 ? 'right' : (d[0] < -0.8 ? 'left' : 'center'); + textVerticalAlign = d[1] > 0.8 ? 'bottom' : (d[1] < -0.8 ? 'top' : 'middle'); + break; + + case 'insideStartTop': + case 'insideStart': + case 'insideStartBottom': + textPosition = [distanceX * dir + fromPos[0], fromPos[1] + dy]; + textAlign = tangent[0] < 0 ? 'right' : 'left'; + textOrigin = [-distanceX * dir, -dy]; + break; + + case 'insideMiddleTop': + case 'insideMiddle': + case 'insideMiddleBottom': + case 'middle': + textPosition = [cp[0], cp[1] + dy]; + textAlign = 'center'; + textOrigin = [0, -dy]; + break; + + case 'insideEndTop': + case 'insideEnd': + case 'insideEndBottom': + textPosition = [-distanceX * dir + toPos[0], toPos[1] + dy]; + textAlign = tangent[0] >= 0 ? 'right' : 'left'; + textOrigin = [distanceX * dir, -dy]; + break; } + label.attr({ style: { // Use the user specified text align and baseline first @@ -56438,7 +56967,8 @@ function updateSymbolAndLabelBeforeLineUpdate() { textAlign: label.__textAlign || textAlign }, position: textPosition, - scale: [invScale, invScale] + scale: [invScale, invScale], + origin: textOrigin }); } } @@ -56614,6 +57144,12 @@ lineProto._updateCommonStl = function (lineData, idx, seriesScope) { label.__verticalAlign = labelStyle.textVerticalAlign; // 'start', 'middle', 'end' label.__position = labelModel.get('position') || 'middle'; + + var distance$$1 = labelModel.get('distance'); + if (!isArray(distance$$1)) { + distance$$1 = [distance$$1, distance$$1]; + } + label.__labelDistance = distance$$1; } if (emphasisText != null) { @@ -57308,7 +57844,7 @@ extendChartView({ }, focusNodeAdjacency: function (seriesModel, ecModel, api, payload) { - var data = this._model.getData(); + var data = seriesModel.getData(); var graph = data.graph; var dataIndex = payload.dataIndex; var edgeDataIndex = payload.edgeDataIndex; @@ -57346,7 +57882,7 @@ extendChartView({ }, unfocusNodeAdjacency: function (seriesModel, ecModel, api, payload) { - var graph = this._model.getData().graph; + var graph = seriesModel.getData().graph; graph.eachNode(function (node) { fadeOutItem(node, nodeOpacityPath); @@ -62862,6 +63398,17 @@ var SankeySeries = SeriesModel.extend({ } }, + // Override Series.getDataParams() + getDataParams: function (dataIndex, dataType) { + var params = SankeySeries.superCall(this, 'getDataParams', dataIndex, dataType); + if (params.value == null && dataType === 'node') { + var node = this.getGraph().getNodeByIndex(dataIndex); + var nodeValue = node.getLayout().value; + params.value = nodeValue; + } + return params; + }, + defaultOption: { zlevel: 0, z: 2, @@ -62922,7 +63469,7 @@ var SankeySeries = SeriesModel.extend({ show: true }, lineStyle: { - opacity: 0.6 + opacity: 0.5 } }, @@ -62953,7 +63500,9 @@ var SankeySeries = SeriesModel.extend({ */ var nodeOpacityPath$1 = ['itemStyle', 'opacity']; +var hoverNodeOpacityPath = ['emphasis', 'itemStyle', 'opacity']; var lineOpacityPath$1 = ['lineStyle', 'opacity']; +var hoverLineOpacityPath = ['emphasis', 'lineStyle', 'opacity']; function getItemOpacity$1(item, opacityPath) { return item.getVisual('opacity') || item.getModel().get(opacityPath); @@ -62961,8 +63510,8 @@ function getItemOpacity$1(item, opacityPath) { function fadeOutItem$1(item, opacityPath, opacityRatio) { var el = item.getGraphicEl(); - var opacity = getItemOpacity$1(item, opacityPath); + if (opacityRatio != null) { opacity == null && (opacity = 1); opacity *= opacityRatio; @@ -62980,12 +63529,14 @@ function fadeInItem$1(item, opacityPath) { var opacity = getItemOpacity$1(item, opacityPath); var el = item.getGraphicEl(); - el.highlight && el.highlight(); el.traverse(function (child) { if (child.type !== 'group') { child.setStyle('opacity', opacity); } }); + + // Support emphasis here. + el.highlight && el.highlight(); } var SankeyShape = extendShape({ @@ -63023,6 +63574,14 @@ var SankeyShape = extendShape({ ); } ctx.closePath(); + }, + + highlight: function () { + this.trigger('emphasis'); + }, + + downplay: function () { + this.trigger('normal'); } }); @@ -63205,8 +63764,19 @@ extendChartView({ el.cursor = 'move'; } + el.highlight = function () { + this.trigger('emphasis'); + }; + + el.downplay = function () { + this.trigger('normal'); + }; + + el.focusNodeAdjHandler && el.off('mouseover', el.focusNodeAdjHandler); + el.unfocusNodeAdjHandler && el.off('mouseout', el.unfocusNodeAdjHandler); + if (itemModel.get('focusNodeAdjacency')) { - el.off('mouseover').on('mouseover', function () { + el.on('mouseover', el.focusNodeAdjHandler = function () { if (!sankeyView._focusAdjacencyDisabled) { sankeyView._clearTimer(); api.dispatchAction({ @@ -63216,7 +63786,8 @@ extendChartView({ }); } }); - el.off('mouseout').on('mouseout', function () { + + el.on('mouseout', el.unfocusNodeAdjHandler = function () { if (!sankeyView._focusAdjacencyDisabled) { sankeyView._dispatchUnfocus(api); } @@ -63226,8 +63797,12 @@ extendChartView({ edgeData.eachItemGraphicEl(function (el, dataIndex) { var edgeModel = edgeData.getItemModel(dataIndex); + + el.focusNodeAdjHandler && el.off('mouseover', el.focusNodeAdjHandler); + el.unfocusNodeAdjHandler && el.off('mouseout', el.unfocusNodeAdjHandler); + if (edgeModel.get('focusNodeAdjacency')) { - el.off('mouseover').on('mouseover', function () { + el.on('mouseover', el.focusNodeAdjHandler = function () { if (!sankeyView._focusAdjacencyDisabled) { sankeyView._clearTimer(); api.dispatchAction({ @@ -63237,7 +63812,8 @@ extendChartView({ }); } }); - el.off('mouseout').on('mouseout', function () { + + el.on('mouseout', el.unfocusNodeAdjHandler = function () { if (!sankeyView._focusAdjacencyDisabled) { sankeyView._dispatchUnfocus(api); } @@ -63278,7 +63854,7 @@ extendChartView({ }, focusNodeAdjacency: function (seriesModel, ecModel, api, payload) { - var data = this._model.getData(); + var data = seriesModel.getData(); var graph = data.graph; var dataIndex = payload.dataIndex; var itemModel = data.getItemModel(dataIndex); @@ -63298,15 +63874,15 @@ extendChartView({ }); if (node) { - fadeInItem$1(node, nodeOpacityPath$1); + fadeInItem$1(node, hoverNodeOpacityPath); var focusNodeAdj = itemModel.get('focusNodeAdjacency'); if (focusNodeAdj === 'outEdges') { each$1(node.outEdges, function (edge) { if (edge.dataIndex < 0) { return; } - fadeInItem$1(edge, lineOpacityPath$1); - fadeInItem$1(edge.node2, nodeOpacityPath$1); + fadeInItem$1(edge, hoverLineOpacityPath); + fadeInItem$1(edge.node2, hoverNodeOpacityPath); }); } else if (focusNodeAdj === 'inEdges') { @@ -63314,8 +63890,8 @@ extendChartView({ if (edge.dataIndex < 0) { return; } - fadeInItem$1(edge, lineOpacityPath$1); - fadeInItem$1(edge.node1, nodeOpacityPath$1); + fadeInItem$1(edge, hoverLineOpacityPath); + fadeInItem$1(edge.node1, hoverNodeOpacityPath); }); } else if (focusNodeAdj === 'allEdges') { @@ -63323,21 +63899,21 @@ extendChartView({ if (edge.dataIndex < 0) { return; } - fadeInItem$1(edge, lineOpacityPath$1); - fadeInItem$1(edge.node1, nodeOpacityPath$1); - fadeInItem$1(edge.node2, nodeOpacityPath$1); + fadeInItem$1(edge, hoverLineOpacityPath); + (edge.node1 !== node) && fadeInItem$1(edge.node1, hoverNodeOpacityPath); + (edge.node2 !== node) && fadeInItem$1(edge.node2, hoverNodeOpacityPath); }); } } if (edge) { - fadeInItem$1(edge, lineOpacityPath$1); - fadeInItem$1(edge.node1, nodeOpacityPath$1); - fadeInItem$1(edge.node2, nodeOpacityPath$1); + fadeInItem$1(edge, hoverLineOpacityPath); + fadeInItem$1(edge.node1, hoverNodeOpacityPath); + fadeInItem$1(edge.node2, hoverNodeOpacityPath); } }, unfocusNodeAdjacency: function (seriesModel, ecModel, api, payload) { - var graph = this._model.getGraph(); + var graph = seriesModel.getGraph(); graph.eachNode(function (node) { fadeOutItem$1(node, nodeOpacityPath$1); @@ -63360,8 +63936,7 @@ function createGridClipShape$1(rect, seriesModel, cb) { }); initProps(rectEl, { shape: { - width: rect.width + 20, - height: rect.height + 20 + width: rect.width + 20 } }, seriesModel, cb); @@ -63483,7 +64058,8 @@ function computeNodeValues(nodes) { each$1(nodes, function (node) { var value1 = sum(node.outEdges, getEdgeValue); var value2 = sum(node.inEdges, getEdgeValue); - var value = Math.max(value1, value2); + var nodeRawValue = node.getValue() || 0; + var value = Math.max(value1, value2, nodeRawValue); node.setLayout({value: value}, true); }); } @@ -63827,12 +64403,12 @@ function getEdgeValue(edge) { return edge.getValue(); } -function sum(array, f, orient) { +function sum(array, cb, orient) { var sum = 0; var len = array.length; var i = -1; while (++i < len) { - var value = +f.call(array, array[i], orient); + var value = +cb.call(array, array[i], orient); if (!isNaN(value)) { sum += value; } @@ -65133,7 +65709,6 @@ var candlestickVisual = { reset: function (seriesModel, ecModel) { var data = seriesModel.getData(); - var isLargeRender = seriesModel.pipelineContext.large; data.setVisual({ legendSymbol: 'roundRect', @@ -65148,6 +65723,7 @@ var candlestickVisual = { return; } + var isLargeRender = seriesModel.pipelineContext.large; return !isLargeRender && {progress: progress}; @@ -66244,6 +66820,7 @@ effectLineProto._updateEffectSymbol = function (lineData, idx) { symbol.attr('scale', size); this._symbolType = symbolType; + this._symbolScale = size; this._updateEffectAnimation(lineData, effectModel, idx); }; @@ -66334,6 +66911,7 @@ effectLineProto.updateSymbolPosition = function (symbol) { var cp1 = symbol.__cp1; var t = symbol.__t; var pos = symbol.position; + var lastPos = [pos[0], pos[1]]; var quadraticAt$$1 = quadraticAt; var quadraticDerivativeAt$$1 = quadraticDerivativeAt; pos[0] = quadraticAt$$1(p1[0], cp1[0], p2[0], t); @@ -66344,7 +66922,27 @@ effectLineProto.updateSymbolPosition = function (symbol) { var ty = quadraticDerivativeAt$$1(p1[1], cp1[1], p2[1], t); symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2; - + // enable continuity trail for 'line', 'rect', 'roundRect' symbolType + if (this._symbolType === 'line' || this._symbolType === 'rect' || this._symbolType === 'roundRect') { + if (symbol.__lastT !== undefined && symbol.__lastT < symbol.__t) { + var scaleY = dist(lastPos, pos) * 1.05; + symbol.attr('scale', [symbol.scale[0], scaleY]); + // make sure the last segment render within endPoint + if (t === 1) { + pos[0] = lastPos[0] + (pos[0] - lastPos[0]) / 2; + pos[1] = lastPos[1] + (pos[1] - lastPos[1]) / 2; + } + } + else if (symbol.__lastT === 1) { + // After first loop, symbol.__t does NOT start with 0, so connect p1 to pos directly. + var scaleY = 2 * dist(p1, pos); + symbol.attr('scale', [symbol.scale[0], scaleY ]); + } + else { + symbol.attr('scale', this._symbolScale); + } + } + symbol.__lastT = symbol.__t; symbol.ignore = false; }; @@ -69170,7 +69768,7 @@ var axisBuilderAttrs$2 = [ 'axisLine', 'axisTickLabel', 'axisName' ]; -var selfBuilderAttr = 'splitLine'; +var selfBuilderAttrs$1 = ['splitArea', 'splitLine']; var SingleAxisView = AxisView.extend({ @@ -69184,21 +69782,33 @@ var SingleAxisView = AxisView.extend({ group.removeAll(); + var oldAxisGroup = this._axisGroup; + this._axisGroup = new Group(); + var layout = layout$2(axisModel); var axisBuilder = new AxisBuilder(axisModel, layout); each$1(axisBuilderAttrs$2, axisBuilder.add, axisBuilder); + group.add(this._axisGroup); group.add(axisBuilder.getGroup()); - if (axisModel.get(selfBuilderAttr + '.show')) { - this['_' + selfBuilderAttr](axisModel); - } + each$1(selfBuilderAttrs$1, function (name) { + if (axisModel.get(name + '.show')) { + this['_' + name](axisModel); + } + }, this); + + groupTransition(oldAxisGroup, this._axisGroup, axisModel); SingleAxisView.superCall(this, 'render', axisModel, ecModel, api, payload); }, + remove: function () { + rectCoordAxisHandleRemove(this); + }, + _splitLine: function (axisModel) { var axis = axisModel.axis; @@ -69267,6 +69877,10 @@ var SingleAxisView = AxisView.extend({ silent: true })); } + }, + + _splitArea: function (axisModel) { + rectCoordAxisBuildSplitArea(this, this._axisGroup, axisModel, axisModel); } }); @@ -74293,10 +74907,6 @@ function barLayoutPolar(seriesType, ecModel, api) { var value = data.get(valueDim, idx); var baseValue = data.get(baseDim, idx); - if (isNaN(value)) { - continue; - } - var sign = value >= 0 ? 'p' : 'n'; var baseCoord = valueAxisStart; @@ -75685,7 +76295,7 @@ AxisView.extend({ var axisBuilderAttrs$3 = [ 'axisLine', 'axisTickLabel', 'axisName' ]; -var selfBuilderAttrs$1 = [ +var selfBuilderAttrs$2 = [ 'splitLine', 'splitArea', 'minorSplitLine' ]; @@ -75713,7 +76323,7 @@ AxisView.extend({ each$1(axisBuilderAttrs$3, axisBuilder.add, axisBuilder); this.group.add(axisBuilder.getGroup()); - each$1(selfBuilderAttrs$1, function (name) { + each$1(selfBuilderAttrs$2, function (name) { if (radiusAxisModel.get(name + '.show') && !radiusAxis.scale.isBlank()) { this['_' + name](radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords); } @@ -82116,24 +82726,63 @@ function assembleCssText(tooltipModel) { return cssText.join(';') + ';'; } +// If not able to make, do not modify the input `out`. +function makeStyleCoord(out, zr, appendToBody, zrX, zrY) { + var zrPainter = zr && zr.painter; + + if (appendToBody) { + var zrViewportRoot = zrPainter && zrPainter.getViewportRoot(); + if (zrViewportRoot) { + // Some APPs might use scale on body, so we support CSS transform here. + transformLocalCoord(out, zrViewportRoot, document.body, zrX, zrY); + } + } + else { + out[0] = zrX; + out[1] = zrY; + // xy should be based on canvas root. But tooltipContent is + // the sibling of canvas root. So padding of ec container + // should be considered here. + var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset(); + if (viewportRootOffset) { + out[0] += viewportRootOffset.offsetLeft; + out[1] += viewportRootOffset.offsetTop; + } + } +} + /** * @alias module:echarts/component/tooltip/TooltipContent + * @param {HTMLElement} container + * @param {ExtensionAPI} api + * @param {Object} [opt] + * @param {boolean} [opt.appendToBody] + * `false`: the DOM element will be inside the container. Default value. + * `true`: the DOM element will be appended to HTML body, which avoid + * some overflow clip but intrude outside of the container. * @constructor */ -function TooltipContent(container, api) { +function TooltipContent(container, api, opt) { if (env$1.wxa) { return null; } var el = document.createElement('div'); + el.domBelongToZr = true; + this.el = el; var zr = this._zr = api.getZr(); + var appendToBody = this._appendToBody = opt && opt.appendToBody; - this.el = el; + this._styleCoord = [0, 0]; - this._x = api.getWidth() / 2; - this._y = api.getHeight() / 2; + makeStyleCoord(this._styleCoord, zr, appendToBody, api.getWidth() / 2, api.getHeight() / 2); - container.appendChild(el); + if (appendToBody) { + document.body.appendChild(el); + } + else { + container.appendChild(el); + } this._container = container; @@ -82167,7 +82816,8 @@ function TooltipContent(container, api) { // Try trigger zrender event to avoid mouse // in and out shape too frequently var handler = zr.handler; - normalizeEvent(container, e, true); + var zrViewportRoot = zr.painter.getViewportRoot(); + normalizeEvent(zrViewportRoot, e, true); handler.dispatch('mousemove', e); } }; @@ -82212,12 +82862,13 @@ TooltipContent.prototype = { show: function (tooltipModel) { clearTimeout(this._hideTimeout); var el = this.el; + var styleCoord = this._styleCoord; el.style.cssText = gCssText + assembleCssText(tooltipModel) // Because of the reason described in: // http://stackoverflow.com/questions/21125587/css3-transition-not-working-in-chrome-anymore // we should set initial value to `left` and `top`. - + ';left:' + this._x + 'px;top:' + this._y + 'px;' + + ';left:' + styleCoord[0] + 'px;top:' + styleCoord[1] + 'px;' + (tooltipModel.get('extraCssText') || ''); el.style.display = el.innerHTML ? 'block' : 'none'; @@ -82245,23 +82896,13 @@ TooltipContent.prototype = { return [el.clientWidth, el.clientHeight]; }, - moveTo: function (x, y) { - // xy should be based on canvas root. But tooltipContent is - // the sibling of canvas root. So padding of ec container - // should be considered here. - var zr = this._zr; - var viewportRootOffset; - if (zr && zr.painter && (viewportRootOffset = zr.painter.getViewportRootOffset())) { - x += viewportRootOffset.offsetLeft; - y += viewportRootOffset.offsetTop; - } + moveTo: function (zrX, zrY) { + var styleCoord = this._styleCoord; + makeStyleCoord(styleCoord, this._zr, this._appendToBody, zrX, zrY); var style = this.el.style; - style.left = x + 'px'; - style.top = y + 'px'; - - this._x = x; - this._y = y; + style.left = styleCoord[0] + 'px'; + style.top = styleCoord[1] + 'px'; }, hide: function () { @@ -82287,6 +82928,10 @@ TooltipContent.prototype = { return this._show; }, + dispose: function () { + this.el.parentNode.removeChild(this.el); + }, + getOuterSize: function () { var width = this.el.clientWidth; var height = this.el.clientHeight; @@ -82303,6 +82948,7 @@ TooltipContent.prototype = { return {width: width, height: height}; } + }; /* @@ -82534,7 +83180,9 @@ extendComponentView({ var tooltipContent; if (this._renderMode === 'html') { - tooltipContent = new TooltipContent(api.getDom(), api); + tooltipContent = new TooltipContent(api.getDom(), api, { + appendToBody: tooltipModel.get('appendToBody', true) + }); this._newLine = '
'; } else { @@ -82687,7 +83335,6 @@ extendComponentView({ offsetX: payload.x, offsetY: payload.y, position: payload.position, - event: {}, dataByCoordSys: payload.dataByCoordSys, tooltipOption: payload.tooltipOption }, dispatchAction); @@ -82706,8 +83353,7 @@ extendComponentView({ offsetX: cx, offsetY: cy, position: payload.position, - target: pointInfo.el, - event: {} + target: pointInfo.el }, dispatchAction); } } @@ -82724,8 +83370,7 @@ extendComponentView({ offsetX: payload.x, offsetY: payload.y, position: payload.position, - target: api.getZr().findHover(payload.x, payload.y).target, - event: {} + target: api.getZr().findHover(payload.x, payload.y).target }, dispatchAction); } }, @@ -82831,7 +83476,9 @@ extendComponentView({ _showAxisTooltip: function (dataByCoordSys, e) { var ecModel = this._ecModel; var globalTooltipModel = this._tooltipModel; + var point = [e.offsetX, e.offsetY]; + var singleDefaultHTML = []; var singleParamsList = []; var singleTooltipModel = buildTooltipModel([ @@ -83087,6 +83734,7 @@ extendComponentView({ _updatePosition: function (tooltipModel, positionExpr, x, y, content, params, el) { var viewWidth = this._api.getWidth(); var viewHeight = this._api.getHeight(); + positionExpr = positionExpr || tooltipModel.get('position'); var contentSize = content.getSize(); @@ -83205,7 +83853,7 @@ extendComponentView({ if (env$1.node) { return; } - this._tooltipContent.hide(); + this._tooltipContent.dispose(); unregister('itemTooltip', api); } }); @@ -83790,16 +84438,19 @@ var PRIORITY_BRUSH = PRIORITY.VISUAL.BRUSH; */ registerLayout(PRIORITY_BRUSH, function (ecModel, api, payload) { ecModel.eachComponent({mainType: 'brush'}, function (brushModel) { - payload && payload.type === 'takeGlobalCursor' && brushModel.setBrushOption( payload.key === 'brush' ? payload.brushOption : {brushType: false} ); + }); + layoutCovers(ecModel); +}); +function layoutCovers(ecModel) { + ecModel.eachComponent({mainType: 'brush'}, function (brushModel) { var brushTargetManager = brushModel.brushTargetManager = new BrushTargetManager(brushModel.option, ecModel); - brushTargetManager.setInputRanges(brushModel.areas, ecModel); }); -}); +} /** * Register the visual encoding if this modules required. @@ -84314,7 +84965,13 @@ extendComponentView({ /** * @override */ - updateTransform: updateController, + updateTransform: function (brushModel, ecModel) { + // PENDING: `updateTransform` is a little tricky, whose layout need + // to be calculate mandatorily and other stages will not be performed. + // Take care the correctness of the logic. See #11754 . + layoutCovers(ecModel); + return updateController.apply(this, arguments); + }, /** * @override @@ -86406,8 +87063,8 @@ function markerTypeCalculatorWithExtent( var dataIndex = data.indicesOfNearest(calcDataDim, value)[0]; coordArr[otherCoordIndex] = data.get(otherDataDim, dataIndex); - coordArr[targetCoordIndex] = data.get(targetDataDim, dataIndex); - + coordArr[targetCoordIndex] = data.get(calcDataDim, dataIndex); + var coordArrValue = data.get(targetDataDim, dataIndex); // Make it simple, do not visit all stacked value to count precision. var precision = getPrecision(data.get(targetDataDim, dataIndex)); precision = Math.min(precision, 20); @@ -86415,7 +87072,7 @@ function markerTypeCalculatorWithExtent( coordArr[targetCoordIndex] = +coordArr[targetCoordIndex].toFixed(precision); } - return coordArr; + return [coordArr, coordArrValue]; } var curry$5 = curry; @@ -86478,12 +87135,15 @@ function dataTransform(seriesModel, item) { var otherCoordIndex = indexOf$2(dims, axisInfo.baseAxis.dim); var targetCoordIndex = indexOf$2(dims, axisInfo.valueAxis.dim); - item.coord = markerTypeCalculator[item.type]( + var coordInfo = markerTypeCalculator[item.type]( data, axisInfo.baseDataDim, axisInfo.valueDataDim, otherCoordIndex, targetCoordIndex ); + item.coord = coordInfo[0]; // Force to use the value of calculated value. - item.value = item.coord[targetCoordIndex]; + // let item use the value without stack. + item.value = coordInfo[1]; + } else { // FIXME Only has one of xAxis and yAxis. @@ -86875,7 +87535,8 @@ MarkerModel.extend({ }, label: { show: true, - position: 'end' + position: 'end', + distance: 5 }, lineStyle: { type: 'dashed' @@ -89325,26 +89986,28 @@ var ScrollableLegendView = LegendView.extend({ }, _findTargetItemIndex: function (targetDataIndex) { + if (!this._showController) { + return 0; + } + var index; var contentGroup = this.getContentGroup(); var defaultIndex; - if (this._showController) { - contentGroup.eachChild(function (child, idx) { - var legendDataIdx = child.__legendDataIndex; - // FIXME - // If the given targetDataIndex (from model) is illegal, - // we use defualtIndex. But the index on the legend model and - // action payload is still illegal. That case will not be - // changed until some scenario requires. - if (defaultIndex == null && legendDataIdx != null) { - defaultIndex = idx; - } - if (legendDataIdx === targetDataIndex) { - index = idx; - } - }); - } + contentGroup.eachChild(function (child, idx) { + var legendDataIdx = child.__legendDataIndex; + // FIXME + // If the given targetDataIndex (from model) is illegal, + // we use defualtIndex. But the index on the legend model and + // action payload is still illegal. That case will not be + // changed until some scenario requires. + if (defaultIndex == null && legendDataIdx != null) { + defaultIndex = idx; + } + if (legendDataIdx === targetDataIndex) { + index = idx; + } + }); return index != null ? index : defaultIndex; } diff --git a/public/vendors/echarts/echarts.min.js b/public/vendors/echarts/echarts.min.js index 68264a54..35d375c9 100644 --- a/public/vendors/echarts/echarts.min.js +++ b/public/vendors/echarts/echarts.min.js @@ -19,4 +19,4 @@ */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[1]);o&&(e.edge=!0,e.version=o[1]);a&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},l={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},u=Object.prototype.toString,i=Array.prototype,r=i.forEach,h=i.filter,o=i.slice,c=i.map,d=i.reduce,a={};function f(t,e){"createCanvas"===t&&(y=null),a[t]=e}function D(t){if(null==t||"object"!=typeof t)return t;var e=t,i=u.call(t);if("[object Array]"===i){if(!$(t)){e=[];for(var n=0,o=t.length;n>1)%2;s.cssText=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",n[l]+":0",o[u]+":0",n[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(r),i.push(r)}return i}(t,r),r);if(s)return s(zt,n,o),i.zrX=zt[0],void(i.zrY=zt[1])}i.zrX=i.zrY=0}function Vt(t){return t||window.event}function Gt(t,e,i){if(null!=(e=Vt(e)).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&Rt(t,o,e,i)}else Rt(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&Ot.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Ft(t,e,i,n){Nt?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}var Wt=Nt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Ht(t){return 2===t.which||3===t.which}function Zt(){this._track=[]}function Ut(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}Zt.prototype={constructor:Zt,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var o={points:[],touches:[],target:e,event:t},a=0,r=n.length;an.getWidth()||i<0||i>n.getHeight()}Kt.prototype={constructor:Kt,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(E($t,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,i=t.zrY,n=Qt(this,e,i),o=this._hovered,a=o.target;a&&!a.__zr&&(a=(o=this.findHover(o.x,o.y)).target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==a&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(i||this.trigger("globalout",{type:"globalout",event:t}))},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var o="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:jt}}(e,t,i);n&&(n[o]&&(a.cancelBubble=n[o].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},a=n.length-1;0<=a;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=Jt(n[a],t,e))&&(o.topTarget||(o.topTarget=n[a]),r!==Yt)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Zt);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){Kt.prototype[r]=function(t){var e,i,n=t.zrX,o=t.zrY,a=Qt(this,n,o);if("mouseup"===r&&a||(i=(e=this.findHover(n,o)).target),"mousedown"===r)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===r)this._upEl=i;else if("click"===r){if(this._downEl!==this._upEl||!this._downPoint||4=this._maxSize&&0>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),ze(t,e),e):void Pe(e,0,0,0,1):7===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=16777215?(Pe(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),ze(t,e),e):void Pe(e,0,0,0,1):void 0;var a=o.indexOf("("),r=o.indexOf(")");if(-1!==a&&r+1===o.length){var s=o.substr(0,a),l=o.substr(a+1,r-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Pe(e,0,0,0,1);u=Ce(l.pop());case"rgb":return 3!==l.length?void Pe(e,0,0,0,1):(Pe(e,De(l[0]),De(l[1]),De(l[2]),u),ze(t,e),e);case"hsla":return 4!==l.length?void Pe(e,0,0,0,1):(l[3]=Ce(l[3]),Be(l,e),ze(t,e),e);case"hsl":return 3!==l.length?void Pe(e,0,0,0,1):(Be(l,e),ze(t,e),e);default:return}}Pe(e,0,0,0,1)}}function Be(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ce(t[1]),o=Ce(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return Pe(e=e||[],Te(255*Le(r,a,i+1/3)),Te(255*Le(r,a,i)),Te(255*Le(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ve(t,e){var i=Re(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,255e);i++);i=Math.min(i-1,u-2)}C=e;var n=g[(D=i)+1]-g[i];if(0!=n)if(S=(e-g[i])/n,l)if(I=m[i],M=m[0===i?i:i-1],T=m[u-2=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Mi(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Mi.create=function(t){return new Mi(t.x,t.y,t.width,t.height)};var Ii=function(t){for(var e in t=t||{},mi.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Ii.prototype={constructor:Ii,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i>>1])<0?l=a:s=1+a;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function Pi(p,g){var r,s,m=Ai,l=0,v=[];function e(t){var e=r[t],i=s[t],n=r[t+1],o=s[t+1];s[t]=i+o,t===l-3&&(r[t+1]=r[t+2],s[t+1]=s[t+2]),l--;var a=ki(p[n],p,e,i,0,g);e+=a,0!==(i-=a)&&0!==(o=Li(p[e+i-1],p,n,o,o-1,g))&&(i<=o?function(t,e,i,n){var o=0;for(o=0;os[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1>=1;return t+e}(o);do{if((a=Di(t,i,n,e))=e.maxIterations){t+=e.ellipsis;break}var s=0===r?yn(t,o,e.ascCharWidth,e.cnCharWidth):0f)return{lines:[],width:0,height:0};C.textWidth=hn(C.text,w);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))C.percentWidth=S,u.push(C),S=0;else{if(M){S=C.textWidth;var I=x.textBackgroundColor,T=I&&I.image;T&&nn(T=Qi(T))&&(S=Math.max(S,T.width*b/T.height))}var A=_?_[1]+_[3]:0;S+=A;var D=null!=d?d-v:null;null!=D&&Dn[0]){for(r=0;rt);r++);a=i[n[r]]}if(n.splice(r+1,0,t),!(i[t]=e).virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else fi("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n=a.length&&a.push({option:t})}}),a}function Go(t){var r=Q();ko(t,function(t,e){var i=t.exist;i&&r.set(i.id,t)}),ko(t,function(t,e){var i=t.option;Y(!i||null==i.id||!r.get(i.id)||r.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&r.set(i.id,t),t.keyInfo||(t.keyInfo={})}),ko(t,function(t,e){var i=t.exist,n=t.option,o=t.keyInfo;if(Po(n)){if(o.name=null!=n.name?n.name+"":i?i.name:Oo+e,i)o.id=i.id;else if(null!=n.id)o.id=n.id+"";else for(var a=0;o.id="\0"+o.name+"\0"+a++,r.get(o.id););r.set(o.id,t)}})}function Fo(t){var e=t.name;return!(!e||!e.indexOf(Oo))}function Wo(t){return Po(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Ho(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?k(t.dataIndex)?N(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?k(t.name)?N(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function Zo(){var e="__\0ec_inner_"+Uo+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var Uo=0;function Xo(s,l,u){if(z(l)){var t={};t[l+"Index"]=0,l=t}var e=u&&u.defaultMainType;!e||Yo(l,e+"Index")||Yo(l,e+"Id")||Yo(l,e+"Name")||(l[e+"Index"]=0);var h={};return ko(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var i=e.match(/^(\w+)(Index|Id|Name)$/)||[],n=i[1],o=(i[2]||"").toLowerCase();if(!(!n||!o||null==t||"index"===o&&"none"===t||u&&u.includeMainTypes&&_(u.includeMainTypes,n)<0)){var a={mainType:n};"index"===o&&"all"===t||(a[o]=t);var r=s.queryComponents(a);h[n+"Models"]=r,h[n+"Model"]=r[0]}}else h[e]=t}),h}function Yo(t,e){return t&&t.hasOwnProperty(e)}function jo(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function qo(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}function Ko(t,i){var n=Q(),o=[];return E(t,function(t){var e=i(t);(n.get(e)||(o.push(e),n.set(e,[]))).push(t)}),{keys:o,buckets:n}}var $o=".",Jo="___EC__COMPONENT__CONTAINER___";function Qo(t){var e={main:"",sub:""};return t&&(t=t.split($o),e.main=t[0]||"",e.sub=t[1]||""),e}function ta(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)}var i=this;return L(e.prototype,t),e.extend=this.extend,e.superCall=na,e.superApply=oa,w(e,this),e.superClass=i,e}}var ea=0;function ia(t){var e=["__\0is_clz",ea++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function na(t,e){var i=U(arguments,2);return this.superClass.prototype[e].apply(t,i)}function oa(t,e,i){return this.superClass.prototype[e].apply(t,i)}function aa(i,t){t=t||{};var o={};if(i.registerClass=function(t,e){if(e)if(function(t){Y(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=Qo(e)).sub){if(e.sub!==Jo){(function(t){var e=o[t.main];e&&e[Jo]||((e=o[t.main]={})[Jo]=!0);return e})(e)[e.sub]=t}}else o[e.main]=t;return t},i.getClass=function(t,e,i){var n=o[t];if(n&&n[Jo]&&(n=e?n[e]:null),i&&!n)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return n},i.getClassesByMainType=function(t){t=Qo(t);var i=[],e=o[t.main];return e&&e[Jo]?E(e,function(t,e){e!==Jo&&i.push(t)}):i.push(e),i},i.hasClass=function(t){return t=Qo(t),!!o[t.main]},i.getAllClassMainTypes=function(){var i=[];return E(o,function(t,e){i.push(e)}),i},i.hasSubTypes=function(t){t=Qo(t);var e=o[t.main];return e&&e[Jo]},i.parseClassType=Qo,t.registerWhenExtend){var n=i.extend;n&&(i.extend=function(t){var e=n.call(this,t);return i.registerClass(e,t.type)})}return i}function ra(s){for(var t=0;tthis._ux||tr(e-this._yi)>this._uy||this._len<5;return this.addData(Za.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,o,a){return this.addData(Za.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(Za.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.addData(Za.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=$a(o)*i+t,this._yi=Ja(o)*i+e,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Za.R,t,e,i,n),this},closePath:function(){this.addData(Za.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;il||tr(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case Za.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case Za.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case Za.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m=pr[n=0]+t&&r<=pr[1]+t?h:0}if(a){l=n;n=sr(o),o=sr(l)}else n=sr(n),o=sr(o);oMath.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function xr(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,u=0,h=0;hMath.abs(a[1])?0=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function Pl(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?function(t){return t.replace(/^\s+|\s+$/g,"")}(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Nl(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Ol(t){return t.sort(function(t,e){return t-e}),t}function El(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function zl(t){var e=t.toString(),i=e.indexOf("e");if(0h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}var Vl=9007199254740991;function Gl(t){var e=2*Math.PI;return(t%e+e)%e}function Fl(t){return-Ll"'])/g,tu={"&":"&","<":"<",">":">",'"':""","'":"'"};function eu(t){return null==t?"":(t+"").replace(Ql,function(t,e){return tu[e]})}function iu(t,e){return"{"+t+(null==e?"":e)+"}"}var nu=["a","b","c","d","e","f","g"];function ou(t,e,i){k(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a':'':{renderMode:o,content:"{marker"+a+"|} ",style:{color:i}}:""}function su(t,e){return"0000".substr(0,e-(t+="").length)+t}function lu(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Hl(e),o=i?"UTC":"",a=n["get"+o+"FullYear"](),r=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),u=n["get"+o+"Minutes"](),h=n["get"+o+"Seconds"](),c=n["get"+o+"Milliseconds"]();return t=t.replace("MM",su(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",su(s,2)).replace("d",s).replace("hh",su(l,2)).replace("h",l).replace("mm",su(u,2)).replace("m",u).replace("ss",su(h,2)).replace("s",h).replace("SSS",su(c,3))}function uu(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var hu=gn;var cu=(Object.freeze||Object)({addCommas:Kl,toCamelCase:$l,normalizeCssArray:Jl,encodeHTML:eu,formatTpl:ou,formatTplSimple:au,getTooltipMarker:ru,formatTime:lu,capitalFirst:uu,truncateText:hu,getTextBoundingRect:function(t){return cn(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,o,a,r,s){return cn(t,e,i,n,o,s,a,r)}}),du=E,fu=["left","right","top","bottom","width","height"],pu=[["width","left","right"],["height","top","bottom"]];function gu(h,c,d,f,p){var g=0,m=0;null==f&&(f=1/0),null==p&&(p=1/0);var v=0;c.eachChild(function(t,e){var i,n,o=t.position,a=t.getBoundingRect(),r=c.childAt(e+1),s=r&&r.getBoundingRect();if("horizontal"===h){var l=a.width+(s?-s.x+a.x:0);v=f<(i=g+l)||t.newline?(g=0,i=l,m+=v+d,a.height):Math.max(v,a.height)}else{var u=a.height+(s?-s.y+a.y:0);v=p<(n=m+u)||t.newline?(g+=v+d,m=0,n=u,a.width):Math.max(v,a.width)}t.newline||(o[0]=g,o[1]=m,"horizontal"===h?g=i+d:m=n+d)})}var mu=gu;T(gu,"vertical"),T(gu,"horizontal");function vu(t,e,i){i=Jl(i||0);var n=e.width,o=e.height,a=Pl(t.left,n),r=Pl(t.top,o),s=Pl(t.right,n),l=Pl(t.bottom,o),u=Pl(t.width,n),h=Pl(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(n/oe)return t[n];return t[i-1]}(s,i):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),n.colorIdx=(o+1)%l.length,u}}},Pu="original",Nu="arrayRows",Ou="objectRows",Eu="keyedColumns",zu="unknown",Ru="typedArray",Bu="column",Vu="row";function Gu(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Eu?{}:[]),this.sourceFormat=t.sourceFormat||zu,this.seriesLayoutBy=t.seriesLayoutBy||Bu,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Gu.seriesDataToSource=function(t){return new Gu({data:t,sourceFormat:V(t)?Ru:Pu,fromDataset:!1})},ia(Gu);var Fu={Must:1,Might:2,Not:3},Wu=Zo();function Hu(t){var e=t.option,i=e.data,n=V(i)?Ru:Pu,o=!1,a=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=ju(t);if(l){var u=l.option;i=u.source,n=Wu(l).sourceFormat,o=!0,a=a||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,i,n,o){if(!t)return{dimensionsDefine:Zu(o)};var a,r;if(e===Nu)"auto"===n||null==n?Uu(function(t){null!=t&&"-"!==t&&(z(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,o||1!==r||(o=[],Uu(function(t,e){o[e]=null!=t?t:""},i,t)),a=o?o.length:i===Vu?t.length:t[0]?t[0].length:null;else if(e===Ou)o=o||function(t){var e,i=0;for(;i":"\n",f="richText"===c,p={},g=0;function i(t){return{renderMode:c,content:eu(Kl(t)),style:p}}var m=this.getData(),a=m.mapDimension("defaultedTooltip",!0),n=a.length,r=this.getRawValue(o),s=k(r),v=m.getItemVisual(o,"color");R(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var l=(1":"",n=i+u.join(i||", ");return{renderMode:c,content:n,style:p}}(r):i(n?Bh(m,o,a[0]):s?r[0]:r)).content,u=d.seriesIndex+"at"+g,y=ru({color:v,type:"item",renderMode:c,markerId:u});p[u]=v,++g;var x=m.getName(o),_=this.name;Fo(this)||(_=""),_=_?eu(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?eu(x)+": "+l:l),markers:p}},isAnimationEnabled:function(){if(v.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,o=ku.getColorFromPalette.call(this,t,e,i);return o=o||n.getColorFromPalette(t,e,i)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function nc(t){var e=t.name;Fo(t)||(t.name=function(t){var i=t.getRawData(),e=i.mapDimension("seriesName",!0),n=[];return E(e,function(t){var e=i.getDimensionInfo(t);e.displayName&&n.push(e.displayName)}),n.join(" ")}(t)||e)}function oc(t){return t.model.getRawData().count()}function ac(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),rc}function rc(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function sc(e,i){E(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,T(lc,i))})}function lc(t){var e=uc(t);e&&e.setOutputEnd(this.count())}function uc(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var o=n.agentStubMap;o&&(n=o.get(t.uid))}return n}}b(ic,Fh),b(ic,ku);var hc=function(){this.group=new Ii,this.uid=Cl("viewComponent")};hc.prototype={constructor:hc,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var cc=hc.prototype;cc.updateView=cc.updateLayout=cc.updateVisual=function(t,e,i,n){},ta(hc),aa(hc,{registerWhenExtend:!0});function dc(){var s=Zo();return function(t){var e=s(t),i=t.pipelineContext,n=e.large,o=e.progressiveRender,a=e.large=i.large,r=e.progressiveRender=i.progressiveRender;return!!(n^a||o^r)&&"reset"}}var fc=Zo(),pc=dc();function gc(){this.group=new Ii,this.uid=Cl("viewChart"),this.renderTask=Wh({plan:xc,reset:_c}),this.renderTask.context={view:this}}var mc=gc.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){yc(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){yc(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function vc(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!qs(t)))for(var n=0,o=t.childCount();nc?i+=p(g("data.partialData"),{displayCnt:c}):i+=g("data.allData");for(var r=[],s=0;si.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},Nc.getPipeline=function(t){return this._pipelineMap.get(t)},Nc.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:r,large:a}},Nc.restorePipelines=function(t){var n=this,o=n._pipelineMap=Q();t.eachSeries(function(t){var e=t.getProgressive(),i=t.uid;o.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),Uc(n,t,t.dataTask)})},Nc.prepareStageTasks=function(){var i=this._stageTaskMap,n=this.ecInstance.getModel(),o=this.api;E(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,[]);t.reset&&function(n,o,t,a,r){var s=t.seriesTaskMap||(t.seriesTaskMap=Q()),e=o.seriesType,i=o.getTargetSeries;o.createOnAllSeries?a.eachRawSeries(l):e?a.eachRawSeriesByType(e,l):i&&i(a,r).each(l);function l(t){var e=t.uid,i=s.get(e)||s.set(e,Wh({plan:Gc,reset:Fc,count:Zc}));i.context={model:t,ecModel:a,api:r,useClearVisual:o.isVisual&&!o.isLayout,plan:o.plan,reset:o.reset,scheduler:n},Uc(n,t,i)}var u=n._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,n,o),t.overallReset&&function(n,t,e,i,o){var a=e.overallTask=e.overallTask||Wh({reset:zc});a.context={ecModel:i,api:o,overallReset:t.overallReset,scheduler:n};var r=a.agentStubMap=a.agentStubMap||Q(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,c):l?l(i,o).each(c):(u=!1,E(i.getSeries(),c));function c(t){var e=t.uid,i=r.get(e);i||(i=r.set(e,Wh({reset:Rc,onDirty:Vc})),a.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:h},i.agent=a,i.__block=u,Uc(n,t,i)}var d=n._pipelineMap;r.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),r.removeKey(e))})}(this,t,e,n,o)},this)},Nc.prepareView=function(t,e,i,n){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=n,o.__block=!t.incrementalPrepareRender,Uc(this,e,o)},Nc.performDataProcessorTasks=function(t,e){Oc(this,this._dataProcessorHandlers,t,e,{block:!0})},Nc.performVisualTasks=function(t,e,i){Oc(this,this._visualHandlers,t,e,i)},Nc.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Nc.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Ec=Nc.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function zc(t){t.overallReset(t.ecModel,t.api,t.payload)}function Rc(t,e){return t.overallProgress&&Bc}function Bc(){this.agent.dirty(),this.getDownstream().dirty()}function Vc(){this.agent&&this.agent.dirty()}function Gc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Fc(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Eo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1t.get("hoverLayerThreshold")&&!v.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=i._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(n,t),Lc(n._zr.dom,t)}function Ud(e,i){wd(Qd,function(t){t(e,i)})}Pd.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[Td]=!0,i&&Ed(this),Od.update.call(this),this[Td]=!1,Vd.call(this,n),Gd.call(this,n)}}},Pd.showLoading=function(t,e){if(!this._disposed&&(Sd(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),nf[t])){var i=nf[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},Pd.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},Pd.makeActionFromEvent=function(t){var e=L({},t);return e.type=Kd[t.type],e},Pd.dispatchAction=function(t,e){this._disposed||(Sd(e)||(e={silent:!!e}),qd[t.type]&&this._model&&(this[Td]?this._pendingActions.push(t):(Bd.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),Vd.call(this,e.silent),Gd.call(this,e.silent))))},Pd.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},Pd.on=Cd("on",!1),Pd.off=Cd("off",!1),Pd.one=Cd("one",!1);var Xd=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Yd(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function jd(){this.eventInfo}Pd._initEvents=function(){wd(Xd,function(u){function t(t){var e,i=this.getModel(),n=t.target;if("globalout"===u)e={};else if(n&&null!=n.dataIndex){var o=n.dataModel||i.getSeriesByIndex(n.seriesIndex);e=o&&o.getDataParams(n.dataIndex,n.dataType,n)||{}}else n&&n.eventData&&(e=L({},n.eventData));if(e){var a=e.componentType,r=e.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",r=e.seriesIndex);var s=a&&null!=r&&i.getComponent(a,r),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=u,this._ecEventProcessor.eventInfo={targetEl:n,packedEvent:e,model:s,view:l},this.trigger(u,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(u,t,this)},this),wd(Kd,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},Pd.isDisposed=function(){return this._disposed},Pd.clear=function(){this._disposed||this.setOption({series:[]},!0)},Pd.dispose=function(){if(!this._disposed){this._disposed=!0,jo(this.getDom(),lf,"");var e=this._api,i=this._model;wd(this._componentsViews,function(t){t.dispose(i,e)}),wd(this._chartsViews,function(t){t.dispose(i,e)}),this._zr.dispose(),delete of[this.id]}},b(kd,Ct),jd.prototype={constructor:jd,normalizeQuery:function(t){var s={},l={},u={};if(z(t)){var e=Md(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var h=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};E(t,function(t,e){for(var i=!1,n=0;nx[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Uf(this)},Hf._initDataFromProvider=function(t,e){if(!(e<=t)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!o.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=r[i],A=a[T][y];if(A){I=A[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,0=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&it))return a;o=a-1}}return-1},Hf.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=1/0,a=-1,r=0,s=0,l=this.count();st[I][1])&&(M=!1)}M&&(a[r++]=this.getRawIndex(m))}return rw[1]&&(w[1]=_)}}}return o},Hf.downSample=function(t,e,i,n){for(var o=$f(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(Bf(this))(u),f=0,p=0;pc[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getRawIndex=jf,o},Hf.getItemModel=function(t){var e=this.hostModel;return new Il(this.getRawDataItem(t),e,e&&e.ecModel)},Hf.diff=function(e){var i=this;return new Tf(e?e.getIndices():[],this.getIndices(),function(t){return qf(e,t)},function(t){return qf(i,t)})},Hf.getVisual=function(t){var e=this._visual;return e&&e[t]},Hf.setVisual=function(t,e){if(Pf(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},Hf.setLayout=function(t,e){if(Pf(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},Hf.getLayout=function(t){return this._layout[t]},Hf.getItemLayout=function(t){return this._itemLayouts[t]},Hf.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?L(this._itemLayouts[t]||{},e):e},Hf.clearItemLayouts=function(){this._itemLayouts.length=0},Hf.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},Hf.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,Pf(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},Hf.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function tp(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function ep(t,e,i){Gu.isInstance(e)||(e=Gu.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),o=Q(),a=Q(),l=[],r=function(t,e,i,n){var o=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return E(e,function(t){var e=t.dimsDef;e&&(o=Math.max(o,e.length))}),o}(e,t,n,i.dimCount),s=0;s=e[0]&&t<=e[1]},cp.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},cp.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},cp.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},cp.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},cp.prototype.getExtent=function(){return this._extent.slice()},cp.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},cp.prototype.isBlank=function(){return this._isBlank},cp.prototype.setBlank=function(t){this._isBlank=t},cp.prototype.getLabel=null,ta(cp),aa(cp,{registerWhenExtend:!0}),dp.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&N(i,gp);return new dp({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var fp=dp.prototype;function pp(t){return t._map||(t._map=Q(t.categories))}function gp(t){return R(t)&&null!=t.value?t.value:t+""}fp.getOrdinal=function(t){return pp(this).get(t)},fp.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=pp(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var mp=cp.prototype,vp=cp.extend({type:"ordinal",init:function(t,e){t&&!k(t)||(t=new dp({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),mp.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return mp.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(mp.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:et,niceExtent:et});vp.create=function(){return new vp};var yp=Nl;function xp(t){return zl(t)+2}function _p(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function wp(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),_p(t,0,e),_p(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var bp=Nl,Sp=cp.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),Sp.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=xp(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,a=[];if(!e)return a;i[0]s&&(t?a.push(s+e):a.push(i[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),o=1;on[0]&&h>>1;t[o][1]>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}bg.prototype={constructor:bg,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;ss[1];d(e[0].coord,s[0])&&(n?e[0].coord=s[0]:e.shift());n&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],a.coord)&&(n?a.coord=s[1]:e.pop());n&&d(a.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=Nl(t),e=Nl(e),c?en[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}var pm=Sr.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Wr(Sr.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,o=i.length,a=fm(i,e.smoothConstraint);if(e.connectNulls){for(;0n)return!1;return!0}(a,e))){var r=e.mapDimension(a.dim),s={};return E(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function Sm(t,e,i){if("cartesian2d"!==t.type)return vm(t,e,i);var n=t.getBaseAxis().isHorizontal(),o=mm(t,e,i);if(!i.get("clip",!0)){var a=o.shape,r=Math.max(a.width,a.height);n?(a.y-=r,a.height+=2*r):(a.x-=r,a.width+=2*r)}return o}gc.extend({type:"line",init:function(){var t=new Ii,e=new $g;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,o=this.group,a=t.getData(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===n.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,i){if(!i.valueDim)return[];for(var n=[],o=0,a=e.count();oh[c-1].coord&&(h.reverse(),d.reverse());var f=h[0].coord-10,p=h[c-1].coord+10,g=p-f;if(g<.001)return"transparent";E(h,function(t){t.offset=(t.coord-f)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new cs(0,0,0,0,h,!0);return m[n]=f,m[n+"2"]=p,m}}}(a,n)||a.getVisual("color");d.useStyle(C(r.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=_m(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var T=a.getCalculationInfo("stackedOnSeries"),A=0;f.useStyle(C(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(A=_m(T.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,i,n){var o=t.getData(),a=Ho(o,n);if(!(a instanceof Array)&&null!=a&&0<=a){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(r=new Fg(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else gc.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=Ho(o,n);if(null!=a&&0<=a){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else gc.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new pm({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new gm({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,i,n,o,a,r,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=im(o,e,r),v=im(a,t,s),y=0;ye&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},w(km,Eg);var Pm={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Nm={};Nm.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Pm),Nm.valueAxis=m({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Pm),Nm.timeAxis=C({scale:!0,min:"dataMin",max:"dataMax"},Nm.valueAxis),Nm.logAxis=C({scale:!0,logBase:10},Nm.valueAxis);function Om(a,t,r,e){E(Em,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?_u(t):{};m(t,e.getTheme().get(o+"Axis")),m(t,this.getDefaultOption()),t.type=r(a,t),i&&xu(t,n,i)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=dp.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:p([{},Nm[o+"Axis"],e],!0)})}),Tu.registerSubTypeDefaulter(a+"Axis",T(r,a))}var Em=["value","category","time","log"],zm=Tu.extend({type:"cartesian2dAxis",axis:null,init:function(){zm.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){zm.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){zm.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Rm(t,e){return e.type||(e.data?"category":"value")}m(zm.prototype,sg);var Bm={offset:0};function Vm(t,e){return t.getCoordSysModel()===e}function Gm(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}Om("x",zm,Rm,Bm),Om("y",zm,Rm,Bm),Tu.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Fm=Gm.prototype;function Wm(t,e,i,n){i.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],r=i.model,s=r.get("axisLine.onZero"),l=r.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Hm(a[l])&&(o=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&Hm(a[u])&&!n[h(a[u])]){o=a[u];break}o&&(n[h(o)]=!0)}function h(t){return t.dim+"_"+t.index}}function Hm(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(0u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,ev(a)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*jm/180),ev(a)?n=$m(t.rotation,null!=d?d:t.rotation,r):(n=function(t,e,i,n){var o,a,r=Gl(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;o=Fl(r-jm/2)?(a=l?"bottom":"top","center"):Fl(r-1.5*jm)?(a=l?"top":"bottom","center"):(a="middle",r<1.5*jm&&jm/2l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r=i.r0}}});var jv=Math.PI/180;function qv(o,t,e,i,n,a,r,s,l,u){function h(t,e,i){for(var n=t;nl+r);n++)if(o[n].y+=i,to[n].y+o[n].height)return void c(n,i/2);c(e-1,i/2)}function c(t,e){for(var i=t;0<=i&&!(o[i].y-eo[i-1].y+o[i-1].height));i--);}function d(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s=e?v.push(o[y]):m.push(o[y]);d(m,!1,t,e,i,n),d(v,!0,t,e,i,n)}function Kv(t){return"center"===t.position}function $v(L,k,P,t,N,e){var O,E,z=L.getData(),R=[],B=!1,V=(L.get("minShowLabelAngle")||0)*jv;z.each(function(t){var e=z.getItemLayout(t),i=z.getItemModel(t),n=i.getModel("label"),o=n.get("position")||i.get("emphasis.label.position"),a=n.get("distanceToLabelLine"),r=n.get("alignTo"),s=Pl(n.get("margin"),P),l=n.get("bleedMargin"),u=n.getFont(),h=i.getModel("labelLine"),c=h.get("length");c=Pl(c,P);var d=h.get("length2");if(d=Pl(d,P),!(e.anglei[0]&&isFinite(u)&&isFinite(i[0]););else{var h=o.getTicks().length-1;f"+N(t,function(t,e){var i=o.get(o.mapDimension(t.dim),n);return eu(t.name+" : "+i)}).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Mf({type:"radar",render:function(l,t,e){var i=l.coordinateSystem,g=this.group,m=l.getData(),s=this._data;function u(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=function(t){return k(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),a=mg(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function h(t,e,i,n,o,a){i.removeAll();for(var r=0;r"+eu(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}}),Vv);var Ay="\0_ec_interaction_mutex";function Dy(t,e){return!!Cy(t)[e]}function Cy(t){return t[Ay]||(t[Ay]={})}function Ly(i){this.pointerChecker,this._zr=i,this._opt={};var t=A,n=t(ky,this),o=t(Py,this),a=t(Ny,this),r=t(Oy,this),s=t(Ey,this);Ct.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=C(D(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(i.on("mousedown",n),i.on("mousemove",o),i.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(i.on("mousewheel",r),i.on("pinch",s))},this.disable=function(){i.off("mousedown",n),i.off("mousemove",o),i.off("mouseup",a),i.off("mousewheel",r),i.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function ky(t){if(!(Ht(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function Py(t){if(this._dragging&&By("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!Dy(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,o=this._y,a=e-n,r=i-o;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&Wt(t.event),Ry(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:n,oldY:o,newX:e,newY:i})}}function Ny(t){Ht(t)||(this._dragging=!1)}function Oy(t){var e=By("zoomOnMouseWheel",t,this._opt),i=By("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),a=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=3x.x)||(m-=Math.PI);var b=v?"left":"right",S=a.labelModel.get("rotate"),M=S*(Math.PI/180);g.setStyle({textPosition:a.labelModel.get("position")||b,textRotation:null==S?-m:M,textOrigin:"center",verticalAlign:"middle"})}if(s.parentNode&&s.parentNode!==u){var I=i.__edge;sl(I=I||(i.__edge=new ls({shape:Px(a,f,f),style:C({opacity:0,strokeNoScale:!0},a.lineStyle)})),{shape:Px(a,d,p),style:{opacity:1}},o),n.add(I)}}function kx(t,e,i,n,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),h=(a=Cx(s,u,a),s.parentNode===l?s:s.parentNode||s);null==(r=h.getLayout());)h=h.parentNode===l?h:h.parentNode||h;sl(i,{position:[r.x+1,r.y+1]},o,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var c=i.__edge;c&&sl(c,{shape:Px(a,r,r),style:{opacity:0}},o,function(){n.remove(c)})}function Px(t,e,i){var n,o,a,r,s,l,u,h,c=t.orient;if("radial"!==t.layout)return s=e.x,u=e.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(n=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:o,cpx2:a,cpy2:r};s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=Sx(s,u),f=Sx(s,u+(h-u)*t.curvature),p=Sx(l,h+(u-h)*t.curvature),g=Sx(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}function Nx(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var o=i.children;if(o.length)for(var a=o.length-1;0<=a;a--)n.push(o[a])}}mx.prototype={constructor:mx,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),z(t=t||{})&&(t={order:t});var n,o=t.order||"preorder",a=this[t.attr||"children"];"preorder"===o&&(n=e.call(i,this));for(var r=0;!n&&re&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;ea&&(a=t.depth)});var r=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:a;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return eu(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),Mf({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new Ii,this._controller=new Ly(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(n,t,i,e){var o=n.getData(),a=n.layoutInfo,r=this._mainGroup,s=n.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]),this._updateViewCoordSys(n,a,s),this._updateController(n,t,i);var l=this._data,u={expandAndCollapse:n.get("expandAndCollapse"),layout:s,orient:n.getOrient(),curvature:n.get("lineStyle.curveness"),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(t){Dx(o,t)&&Lx(o,t,null,r,n,u)}).update(function(t,e){var i=l.getItemGraphicEl(e);Dx(o,t)?Lx(o,t,i,r,n,u):i&&kx(l,e,i,r,n,u)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&kx(l,t,e,r,n,u)}).execute(),this._nodeScaleRatio=n.get("nodeScaleRatio"),this._updateNodeAndLinkScale(n),!0===u.expandAndCollapse&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:n.id,dataIndex:e})})}),this._data=o},_updateViewCoordSys:function(t){var i=t.getData(),n=[];i.each(function(t){var e=i.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||n.push([+e.x,+e.y])});var e=[],o=[];Ba(n,e,o);var a=this._min,r=this._max;o[0]-e[0]==0&&(e[0]=a?a[0]:e[0]-1,o[0]=r?r[0]:o[0]+1),o[1]-e[1]==0&&(e[1]=a?a[1]:e[1]-1,o[1]=r?r[1]:o[1]+1);var s=t.coordinateSystem=new Qy;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(e[0],e[1],o[0]-e[0],o[1]-e[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=e,this._max=o},_updateController:function(o,t,a){var e=this._controller,i=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,i){var n=r.getBoundingRect();return n.applyTransform(r.transform),n.contain(e,i)&&!Wy(t,a,o)}),e.enable(o.get("roam")),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){Vy(i,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"treeRoam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){Gy(i,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(o)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),gf({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=n.dataIndex,i=t.getData().tree.getNodeByDataIndex(e);i.isExpand=!i.isExpand})}),gf({type:"treeRoam",event:"treeRoam",update:"none"},function(i,t){t.eachComponent({mainType:"series",subType:"tree",query:i},function(t){var e=Ky(t.coordinateSystem,i);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function Ox(t,e,i){if(t&&0<=_(e,t.type)){var n=i.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=n.getNodeById(a)))return{node:o}}}function Ex(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function zx(t,e){return 0<=_(Ex(t),e)}function Rx(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}yf(Mm("tree","circle")),vf(function(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var i=function(t,e){return vu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,a=0,r=null;r="radial"===n?(o=2*Math.PI,a=Math.min(i.height,i.width)/2,bx(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=i.width,a=i.height,bx());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var o=i.length-1;0<=o;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(a)}}(s),function(t,e,i){for(var n,o=[t],a=[];n=o.pop();)if(a.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),Nx(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Sx(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=a/(h.getLayout().x+d+f),p=o/(c.depth-1||1),Nx(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:o-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),Nx(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}(t,e)})}),ic.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};!function i(t){var n=0;E(t.children,function(t){i(t);var e=t.value;k(e)&&(e=e[0]),n+=e});var e=t.value;k(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=n);e<0&&(e=0);k(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[];n=t.levels=function(t,e){var n,i=e.get("color");if(!i)return;if(E(t=t||[],function(t){var e=new Il(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),!n){(t[0]||(t[0]={})).color=i.slice()}return t}(n,e);var o={};return o.levels=n,vx.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=k(i)?Kl(i[0]):Kl(i);return eu(e.getName(t)+": "+n)},getDataParams:function(t){var e=ic.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Rx(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},L(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Q(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var Bx=5;function Vx(t){this.group=new Ii,t.add(this.group)}function Gx(t,e,i,n,o,a){var r=[[o?t:t-Bx,e],[t+i,e],[t+i,e+n],[o?t:t-Bx,e+n]];return a||r.splice(2,0,[t+i+Bx,e+n/2]),o||r.push([t,e+n/2]),r}Vx.prototype={constructor:Vx,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),yu(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a,r,s=0,l=e.emptyItemWidth,u=t.get("breadcrumb.height"),h=function(t,e,i){var n=e.width,o=e.height,a=Pl(t.x,n),r=Pl(t.y,o),s=Pl(t.x2,n),l=Pl(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=o),i=Jl(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}(e.pos,e.box),c=e.totalWidth,d=e.renderList,f=d.length-1;0<=f;f--){var p=d[f],g=p.node,m=p.width,v=p.text;c>h.width&&(c-=m-l,m=l,v=null);var y=new qr({shape:{points:Gx(s,0,m,u,f===d.length-1,0===f)},style:C(i.getItemStyle(),{lineJoin:"bevel",text:v,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:T(o,g)});this.group.add(y),a=t,r=g,y.eventData={componentType:"series",componentSubType:"treemap",componentIndex:a.componentIndex,seriesIndex:a.componentIndex,seriesName:a.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&Rx(r,a)},s+=m+8}},remove:function(){this.group.removeAll()}};function Fx(t){var e=$x(t);return e.stroke=e.fill=e.lineWidth=null,e}var Wx=A,Hx=Ii,Zx=is,Ux=E,Xx=["label"],Yx=["emphasis","label"],jx=["upperLabel"],qx=["emphasis","upperLabel"],Kx=10,$x=ra([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function Jx(d,r,s,l,u,i,f,t,e,n){if(f){var p=f.getLayout();if(p&&p.isInView){var h=p.width,c=p.height,g=p.borderWidth,m=p.invisible,v=f.getRawIndex(),y=t&&t.getRawIndex(),o=f.viewChildren,x=p.upperHeight,a=o&&o.length,_=f.getModel("itemStyle"),w=f.getModel("emphasis.itemStyle"),b=A("nodeGroup",Hx);if(b){if(e.add(b),b.attr("position",[p.x||0,p.y||0]),b.__tmNodeWidth=h,b.__tmNodeHeight=c,p.isAboveViewRoot)return b;var S=A("background",Zx,n,1);if(S&&function(t,n,o){n.dataIndex=f.dataIndex,n.seriesIndex=d.seriesIndex,n.setShape({x:0,y:0,width:h,height:c});var a=f.getVisual("borderColor",!0),r=w.get("borderColor");I(n,function(){var t=Fx(_);t.fill=a;var e=$x(w);if(e.fill=r,o){var i=h-2*g;T(t,e,a,i,x,{x:g,y:0,width:i,height:x})}else t.text=e.text=null;n.setStyle(t),Ys(n,e)}),t.add(n)}(b,S,a&&p.upperHeight),!a){var M=A("content",Zx,n,2);M&&function(t,i){i.dataIndex=f.dataIndex,i.seriesIndex=d.seriesIndex;var n=Math.max(h-2*g,0),o=Math.max(c-2*g,0);i.culling=!0,i.setShape({x:g,y:g,width:n,height:o});var a=f.getVisual("color",!0);I(i,function(){var t=Fx(_);t.fill=a;var e=$x(w);T(t,e,a,n,o),i.setStyle(t),Ys(i,e)}),t.add(i)}(b,M)}return b}}}function I(t,e){m?t.invisible||i.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function T(t,e,i,n,o,a){var r=f.getModel(),s=W(d.getFormattedLabel(f.dataIndex,"normal",null,null,a?"upperLabel":"label"),r.get("name"));if(!a&&p.isLeafRoot){var l=d.get("drillDownIcon",!0);s=l?l+" "+s:s}var u=r.getModel(a?jx:Xx),h=r.getModel(a?qx:Yx),c=u.getShallow("show");$s(t,e,u,h,{defaultText:c?s:null,autoColor:i,isRectText:!0}),a&&(t.textRect=D(a)),t.truncate=c&&u.get("ellipsis")?{outerWidth:n,outerHeight:o,minChar:2}:null}function A(t,e,i,n){var o=null!=y&&s[t][y],a=u[t];return o?(s[t][y]=null,function(t,e,i){(t[v]={}).old="nodeGroup"===i?e.position.slice():L({},e.shape)}(a,o,t)):m||((o=new e({z:function(t,e){var i=t*Kx+e;return(i-1)/i}(i,n)})).__tmDepth=i,function(t,e,i){var n=t[v]={},o=f.parentNode;if(o&&(!l||"drillDown"===l.direction)){var a=0,r=0,s=u.background[o.getRawIndex()];!l&&s&&s.old&&(a=s.old.width,r=s.old.height),n.old="nodeGroup"===i?[0,r]:{x:a,y:r,width:0,height:0}}n.fadein="nodeGroup"!==i}(a,0,o.__tmStorageName=t)),r[t][v]=o}}Mf({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(_(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=Ox(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===a&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,h=this._giveContainerGroup(r),c=this._doRender(h,t,u);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?c.renderFinally():this._doAnimation(h,c,t,u),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new Hx,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){var n=e.getData().tree,o=this._oldTree,a={nodeGroup:[],background:[],content:[]},r={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],c=T(Jx,e,r,s,i,a,l);!function a(r,s,l,u,h){u?Ux(s=r,function(t,e){t.isRemoved()||i(e,e)}):new Tf(s,r,t,t).add(i).update(i).remove(T(i,null)).execute();function t(t){return t.getId()}function i(t,e){var i=null!=t?r[t]:null,n=null!=e?s[e]:null,o=c(i,n,l,h);o&&a(i&&i.viewChildren||[],n&&n.viewChildren||[],o,u,h+1)}}(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var u,h,d=(h={nodeGroup:[],background:[],content:[]},(u=s)&&Ux(u,function(t,e){var i=h[e];Ux(t,function(t){t&&(i.push(t),t.__tmWillDelete=1)})}),h);return this._oldTree=n,this._storage=r,{lastsForAnimation:a,willDeleteEls:d,renderFinally:function(){Ux(d,function(t){Ux(t,function(t){t.parent&&t.parent.remove(t)})}),Ux(l,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,a,e,s){if(e.get("animation")){var l=e.get("animationDurationUpdate"),u=e.get("animationEasing"),h=function(){var a,r=[],s={};return{add:function(t,e,i,n,o){return z(n)&&(o=n,n=0),!s[t.id]&&(s[t.id]=1,r.push({el:t,target:e,time:i,delay:n,easing:o}),!0)},done:function(t){return a=t,this},start:function(){for(var t=r.length,e=0,i=r.length;e=r.length||t===r[t.depth]){var i=T_(l,c,t,e,y,s);n(t,i,o,a,r,s)}})}else p=b_(c),t.setVisual("color",p)}(a,{},N(o.levelModels,function(t){return t?t.get(x_):null}),r,t.getViewRoot().getAncestors(),t)}};function w_(i,n,o,a){var r=L({},n);return E(["color","colorAlpha","colorSaturation"],function(t){var e=i.get(t,!0);null==e&&o&&(e=o[t]),null==e&&(e=n[t]),null==e&&(e=a.get(t)),null!=e&&(r[t]=e)}),r}function b_(t){var e=S_(t,"color");if(e){var i=S_(t,"colorAlpha"),n=S_(t,"colorSaturation");return n&&(e=Ue(e,null,null,n)),i&&(e=Xe(e,i)),e}}function S_(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function M_(t,e,i,n,o,a){if(a&&a.length){var r=I_(e,"color")||null!=o.color&&"none"!==o.color&&(I_(e,"colorAlpha")||I_(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new a_(c);return d.__drColorMappingBy=h,d}}}function I_(t,e){var i=t.get(e);return y_(i)&&i.length?{name:e,range:i}:null}function T_(t,e,i,n,o,a){var r=L({},e);if(o){var s=o.type,l="color"===s&&o.__drColorMappingBy,u="index"===l?n:"id"===l?a.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));r[s]=o.mapValueToVisual(u)}return r}var A_=Math.max,D_=Math.min,C_=W,L_=E,k_=["itemStyle","borderWidth"],P_=["itemStyle","gapWidth"],N_=["upperLabel","show"],O_=["upperLabel","height"],E_={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),a=i.getHeight(),r=t.option,s=vu(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=r.size||[],u=Pl(C_(s.width,l[0]),o),h=Pl(C_(s.height,l[1]),a),c=n&&n.type,d=Ox(n,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?n.rootRect:null,p=t.getViewRoot(),g=Ex(p);if("treemapMove"!==c){var m="treemapZoomToNode"===c?function(t,e,i,n,o){var a,r=(e||{}).node,s=[n,o];if(!r||r===i)return s;var l=n*o,u=l*t.option.zoomToNodeRatio;for(;a=r.parentNode;){for(var h=0,c=a.children,d=0,f=c.length;ds[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,i,n,o){if(!n)return i;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;0<=l;l--){var u=o["asc"===n?r-l-1:l].getValue();u/i*ei[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;c "+d)),u++)}var f,p=i.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=hp(t,i);else{var g=nh.get(p),m=g&&"view"!==g.type&&g.dimensions||[];_(m,"value")<0&&m.concat(["value"]);var v=np(t,{coordDimensions:m});(f=new Wf(v,i)).initData(t)}var y=new Wf(["value"],i);return y.initData(l,s),o&&o(f,y),ux({mainData:f,struct:a,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var Y_=Sf({type:"series.graph",init:function(t){Y_.superApply(this,"init",arguments);var e=this;function i(){return e._categoriesData}this.legendVisualProvider=new Gv(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){Y_.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){Y_.superApply(this,"mergeDefaultAndTheme",arguments),zo(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],i=t.data||t.nodes||[],l=this;if(i&&e)return X_(i,e,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=l._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var i=l.getModel("edgeLabel"),n=new Il({label:i.option},i.parentModel,s),o=l.getModel("emphasis.edgeLabel"),a=new Il({emphasis:{label:o.option}},o.parentModel,s);function r(t){return(t=this.parsePath(t))&&"label"===t[0]?n:t&&"emphasis"===t[0]&&"label"===t[1]?a:this.parentModel}e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(r),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"!==i)return Y_.superApply(this,"formatTooltip",arguments);var n=this.getData(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=eu(l.join(" > ")),o.value&&(l+=" : "+eu(o.value)),l},_updateCategoriesData:function(){var t=N(this.option.categories||[],function(t){return null!=t.value?t:L({value:0},t)}),e=new Wf(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return Y_.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),j_=os.prototype,q_=ls.prototype;function K_(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var $_=Is({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[K_(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:j_.buildPath,_buildPathCurve:q_.buildPath,pointAt:function(t){return this[K_(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:j_.pointAt,_pointAtCurve:q_.pointAt,tangentAt:function(t){var e=this.shape,i=K_(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return mt(i,i)},_tangentAtCurve:q_.tangentAt}),J_=["fromSymbol","toSymbol"];function Q_(t){return"_"+t+"Type"}function tw(t,e,i){var n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,t),a=e.getItemVisual(i,t+"Size");if(o&&"none"!==o){k(a)||(a=[a,a]);var r=mg(o,-a[0]/2,-a[1]/2,a[0],a[1],n);return r.name=t,r}}function ew(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}function iw(t,e,i){Ii.call(this),this._createLine(t,e,i)}var nw=iw.prototype;function ow(t){this._ctor=t||iw,this.group=new Ii}nw.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),i=this.childOfName("label");if(t||e||!i.ignore){for(var n=1,o=this.parent;o;)o.scale&&(n/=o.scale[0]),o=o.parent;var a=this.childOfName("line");if(this.__dirty||a.__dirty){var r=a.shape.percent,s=a.pointAt(0),l=a.pointAt(r),u=ht([],l,s);if(mt(u,u),t){t.attr("position",s);var h=a.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[n*r,n*r])}if(e){e.attr("position",l);h=a.tangentAt(1);e.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),e.attr("scale",[n*r,n*r])}if(!i.ignore){var c,d,f;i.attr("position",l);var p=5*n;if("end"===i.__position)c=[u[0]*p+l[0],u[1]*p+l[1]],d=.8=t&&(0===e?0:n[e-1][0])a&&(e[1-n]=e[n]+c.sign*a),e}function Hw(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:0o*(1-h[0])?(l="jump",r=s-o*(1-h[2])):0<=(r=s-o*h[1])&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?Ww(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[Yw(0,a[1]*s/o-o/2)])[1]=Xw(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},nh.register("parallel",{create:function(n,o){var a=[];return n.eachComponent("parallel",function(t,e){var i=new Jw(t,n,o);i.name="parallel_"+e,i.resize(t,o),(t.coordinateSystem=i).model=t,a.push(i)}),n.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=e.coordinateSystem}}),a}});var tb=Tu.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return ra([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=D(t);if(e)for(var i=e.length-1;0<=i;i--)Ol(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;nn.getWidth()||i<0||i>n.getHeight()}(t,e)){var n=t._zr,o=t._covers,a=bb(t,e,i);if(!t._dragging)for(var r=0;rf&&(f=m.depth),g.setLayout({depth:v?m.depth:c},!0),"vertical"===a?g.setLayout({dy:i},!0):g.setLayout({dx:i},!0);for(var y=0;y "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});function QS(t,e,i){Ii.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var tM=QS.prototype;function eM(t,e,i){Ii.call(this),this._createPolyline(t,e,i)}tM.createLine=function(t,e,i){return new iw(t,e,i)},tM._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");k(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=mg(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._updateEffectAnimation(t,i,e))},tM._updateEffectAnimation=function(e,t,i){var n=this.childAt(1);if(n){var o=this,a=e.getItemLayout(i),r=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=W(t.get("delay"),function(t){return t/e.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),0e);r++);r=Math.min(r-1,o-2)}wt(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},w(nM,QS);var aM=Is({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var o=0;o=e[0]&&t<=e[1]}}(y,e.option.range):function(e,n,o){var i=e[1]-e[0],a=(n=N(n,function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}})).length,r=0;return function(t){for(var e=r;e=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0==o?i.y+i.height/2:i.x+i.width/2,n}}).dimensions});var BM=["axisLine","axisTickLabel","axisName"],VM="splitLine",GM=hv.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var o=this.group;o.removeAll();var a=RM(t),r=new Ym(t,a);E(BM,r.add,r),o.add(r.getGroup()),t.get(VM+".show")&&this["_"+VM](t),GM.superCall(this,"render",t,e,i,n)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),o=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;fr)return!0;if(a){var s=sv(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=oI(t).pointerEl=new yl[o.type](aI(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=oI(t).labelEl=new is(aI(e.label));t.add(o),uI(o,n)}},updatePointerEl:function(t,e,i){var n=oI(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=oI(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),uI(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),o=this._handle,a=i.getModel("handle"),r=i.get("status");if(!a.get("show")||!r||"hide"===r)return o&&n.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=pl(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Wt(t.event)},onmousedown:rI(this._onHandleDragMove,this,0,0),drift:rI(this._onHandleDragMove,this),ondragend:rI(this._onHandleDragEnd,this)}),n.add(o)),cI(o,i,!1);o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");k(s)||(s=[s,s]),o.attr("scale",[s[0]/2,s[1]/2]),Tc(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){lI(this._axisPointerModel,!e&&this._moveAnimation,this._handle,hI(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(hI(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(hI(n)),oI(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=sI);var _I=sI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=wI(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=dI(n),c=bI[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}mI(e,t,pv(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=pv(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:gI(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=wI(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function wI(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var bI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:vI([e,i[0]],[e,i[1]],SI(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),o=i[1]-i[0];return{type:"Rect",shape:yI([e-n/2,i[0]],[n,o],SI(t))}}};function SI(t){return"x"===t.dim?0:1}hv.registerAxisPointerClass("CartesianAxisPointer",_I),ff(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!k(e)&&(t.axisPointer.link=[e])}}),pf(Id.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=av(t,e)}),gf({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||A(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){KM(r)&&(r=WM({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=KM(r),u=o.axesInfo,h=s.axesInfo,c="leave"===n||KM(r),d={},f={},p={list:[],map:{}},g={showPointer:ZM(YM,f),showTooltip:ZM(jM,p)};HM(s.coordSysMap,function(t,e){var a=l||t.containPoint(r);HM(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,n=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(u,t);if(!c&&a&&(!u||n)){var o=n&&n.value;null!=o||l||(o=i.pointToData(r)),null!=o&&XM(t,o,g,!1,d)}})});var m={};return HM(h,function(o,t){var a=o.linkGroup;a&&!f[t]&&HM(a.axesInfo,function(t,e){var i=f[e];if(t!==o&&i){var n=i.value;a.mapper&&(n=o.axis.scale.parse(a.mapper(n,qM(t),qM(o)))),m[o.key]=n}})}),HM(m,function(t,e){XM(h[e],t,g,!0,d)}),function(o,t,e){var a=e.axesInfo=[];HM(t,function(t,e){var i=t.axisPointerModel.option,n=o[e];n?(t.useHandle||(i.status="show"),i.value=n.value,i.seriesDataIndices=(n.payloadBatch||[]).slice()):t.useHandle||(i.status="hide"),"show"===i.status&&a.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}(f,h,d),function(t,e,i,n){if(KM(e)||!t.list.length)return n({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(p,r,t,a),function(t,e,i){var n=i.getZr(),o="axisPointerLastHighlights",a=UM(n)[o]||{},r=UM(n)[o]={};HM(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&HM(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var s=[],l=[];E(a,function(t,e){r[e]||l.push(t)}),E(r,function(t,e){a[e]||s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,i),d}});var MI=["x","y"],II=["width","height"],TI=sI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=CI(r,1-DI(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=dI(n),c=AI[u](a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}mI(e,t,RM(i),i,n,o)},getHandleTransform:function(t,e,i){var n=RM(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:gI(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=DI(o),s=CI(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=CI(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),AI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:vI([e,i[0]],[e,i[1]],DI(t))}},shadow:function(t,e,i){var n=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:yI([e-n/2,i[0]],[n,o],DI(t))}}};function DI(t){return t.isHorizontal()?0:1}function CI(t,e){var i=t.getRect();return[i[MI[e]],i[MI[e]]+i[II[e]]]}hv.registerAxisPointerClass("SingleAxisPointer",TI),bf({type:"single"});var LI=ic.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){LI.superApply(this,"init",arguments),this.legendVisualProvider=new Gv(A(this.getData,this),A(this.getRawData,this))},fixData:function(t){var e=t.length,i=Ko(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,dataList:t})});for(var o=n.length,a=-1,r=-1,s=0;sMath.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,f>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,f>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),c.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var x=d*p+l.cx,_=d*g+l.cy;c.attr("position",[x,_]);var w=S("rotate"),b=0;function S(t){var e=a.get(t);return null==e?o.get(t):e}"radial"===w?(b=-f)<-Math.PI/2&&(b+=Math.PI):"tangential"===w?(b=Math.PI/2-f)>Math.PI/2?b-=Math.PI:b<-Math.PI/2&&(b+=Math.PI):"number"==typeof w&&(b=w*Math.PI/180),c.attr("rotation",b)},BI._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function o(){r.onEmphasis(n)}function a(){r.onNormal()}var r=this;i.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},w(RI,Ii);gc.extend({type:"sunburst",init:function(){},render:function(o,a,t,e){var n=this;this.seriesModel=o,this.api=t,this.ecModel=a;var r=o.getData(),s=r.tree.root,i=o.getViewRoot(),l=this.group,u=o.get("renderLabelForZeroData"),h=[];i.eachNode(function(t){h.push(t)});var c=this._oldChildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function t(t){return t.getId()}function e(t,e){!function(t,e){u||!t||t.getValue()||(t=null);if(t!==s&&e!==s)if(e&&e.piece)t?(e.piece.updateData(!1,t,"normal",o,a),r.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(e);else if(t){var i=new RI(t,o,a);l.add(i),r.setItemGraphicEl(t.dataIndex,i)}}(null==t?null:i[t],null==e?null:n[e])}new Tf(n,i,t,t).add(e).update(e).remove(T(e,null)).execute()}(h,c),function(t,e){if(0=i.r0}}});var VI="sunburstRootToNode";gf({type:VI,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var i=Ox(o,[VI],t);if(i){var n=t.getViewRoot();n&&(o.direction=zx(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var GI="sunburstHighlight";gf({type:GI,update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){var i=Ox(n,[GI],t);i&&(n.highlight=i.node)})});gf({type:"sunburstUnhighlight",update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){i.unhighlight=!0})});var FI=Math.PI/180;function WI(t,e){if("function"==typeof e)return t.sort(e);var n="asc"===e;return t.sort(function(t,e){var i=(t.getValue()-e.getValue())*(n?1:-1);return 0==i?(t.dataIndex-e.dataIndex)*(n?-1:1):i})}function HI(a,r){return r=r||[0,0],N(["x","y"],function(t,e){var i=this.getAxis(t),n=r[e],o=a[e]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}yf(T(Yv,"sunburst")),vf(T(function(t,e,C,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");k(i)||(i=[0,i]),k(e)||(e=[e,e]);var n=C.getWidth(),o=C.getHeight(),h=Math.min(n,o),c=Pl(e[0],n),d=Pl(e[1],o),f=Pl(i[0],h/2),a=Pl(i[1],h/2),r=-t.get("startAngle")*FI,p=t.get("minAngle")*FI,g=t.getData().tree.root,s=t.getViewRoot(),m=s.depth,l=t.get("sort");null!=l&&!function e(t,i){var n=t.children||[];t.children=WI(n,i);n.length&&E(t.children,function(t){e(t,i)})}(s,l);var u=0;E(s.children,function(t){isNaN(t.getValue())||u++});var v=s.getValue(),y=Math.PI/(v||u)*2,x=0t[1]&&t.reverse(),{coordSys:{type:"polar",cx:o.cx,cy:o.cy,r:t[1],r0:t[0]},api:{coord:A(function(t){var e=a.dataToRadius(t[0]),i=r.dataToAngle(t[1]),n=o.coordToPoint([e,i]);return n.push(e,i*Math.PI/180),n}),size:A(XI,o)}}},calendar:function(i){var t=i.getRect(),e=i.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:i.getCellWidth(),cellHeight:i.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return i.dataToPoint(t,e)}}}}};function tT(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function eT(a,r,e,t){var i=a.get("renderItem"),n=a.coordinateSystem,o={};n&&(o=n.prepareCustoms?n.prepareCustoms():QI[n.type](n));var s,l,u,h,c,d=C({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=s),r.get(r.getDimension(t||0),e)},style:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(jI).getItemStyle();null!=c&&(i.fill=c);var n=r.getItemVisual(e,"opacity");null!=n&&(i.opacity=n);var o=t?rT(t,u):u;return Qs(i,o,null,{autoColor:c,isRectText:!0}),i.text=o.getShallow("show")?H(a.getFormattedLabel(e,"normal"),Gg(r,e)):null,t&&sT(i,t),i},styleEmphasis:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(qI).getItemStyle(),n=t?rT(t,h):h;return Qs(i,n,null,{isRectText:!0},!0),i.text=n.getShallow("show")?Z(a.getFormattedLabel(e,"emphasis"),a.getFormattedLabel(e,"normal"),Gg(r,e)):null,t&&sT(i,t),i},visual:function(t,e){return null==e&&(e=s),r.getItemVisual(e,t)},barLayout:function(t){if(n.getBaseAxis){return function(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),o=0;oe[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,o=i*i+n*n,a=this.r,r=this.r0;return o<=a*a&&r*r<=o}}}};var vT=Tu.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});m(vT.prototype,sg);var yT={splitNumber:5};function xT(t,e){return e.type||(e.data?"category":"value")}function _T(t,e){var i=this,n=i.getAngleAxis(),o=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===i){var e=t.getData();E(e.mapDimension("radius",!0),function(t){o.scale.unionExtentFromData(e,up(e,t))}),E(e.mapDimension("angle",!0),function(t){n.scale.unionExtentFromData(e,up(e,t))})}}),eg(n.scale,n.model),eg(o.scale,o.model),"category"===n.type&&!n.onBand){var a=n.getExtent(),r=360/n.scale.count();n.inverse?a[1]+=r:a[1]-=r,n.setExtent(a[0],a[1])}}function wT(t,e){if(t.type=e.get("type"),t.scale=ig(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}(e.axis=t).model=e}Om("angle",vT,xT,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),Om("radius",vT,xT,yT),wf({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}}),nh.register("polar",{dimensions:mT.prototype.dimensions,create:function(i,s){var l=[];return i.eachComponent("polar",function(t,e){var i=new mT(e);i.update=_T;var n=i.getRadiusAxis(),o=i.getAngleAxis(),a=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");wT(n,a),wT(o,r),function(t,e,i){var n=e.get("center"),o=i.getWidth(),a=i.getHeight();t.cx=Pl(n[0],o),t.cy=Pl(n[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=e.get("radius");null==l?l=[0,"100%"]:k(l)||(l=[0,l]),l=[Pl(l[0],s),Pl(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}(i,t,s),l.push(i),(t.coordinateSystem=i).model=t}),i.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=i.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=e.coordinateSystem}}),l}});var bT=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function ST(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function MT(t){return t.getRadiusAxis().inverse?0:1}function IT(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}hv.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),a=i.getTicksCoords(),r=i.getMinorTicksCoords(),s=N(i.getViewLabels(),function(t){return(t=D(t)).coord=i.dataToCoord(t.tickValue),t});IT(s),IT(a),E(bT,function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,a,r,o,s)},this)}},_axisLine:function(t,e,i,n,o){var a,r=t.getModel("axisLine.lineStyle"),s=MT(e),l=s?0:1;(a=0===o[l]?new Hr({shape:{cx:e.cx,cy:e.cy,r:o[s]},style:r.getLineStyle(),z2:1,silent:!0}):new Xr({shape:{cx:e.cx,cy:e.cy,r:o[s],r0:o[l]},style:r.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n,o){var a=t.getModel("axisTick"),r=(a.get("inside")?-1:1)*a.get("length"),s=o[MT(e)],l=N(i,function(t){return new os({shape:ST(e,[s,s+r],t.coord)})});this.group.add(ks(l,{style:C(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,n,o){if(n.length){for(var a=t.getModel("axisTick"),r=t.getModel("minorTick"),s=(a.get("inside")?-1:1)*r.get("length"),l=o[MT(e)],u=[],h=0;hr?"left":"right",u=Math.abs(a[1]-s)/o<.3?"middle":a[1]>s?"top":"bottom";p&&p[n]&&p[n].textStyle&&(i=new Il(p[n].textStyle,g,g.ecModel));var h=new Fr({silent:Ym.isLabelSilent(c)});this.group.add(h),Qs(h.style,i,{x:a[0],y:a[1],textFill:i.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u}),v&&(h.eventData=Ym.makeAxisEventDataBase(c),h.eventData.targetType="axisLabel",h.eventData.value=t.rawLabel)},this)},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=0;um?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,i,0,s,d))}});var CT={line:function(t,e,i,n,o){return"angle"===t.dim?{type:"Line",shape:vI(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,o){var a=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:xI(e.cx,e.cy,n[0],n[1],(-i-a/2)*r,(a/2-i)*r)}:{type:"Sector",shape:xI(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};function LT(n,t){t.update="updateView",gf(t,function(t,e){var i={};return e.eachComponent({mainType:"geo",query:t},function(e){e[n](t.name),E(e.coordinateSystem.regions,function(t){i[t.name]=e.isSelected(t.name)||!1})}),{selected:i,name:t.name}})}hv.registerAxisPointerClass("PolarAxisPointer",DT),vf(T(function(t,e,i){var N={},O=function(t){var g={};E(t,function(t,e){var i=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=dT(n,o),r=o.getExtent(),s="category"===o.type?o.getBandWidth():Math.abs(r[1]-r[0])/i.count(),l=g[a]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;g[a]=l;var h=cT(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=Pl(t.get("barWidth"),s),d=Pl(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var d={};return E(g,function(t,i){d[i]={};var e=t.stacks,n=t.bandWidth,o=Pl(t.categoryGap,n),a=Pl(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a);l=Math.max(l,0),E(e,function(t,e){var i=t.maxWidth;i&&i=n.start.time&&i.timea.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();if(n.setDate(o+i-1),n.getDate()!==a)for(var r=0n.weeks||0===t&&en.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},kT.dimensions=kT.prototype.dimensions,kT.getDimensionsInfo=kT.prototype.getDimensionsInfo,kT.create=function(i,n){var o=[];return i.eachComponent("calendar",function(t){var e=new kT(t,i,n);o.push(e),t.coordinateSystem=e}),i.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=o[t.get("calendarIndex")||0])}),o},nh.register("calendar",kT);var NT=Tu.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=_u(t);NT.superApply(this,"init",arguments),OT(t,o)},mergeOption:function(t,e){NT.superApply(this,"mergeOption",arguments),OT(this.option,t)}});function OT(t,e){var i=t.cellSize;k(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=N([0,1],function(t){return function(t,e){return null!=t[pu[e][0]]||null!=t[pu[e][1]]&&null!=t[pu[e][2]]}(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});xu(t,e,{type:"box",ignoreSize:n})}var ET={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},zT={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};bf({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new is({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(i,t,n,o){var a=this,r=i.coordinateSystem,s=i.getModel("splitLine.lineStyle").getLineStyle(),l=i.get("splitLine.show"),e=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){d(u.formatedDate),0===h&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var e=a._getLinePointsOfOneWeek(i,t,n);a._tlpoints.push(e[0]),a._blpoints.push(e[e.length-1]),l&&a._drawSplitline(e,s,o)}d(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,e,n),s,o),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,e,n),s,o)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new Kr({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?au(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r=r||("horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new Fr({z2:30});Qs(m.style,o,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),a=n.get("margin"),r=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];z(o)&&(o=ET[o.toUpperCase()]||[]);var u="start"===r?0:1,h="horizontal"===e?0:1;a="start"===r?-a:a;for(var c="center"===s,d=0;dd.getHeight()&&(i.textPosition="top",a=!0);var r=a?-5-n.height:p+8;o+n.width/2>d.getWidth()?(i.textPosition=["100%",r],i.textAlign="right"):o-n.width/2<0&&(i.textPosition=[0,r],i.textAlign="left")}})}function t(t,e){var i,n=m[t],o=m[e],a=u[n],r=new Il(a,h,h.ecModel);if(l&&null!=l.newTitle&&(a.title=l.newTitle),n&&!o){if(function(t){return 0===t.indexOf("my")}(n))i={model:r,onclick:r.option.onclick,featureName:n};else{var s=ZT(n);if(!s)return;i=new s(r,c,d)}g[n]=i}else{if(!(i=g[o]))return;i.model=r,i.ecModel=c,i.api=d}n||!o?r.get("show")&&!i.unusable?(function(o,a,t){var r=o.getModel("iconStyle"),s=o.getModel("emphasis.iconStyle"),e=a.getIcons?a.getIcons():o.get("icon"),l=o.get("title")||{};if("string"==typeof e){var i=e,n=l;l={},(e={})[t]=i,l[t]=n}var u=o.iconPaths={};E(e,function(t,e){var i=pl(t,{},{x:-p/2,y:-p/2,width:p,height:p});i.setStyle(r.getItemStyle()),i.hoverStyle=s.getItemStyle(),i.setStyle({text:l[e],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var n=h.getModel("tooltip");n&&n.get("show")&&i.attr("tooltip",L({content:l[e],formatter:n.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:n.get("position",!0)||"bottom"},n.option)),Ys(i),h.get("showTitle")&&(i.__title=l[e],i.on("mouseover",function(){var t=s.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";i.setStyle({textFill:s.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||e})}).on("mouseout",function(){i.setStyle({textFill:null,textBackgroundColor:null})})),i.trigger(o.get("iconStatus."+e)||"normal"),f.add(i),i.on("click",A(a.onclick,a,c,d,e)),u[e]=i})}(r,i,n),r.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},i.render&&i.render(r,c,d,l)):i.remove&&i.remove(c,d):i.dispose&&i.dispose(c,d)}},updateView:function(t,e,i,n){E(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(e,i){E(this._features,function(t){t.remove&&t.remove(e,i)}),this.group.removeAll()},dispose:function(e,i){E(this._features,function(t){t.dispose&&t.dispose(e,i)})}});var YT=Cc.toolbox.saveAsImage;function jT(t){this.model=t}jT.defaultOption={show:!0,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",title:YT.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:YT.lang.slice()},jT.prototype.unusable=!v.canvasSupported,jT.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=i.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(a.split(",")[1]),s=r.length,l=new Uint8Array(s);s--;)l[s]=r.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+o)}else{var h=i.get("lang"),c='';window.open().document.write(c)}else{var d=document.createElement("a");d.download=n+"."+o,d.target="_blank",d.href=a;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},HT("saveAsImage",jT);var qT=Cc.toolbox.magicType,KT="__ec_magicType_stack__";function $T(t){this.model=t}$T.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",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"},title:D(qT.title),option:{},seriesIndex:{}};var JT=$T.prototype;JT.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return E(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var QT={line:function(t,e,i,n){if("bar"===t)return m({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return m({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){var o=i.get("stack")===KT;if("line"===t||"bar"===t)return n.setIconStatus("stack",o?"normal":"emphasis"),m({id:e,stack:o?"":KT},n.get("option.stack")||{},!0)}},tA=[["line","bar"],["stack"]];JT.onclick=function(u,t,h){var c=this.model,e=c.get("seriesIndex."+h);if(QT[h]){var i,d={series:[]};if(E(tA,function(t){0<=_(t,h)&&E(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,i=t.id,n=QT[h](e,i,t,c);n&&(C(n,t.option),d.series.push(n));var o=t.coordinateSystem;if(o&&"cartesian2d"===o.type&&("line"===h||"bar"===h)){var a=o.getAxesByScale("ordinal")[0];if(a){var r=a.dim+"Axis",s=u.queryComponents({mainType:r,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;d[r]=d[r]||[];for(var l=0;l<=s;l++)d[r][s]=d[r][s]||{};d[r][s].boundaryGap="bar"===h}}}),"stack"===h)i=d.series&&d.series[0]&&d.series[0].stack===KT?m({stack:qT.title.tiled},qT.title):D(qT.title);t.dispatchAction({type:"changeMagicType",currentType:h,newOption:d,newTitle:i})}},gf({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),HT("magicType",$T);var eA=Cc.toolbox.dataView,iA=new Array(60).join("-"),nA="\t";function oA(t){var e=function(t){var o={},a=[],r=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)a.push(t);else{var i=e.getBaseAxis();if("category"===i.type){var n=i.dim+"_"+i.index;o[n]||(o[n]={categoryAxis:i,valueAxis:e.getOtherAxis(i),series:[]},r.push({axisDim:i.dim,axisIndex:i.index})),o[n].series.push(t)}else a.push(t)}}),{seriesGroupByCategoryAxis:o,other:a,meta:r}}(t);return{value:M([function(t){var h=[];return E(t,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,o=[" "].concat(N(t.series,function(t){return t.name})),a=[i.model.getCategories()];E(t.series,function(t){a.push(t.getRawData().mapArray(n,function(t){return t}))});for(var r=[o.join(nA)],s=0;st[1]&&t.reverse(),t}function vA(t,e){return Xo(t,e,{includeMainTypes:fA})}gA.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=wA[t.brushType](0,i,e);t.__rangeOffset={offset:SA[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},gA.matchOutputRanges=function(t,n,o){uA(t,function(i){var t=this.findTargetInfo(i,n);t&&!0!==t&&E(t.coordSyses,function(t){var e=wA[i.brushType](1,t,i.range);o(i,e.values,t,n)})},this)},gA.setInputRanges=function(t,o){uA(t,function(t){var e=this.findTargetInfo(t,o);if(t.range=t.range||[],e&&!0!==e){t.panelId=e.panelId;var i=wA[t.brushType](0,e.coordSys,t.coordRange),n=t.__rangeOffset;t.range=n?SA[t.brushType](i.values,n.offset,function(t,e){var i=IA(t),n=IA(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}(i.xyMinMax,n.xyMinMax)):i.values}},this)},gA.makePanelOpts=function(i,n){return N(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:n&&n(t),clipPath:Ub(e),isTargetByCursor:Yb(e,i,t.coordSysModel),getLinearBrushOtherExtent:Xb(e)}})},gA.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&0<=hA(n.coordSyses,e.coordinateSystem)},gA.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=vA(e,t),o=0;on[1]&&(n[1]=e[1])})}),n[1]c[1];if(r&&!s&&!l)return!0;r&&(n=!0),s&&(e=!0),l&&(i=!0)}return n&&e&&i}):RA(h,function(t){if("empty"===o)i.setData(u=u.map(t,function(t){return function(t){return t>=c[0]&&t<=c[1]}(t)?t:NaN}));else{var e={};e[t]=c,u.selectRange(e)}}),RA(h,function(t){u.setApproximateExtent(c,t)}))})}}};var GA=E,FA=OA,WA=wf({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=HA(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=HA(t);m(this.option,t,!0),m(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var i=this.option;v.canvasSupported||(i.realtime=!1),this._setDefaultThrottle(t),ZA(this,t);var n=this.settledOption;GA([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(i[t[0]]=n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,i,n){var o=this.dependentModels[t.axis][e],a=o.__dzAxisProxy||(o.__dzAxisProxy=new zA(t.name,e,this,n));r[t.name+"_"+e]=a},this)},_resetTarget:function(){var i=this.option,t=this._judgeAutoMode();FA(function(t){var e=t.axisIndex;i[e]=Eo(i[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,i=!1;FA(function(t){null!=e[t.axisIndex]&&(i=!0)},this);var t=e.orient;return null==t&&i?"orient":i?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var a=!0,e=this.get("orient",!0),r=this.option,t=this.dependentModels;if(a){var i="vertical"===e?"y":"x";t[i+"Axis"].length?(r[i+"AxisIndex"]=[0],a=!1):GA(t.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})}a&&FA(function(t){if(a){var e=[],i=this.dependentModels[t.axis];if(i.length&&!e.length)for(var n=0,o=i.length;ne[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&CD(e)}};function CD(t){return new Mi(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var LD=["#ddd"];wf({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;e||vD(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:LD},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=N(t,function(t){return kD(this.option,t)},this))},setBrushOption:function(t){this.brushOption=kD(this.option,t),this.brushType=this.brushOption.brushType}});function kD(t,e){return m({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Il(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function PD(t,e,i,n){n&&n.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}bf({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new gb(e.getZr())).on("brush",A(this._onBrush,this)).mount()},render:function(t){return this.model=t,PD.apply(this,arguments)},updateTransform:PD,updateView:PD,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:i,areas:D(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:D(t),$from:i})}}),gf({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),gf({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),gf({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var ND=Cc.toolbox.brush;function OD(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}OD.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{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",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",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",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",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",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"},title:D(ND.title)};var ED=OD.prototype;ED.render=ED.updateView=function(e,t,i){var n,o,a;t.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,E(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===n)?"emphasis":"normal")})},ED.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return E(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},ED.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},HT("brush",OD),ff(function(t,e){var i=t&&t.brush;if(k(i)||(i=i?[i]:[]),i.length){var n=[];E(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;k(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),function(i){var e={};E(i,function(t){e[t]=1}),i.length=0,E(e,function(t,e){i.push(e)})}(s),e&&!s.length&&s.push.apply(s,fD)}}),wf({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),bf({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,o=t.getModel("textStyle"),a=t.getModel("subtextStyle"),r=t.get("textAlign"),s=H(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Fr({style:Qs({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Fr({style:Qs({},a,{text:h,textFill:a.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=vu(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new is({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(w)}}});function zD(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),a={normal:1,emphasis:1};E(n,function(t,e){a[e]||RD(o,e)||(o[e]=t)}),i.label&&!RD(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function RD(t,e){return t.hasOwnProperty(e)}Tu.registerSubTypeDefaulter("timeline",function(){return"slider"}),gf({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),C({currentIndex:i.option.currentIndex},t)}),gf({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var BD=Tu.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){BD.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,o=this._names=[];if("category"===i){var a=[];E(e,function(t,e){var i,n=Bo(t);R(t)?(i=D(t)).value=e:i=e,a.push(i),z(n)||null!=n&&!isNaN(n)||(n=""),o.push(n+"")}),e=a}var n={category:"ordinal",time:"time"}[i]||"number";(this._data=new Wf([{name:"value",type:n}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});b(BD.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Fh);function VD(t,e,i,n){Eg.call(this,t,e,i),this.type=n||"value",this.model=null}var GD=hc.extend({type:"timeline"});VD.prototype={constructor:VD,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},w(VD,Eg);var FD=A,WD=E,HD=Math.PI;function ZD(t,e,i,n,o,a){var r=e.get("color");o?(o.setColor(r),i.add(o),a&&a.onUpdate(o)):((o=mg(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),i.add(o),a&&a.onCreate(o));var s=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(s),n=m({rectHover:!0,z2:100},n,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,n.scale=l;var u=t.get("symbolOffset");if(u){var h=n.position=n.position||[0,0];h[0]+=Pl(u[0],l[0]),h[1]+=Pl(u[1],l[1])}var c=t.get("symbolRotate");return n.rotation=(c||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function UD(t,e,i,n,o){if(!t.dragging){var a=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}GD.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,i,n){if(this.model=e,this.api=i,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var o=this._layout(e,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,e);e.formatTooltip=function(t){return eu(s.scale.getLabel(t))},WD(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](o,a,s,e)},this),this._renderAxisLabel(o,r,s,e),this._position(o,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=function(t,e){return vu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2n[1]&&(i=n[1]),i"),o&&(a+=YD(o),null!=i&&(a+=" : ")),null!=i&&(a+=YD(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});b(qD,Fh),qD.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var KD=_;function $D(t,e,i,n,o,a){var r=[],s=lp(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=oC(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(i,u),r[a]=e.get(n,u);var h=El(e.get(n,u));return 0<=(h=Math.min(h,20))&&(r[a]=+r[a].toFixed(h)),r}var JD=T,QD={min:JD($D,"min"),max:JD($D,"max"),average:JD($D,"average")};function tC(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!k(e.coord)&&n){var o=n.dimensions,a=eC(e,i,n,t);if((e=D(e)).type&&QD[e.type]&&a.baseAxis&&a.valueAxis){var r=KD(o,a.baseAxis.dim),s=KD(o,a.valueAxis.dim);e.coord=QD[e.type](i,a.baseDataDim,a.valueDataDim,r,s),e.value=e.coord[s]}else{for(var l=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],u=0;u<2;u++)QD[l[u]]&&(l[u]=oC(i,i.mapDimension(o[u]),l[u]));e.coord=l}}return e}function eC(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var o=0;oi[o],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=H(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[n]+=i[o]-c[o]:p[n]+=c[o]+m);g[1-n]+=h[a]/2-c[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[o]=d?i[o]:h[o],v[a]=Math.max(h[a],c[a]),v[r]=Math.min(0,c[r]+g[1-n]),l.__rectSize=i[o],d){var y={x:0,y:0};y[o]=Math.max(i[o]-c[o]-m,0),y[a]=v[a],l.setClipPath(new is({shape:y})),l.__rectSize=y[o]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&sl(s,{position:x.contentPosition},d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(n,o){var a=this._controllerGroup;E(["pagePrev","pageNext"],function(t){var e=null!=o[t+"DataIndex"],i=a.childOfName(t);i&&(i.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),i.cursor=e?"pointer":"default")});var t=a.childOfName("pageText"),e=n.get("pageFormatter"),i=o.pageIndex,r=null!=i?i+1:0,s=o.pageCount;t&&e&&t.setStyle("text",z(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,a=NC[o],r=OC[o],s=this._findTargetItemIndex(e),l=i.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[o]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=h;++p)(!(v=y(l[p]))&&m.e>g.s+n||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;-1<=p;--p)(v=y(l[p]))&&x(m,v.s)||!(g.i=e&&t.s<=e+n}},_findTargetItemIndex:function(n){var o,a,t=this.getContentGroup();return this._showController&&t.eachChild(function(t,e){var i=t.__legendDataIndex;null==a&&null!=i&&(a=e),i===n&&(o=e)}),null!=o?o:a}});gf("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})});WA.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var zC=is,RC=kl,BC=Ol,VC=A,GC=E,FC="horizontal",WC="vertical",HC=["line","bar","candlestick","scatter"],ZC=UA.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){ZC.superApply(this,"render",arguments),Tc(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){ZC.superApply(this,"remove",arguments),Ac(this,"_dispatchZoomAction")},dispose:function(){ZC.superApply(this,"dispose",arguments),Ac(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Ii;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===FC?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=_u(t.option);E(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=vu(a,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===WC&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),a=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==FC||o?i===FC&&o?{scale:r?[-1,1]:[-1,-1]}:i!==WC||o?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new zC({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new zC({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:A(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=n.getDataExtent(o),r=.3*(a[1]-a[0]);a=[a[0]-r,a[1]+r];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],d=u[1]/(n.count()-1),f=0,p=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(0e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var i;if(GC(this.getTargetCoordInfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinateSystem;i=e.getRect&&e.getRect()}}),!i){var t=this.api.getWidth(),e=this.api.getHeight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function UC(t){return"vertical"===t?"ns-resize":"ew-resize"}WA.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var XC="\0_ec_dataZoom_roams";function YC(t,n){var e=qC(t),o=n.dataZoomId,a=n.coordId;E(e,function(t,e){var i=t.dataZoomInfos;i[o]&&_(n.allCoordIds,a)<0&&(delete i[o],t.count--)}),KC(e);var i=e[a];i||((i=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(t,r){var e=new Ly(t.getZr());return E(["pan","zoom","scrollMove"],function(a){e.on(a,function(n){var o=[];E(r.dataZoomInfos,function(t){if(n.isAvailableBehavior(t.dataZoomModel.option)){var e=(t.getRange||{})[a],i=e&&e(r.controller,n);!t.dataZoomModel.get("disabled",!0)&&i&&o.push({dataZoomId:t.dataZoomId,start:i[0],end:i[1]})}}),o.length&&r.dispatchAction(o)})}),e}(t,i),i.dispatchAction=T($C,t)),i.dataZoomInfos[o]||i.count++,i.dataZoomInfos[o]=n;var r=function(t){var n,o={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return E(t,function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");o["type_"+n]"],k(t)&&(t=t.slice(),n=!0),o=e?t:n?[u(t[0]),u(t[1])]:u(t),z(l)?l.replace("{value}",n?o[0]:o).replace("{value2}",n?o[1]:o):O(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+o[1]:t[1]===s[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=pL([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;0<=o;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),o=e.controller||(e.controller={});m(n,i),m(o,i);var u=this.isCategory();function a(n){dL(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")},fL(this.stateList,function(t){var e=n[t];if(z(e)){var i=lL(e,"active",u);i?(n[t]={},n[t][e]=i):delete n[t]}},this)}a.call(this,n),a.call(this,o),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},fL(n,function(t,e){if(a_.isValidType(e)){var i=lL(e,"inactive",u);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,n,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");fL(this.stateList,function(t){var e=this.itemSize,i=a[t];null==(i=i||(a[t]={color:u?l:[l]})).symbol&&(i.symbol=r&&D(r)||(u?"roundRect":["roundRect"])),null==i.symbolSize&&(i.symbolSize=s&&D(s)||(u?e[0]:[e[0],e[0]])),i.symbol=hL(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var n=i.symbolSize;if(null!=n){var o=-1/0;cL(n,function(t){oe[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){mL.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Ol((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(n){var o=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){n[0]<=t&&t<=n[1]&&i.push(e)},this),o.push({seriesId:t.id,dataIndex:i})},this),o},getVisualMeta:function(i){var t=xL(this,"outOfRange",this.getExtent()),e=xL(this,"inRange",this.option.range.slice()),n=[];function o(t,e){n.push({value:t,color:i(t,e)})}for(var a=0,r=0,s=e.length,l=t.length;rt[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new Ii("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(n,o){if(this._useHandle){var a=this._shapes,r=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels;ML([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=n[t];var i=hl(a.handleLabelPoints[t],ul(e,this.group));l[t].setStyle({x:i[0],y:i[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",a.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=SL(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",function(t,e,i,n){return t?[[0,-IL(e,TL(i,0))],[6,0],[0,IL(e,TL(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});h.setStyle("fill",c);var d=hl(u.indicatorLabelPoint,ul(h,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var n=this;this._shapes.barGroup.on("mousemove",function(t){if(n._hovering=!0,!n._dragging){var e=n.visualMapModel.itemSize,i=n._applyTransform([t.offsetX,t.offsetY],n._shapes.barGroup,!0,!0);i[1]=IL(TL(0,i[1]),e[1]),n._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=e[0])}}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=IL(TL(o[0],t),o[1]);var r=function(t,e,i){var n=6,o=t.get("hoverLinkDataSize");o&&(n=SL(o,e,i,!0)/2);return n}(i,a,o),s=[t-r,t+r],l=SL(t,o,a,!0),u=[SL(s[0],o,a,!0),SL(s[1],o,a,!0)];s[0] ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||CL(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=function(t,e){var i={},n={};return o(t||[],i),o(e||[],n,i),[a(i),a(n)];function o(t,e,i){for(var n=0,o=t.length;ni&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:a,outerColors:r}}function n(t,e){var i=s.getRepresentValue({interval:t});e=e||s.getValueState(i);var n=o(i,e);t[0]===-1/0?r[0]=n:t[1]===1/0?r[1]=n:a.push({value:t[0],color:n},{value:t[1],color:n})}}}),PL={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};function NL(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}_L.extend({type:"visualMap.piecewise",doRender:function(){var a=this.group;a.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),i=e.endsText,d=W(r.get("showLabel",!0),!i);i&&this._renderEndsText(a,i[0],c,d,h),E(e.viewPieceList,function(t){var e=t.piece,i=new Ii;i.onclick=A(this._onItemClick,this,e),this._enableHoverLink(i,t.indexInModelPieceList);var n=r.getRepresentValue(e);if(this._createItemSymbol(i,n,[0,0,c[0],c[1]]),d){var o=this.visualMapModel.getValueState(n);i.add(new Fr({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===o?.5:1}}))}a.add(i)},this),i&&this._renderEndsText(a,i[1],c,d,h),mu(r.get("orient"),a,r.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},_enableHoverLink:function(t,i){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:bL(e.findTargetDataIndices(i),e)})}t.on("mouseover",A(e,this,"highlight")).on("mouseout",A(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return wL(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new Ii,r=this.visualMapModel.textStyleModel;a.add(new Fr({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=N(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i=i&&i.slice().reverse(),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(mg(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=D(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[o]=!0,E(n,function(t,e){n[e]=e===o})):n[o]=!n[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});ff(iL);var OL,EL="urn:schemas-microsoft-com:vml",zL="undefined"==typeof window?null:window,RL=!1,BL=zL&&zL.document;function VL(t){return OL(t)}if(BL&&!v.canvasSupported)try{BL.namespaces.zrvml||BL.namespaces.add("zrvml",EL),OL=function(t){return BL.createElement("')}}catch(t){OL=function(t){return BL.createElement("<"+t+' xmlns="'+EL+'" class="zrvml">')}}var GL,FL=ir.CMD,WL=Math.round,HL=Math.sqrt,ZL=Math.abs,UL=Math.cos,XL=Math.sin,YL=Math.max;if(!v.canvasSupported){var jL=",",qL="progid:DXImageTransform.Microsoft",KL=21600,$L=KL/2,JL=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=KL+","+KL,t.coordorigin="0,0"},QL=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},tk=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},ek=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},ik=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},nk=Hn,ok=function(t,e,i){var n=Re(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=QL(n[0],n[1],n[2]),t.opacity=i*n[3])},ak=function(t,e,i,n){var o="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof ss&&ek(t,a),a=a||VL(e),o?function(t,e,i){var n,o,a=e.fill;if(null!=a)if(a instanceof ss){var r,s=0,l=[0,0],u=0,h=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===a.type){r="gradient";var p=i.transform,g=[a.x*d,a.y*f],m=[a.x2*d,a.y2*f];p&&(bt(g,g,p),bt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{r="gradientradial";g=[a.x*d,a.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&bt(g,g,p),_/=x[0]*KL,w/=x[1]*KL;var b=YL(_,w);u=0/b,h=2*a.r/b-u}var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],T=[],A=0;A=c&&d<=i+1){for(var n=[],o=0;o=c&&d<=o+1)return jk(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var r=a();if(r)return r}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",o[u]+":0",n[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(r),i.push(r)}return i}(e,a),a,o);if(r)return r(t,i,n),!0}return!1}function zt(t){return"CANVAS"===t.nodeName.toUpperCase()}var Bt="undefined"!=typeof window&&!!window.addEventListener,Vt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gt=[];function Ft(t,e,i,n){return i=i||{},n||!v.canvasSupported?Wt(t,e,i):v.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):Wt(t,e,i),i}function Wt(t,e,i){if(v.domSupported&&t.getBoundingClientRect){var n=e.clientX,o=e.clientY;if(zt(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=o-a.top)}if(Rt(Gt,t,n,o))return i.zrX=Gt[0],void(i.zrY=Gt[1])}i.zrX=i.zrY=0}function Ht(t){return t||window.event}function Zt(t,e,i){if(null!=(e=Ht(e)).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&Ft(t,o,e,i)}else Ft(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&Vt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Ut(t,e,i,n){Bt?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}var Xt=Bt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Yt(t){return 2===t.which||3===t.which}function jt(){this._track=[]}function qt(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}jt.prototype={constructor:jt,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var o={points:[],touches:[],target:e,event:t},a=0,r=n.length;an.getWidth()||i<0||i>n.getHeight()}te.prototype={constructor:te,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(E(ee,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,i=t.zrY,n=ne(this,e,i),o=this._hovered,a=o.target;a&&!a.__zr&&(a=(o=this.findHover(o.x,o.y)).target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==a&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(i||this.trigger("globalout",{type:"globalout",event:t}))},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var o="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Jt}}(e,t,i);n&&(n[o]&&(a.cancelBubble=n[o].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},a=n.length-1;0<=a;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=ie(n[a],t,e))&&(o.topTarget||(o.topTarget=n[a]),r!==$t)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new jt);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){te.prototype[r]=function(t){var e,i,n=t.zrX,o=t.zrY,a=ne(this,n,o);if("mouseup"===r&&a||(i=(e=this.findHover(n,o)).target),"mousedown"===r)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===r)this._upEl=i;else if("click"===r){if(this._downEl!==this._upEl||!this._downPoint||4=this._maxSize&&0>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Ge(t,e),e):void Re(e,0,0,0,1):7===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=16777215?(Re(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Ge(t,e),e):void Re(e,0,0,0,1):void 0;var a=o.indexOf("("),r=o.indexOf(")");if(-1!==a&&r+1===o.length){var s=o.substr(0,a),l=o.substr(a+1,r-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Re(e,0,0,0,1);u=Ne(l.pop());case"rgb":return 3!==l.length?void Re(e,0,0,0,1):(Re(e,Pe(l[0]),Pe(l[1]),Pe(l[2]),u),Ge(t,e),e);case"hsla":return 4!==l.length?void Re(e,0,0,0,1):(l[3]=Ne(l[3]),We(l,e),Ge(t,e),e);case"hsl":return 3!==l.length?void Re(e,0,0,0,1):(We(l,e),Ge(t,e),e);default:return}}Re(e,0,0,0,1)}}function We(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ne(t[1]),o=Ne(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return Re(e=e||[],Le(255*Oe(r,a,i+1/3)),Le(255*Oe(r,a,i)),Le(255*Oe(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function He(t,e){var i=Fe(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,255e);i++);i=Math.min(i-1,u-2)}C=e;var n=g[(D=i)+1]-g[i];if(0!=n)if(S=(e-g[i])/n,l)if(I=m[i],M=m[0===i?i:i-1],T=m[u-2=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Di(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Di.create=function(t){return new Di(t.x,t.y,t.width,t.height)};var Ci=function(t){for(var e in t=t||{},_i.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Ci.prototype={constructor:Ci,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i>>1])<0?l=a:s=1+a;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function Ri(p,g){var r,s,m=ki,l=0,v=[];function e(t){var e=r[t],i=s[t],n=r[t+1],o=s[t+1];s[t]=i+o,t===l-3&&(r[t+1]=r[t+2],s[t+1]=s[t+2]),l--;var a=Ei(p[n],p,e,i,0,g);e+=a,0!==(i-=a)&&0!==(o=Oi(p[e+i-1],p,n,o,o-1,g))&&(i<=o?function(t,e,i,n){var o=0;for(o=0;os[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1>=1;return t+e}(o);do{if((a=Pi(t,i,n,e))=e.maxIterations){t+=e.ellipsis;break}var s=0===r?bn(t,o,e.ascCharWidth,e.cnCharWidth):0f)return{lines:[],width:0,height:0};C.textWidth=pn(C.text,w);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))C.percentWidth=S,u.push(C),S=0;else{if(M){S=C.textWidth;var I=x.textBackgroundColor,T=I&&I.image;T&&sn(T=on(T))&&(S=Math.max(S,T.width*b/T.height))}var A=_?_[1]+_[3]:0;S+=A;var D=null!=d?d-v:null;null!=D&&Dn[0]){for(r=0;rt);r++);a=i[n[r]]}if(n.splice(r+1,0,t),!(i[t]=e).virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else vi("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n=a.length&&a.push({option:t})}}),a}function Zo(t){var r=Q();Eo(t,function(t,e){var i=t.exist;i&&r.set(i.id,t)}),Eo(t,function(t,e){var i=t.option;Y(!i||null==i.id||!r.get(i.id)||r.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&r.set(i.id,t),t.keyInfo||(t.keyInfo={})}),Eo(t,function(t,e){var i=t.exist,n=t.option,o=t.keyInfo;if(Ro(n)){if(o.name=null!=n.name?n.name+"":i?i.name:Bo+e,i)o.id=i.id;else if(null!=n.id)o.id=n.id+"";else for(var a=0;o.id="\0"+o.name+"\0"+a++,r.get(o.id););r.set(o.id,t)}})}function Uo(t){var e=t.name;return!(!e||!e.indexOf(Bo))}function Xo(t){return Ro(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Yo(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?O(t.dataIndex)?N(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?O(t.name)?N(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function jo(){var e="__\0ec_inner_"+qo+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var qo=0;function Ko(s,l,u){if(R(l)){var t={};t[l+"Index"]=0,l=t}var e=u&&u.defaultMainType;!e||$o(l,e+"Index")||$o(l,e+"Id")||$o(l,e+"Name")||(l[e+"Index"]=0);var h={};return Eo(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var i=e.match(/^(\w+)(Index|Id|Name)$/)||[],n=i[1],o=(i[2]||"").toLowerCase();if(!(!n||!o||null==t||"index"===o&&"none"===t||u&&u.includeMainTypes&&_(u.includeMainTypes,n)<0)){var a={mainType:n};"index"===o&&"all"===t||(a[o]=t);var r=s.queryComponents(a);h[n+"Models"]=r,h[n+"Model"]=r[0]}}else h[e]=t}),h}function $o(t,e){return t&&t.hasOwnProperty(e)}function Jo(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function Qo(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}function ta(t,i){var n=Q(),o=[];return E(t,function(t){var e=i(t);(n.get(e)||(o.push(e),n.set(e,[]))).push(t)}),{keys:o,buckets:n}}var ea=".",ia="___EC__COMPONENT__CONTAINER___";function na(t){var e={main:"",sub:""};return t&&(t=t.split(ea),e.main=t[0]||"",e.sub=t[1]||""),e}function oa(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)}var i=this;return k(e.prototype,t),e.extend=this.extend,e.superCall=sa,e.superApply=la,w(e,this),e.superClass=i,e}}var aa=0;function ra(t){var e=["__\0is_clz",aa++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function sa(t,e){var i=U(arguments,2);return this.superClass.prototype[e].apply(t,i)}function la(t,e,i){return this.superClass.prototype[e].apply(t,i)}function ua(i,t){t=t||{};var o={};if(i.registerClass=function(t,e){if(e)if(function(t){Y(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=na(e)).sub){if(e.sub!==ia){(function(t){var e=o[t.main];e&&e[ia]||((e=o[t.main]={})[ia]=!0);return e})(e)[e.sub]=t}}else o[e.main]=t;return t},i.getClass=function(t,e,i){var n=o[t];if(n&&n[ia]&&(n=e?n[e]:null),i&&!n)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return n},i.getClassesByMainType=function(t){t=na(t);var i=[],e=o[t.main];return e&&e[ia]?E(e,function(t,e){e!==ia&&i.push(t)}):i.push(e),i},i.hasClass=function(t){return t=na(t),!!o[t.main]},i.getAllClassMainTypes=function(){var i=[];return E(o,function(t,e){i.push(e)}),i},i.hasSubTypes=function(t){t=na(t);var e=o[t.main];return e&&e[ia]},i.parseClassType=na,t.registerWhenExtend){var n=i.extend;n&&(i.extend=function(t){var e=n.call(this,t);return i.registerClass(e,t.type)})}return i}function ha(s){for(var t=0;tthis._ux||or(e-this._yi)>this._uy||this._len<5;return this.addData(ja.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,o,a){return this.addData(ja.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(ja.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.addData(ja.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=er(o)*i+t,this._yi=ir(o)*i+e,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(ja.R,t,e,i,n),this},closePath:function(){this.addData(ja.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;il||or(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case ja.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case ja.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case ja.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m=yr[n=0]+t&&r<=yr[1]+t?h:0}if(a){l=n;n=cr(o),o=cr(l)}else n=cr(n),o=cr(o);oMath.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Sr(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,u=0,h=0;hMath.abs(a[1])?0=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function Rl(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?function(t){return t.replace(/^\s+|\s+$/g,"")}(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function zl(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Bl(t){return t.sort(function(t,e){return t-e}),t}function Vl(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Gl(t){var e=t.toString(),i=e.indexOf("e");if(0h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}var Hl=9007199254740991;function Zl(t){var e=2*Math.PI;return(t%e+e)%e}function Ul(t){return-Ol"'])/g,ou={"&":"&","<":"<",">":">",'"':""","'":"'"};function au(t){return null==t?"":(t+"").replace(nu,function(t,e){return ou[e]})}function ru(t,e){return"{"+t+(null==e?"":e)+"}"}var su=["a","b","c","d","e","f","g"];function lu(t,e,i){O(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a':'':{renderMode:o,content:"{marker"+a+"|} ",style:{color:i}}:""}function cu(t,e){return"0000".substr(0,e-(t+="").length)+t}function du(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Yl(e),o=i?"UTC":"",a=n["get"+o+"FullYear"](),r=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),u=n["get"+o+"Minutes"](),h=n["get"+o+"Seconds"](),c=n["get"+o+"Milliseconds"]();return t=t.replace("MM",cu(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",cu(s,2)).replace("d",s).replace("hh",cu(l,2)).replace("h",l).replace("mm",cu(u,2)).replace("m",u).replace("ss",cu(h,2)).replace("s",h).replace("SSS",cu(c,3))}function fu(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var pu=xn;var gu=(Object.freeze||Object)({addCommas:tu,toCamelCase:eu,normalizeCssArray:iu,encodeHTML:au,formatTpl:lu,formatTplSimple:uu,getTooltipMarker:hu,formatTime:du,capitalFirst:fu,truncateText:pu,getTextBoundingRect:function(t){return gn(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,o,a,r,s){return gn(t,e,i,n,o,s,a,r)}}),mu=E,vu=["left","right","top","bottom","width","height"],yu=[["width","left","right"],["height","top","bottom"]];function xu(h,c,d,f,p){var g=0,m=0;null==f&&(f=1/0),null==p&&(p=1/0);var v=0;c.eachChild(function(t,e){var i,n,o=t.position,a=t.getBoundingRect(),r=c.childAt(e+1),s=r&&r.getBoundingRect();if("horizontal"===h){var l=a.width+(s?-s.x+a.x:0);v=f<(i=g+l)||t.newline?(g=0,i=l,m+=v+d,a.height):Math.max(v,a.height)}else{var u=a.height+(s?-s.y+a.y:0);v=p<(n=m+u)||t.newline?(g+=v+d,m=0,n=u,a.width):Math.max(v,a.width)}t.newline||(o[0]=g,o[1]=m,"horizontal"===h?g=i+d:m=n+d)})}var _u=xu;T(xu,"vertical"),T(xu,"horizontal");function wu(t,e,i){i=iu(i||0);var n=e.width,o=e.height,a=Rl(t.left,n),r=Rl(t.top,o),s=Rl(t.right,n),l=Rl(t.bottom,o),u=Rl(t.width,n),h=Rl(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(n/oe)return t[n];return t[i-1]}(s,i):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),n.colorIdx=(o+1)%l.length,u}}},Ru="original",zu="arrayRows",Bu="objectRows",Vu="keyedColumns",Gu="unknown",Fu="typedArray",Wu="column",Hu="row";function Zu(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Vu?{}:[]),this.sourceFormat=t.sourceFormat||Gu,this.seriesLayoutBy=t.seriesLayoutBy||Wu,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Zu.seriesDataToSource=function(t){return new Zu({data:t,sourceFormat:V(t)?Fu:Ru,fromDataset:!1})},ra(Zu);var Uu={Must:1,Might:2,Not:3},Xu=jo();function Yu(t){var e=t.option,i=e.data,n=V(i)?Fu:Ru,o=!1,a=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=Ju(t);if(l){var u=l.option;i=u.source,n=Xu(l).sourceFormat,o=!0,a=a||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,i,n,o){if(!t)return{dimensionsDefine:ju(o)};var a,r;if(e===zu)"auto"===n||null==n?qu(function(t){null!=t&&"-"!==t&&(R(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,o||1!==r||(o=[],qu(function(t,e){o[e]=null!=t?t:""},i,t)),a=o?o.length:i===Hu?t.length:t[0]?t[0].length:null;else if(e===Bu)o=o||function(t){var e,i=0;for(;i":"\n",f="richText"===c,p={},g=0;function i(t){return{renderMode:c,content:au(tu(t)),style:p}}var m=this.getData(),a=m.mapDimension("defaultedTooltip",!0),n=a.length,r=this.getRawValue(o),s=O(r),v=m.getItemVisual(o,"color");z(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var l=(1":"",n=i+u.join(i||", ");return{renderMode:c,content:n,style:p}}(r):i(n?Wh(m,o,a[0]):s?r[0]:r)).content,u=d.seriesIndex+"at"+g,y=hu({color:v,type:"item",renderMode:c,markerId:u});p[u]=v,++g;var x=m.getName(o),_=this.name;Uo(this)||(_=""),_=_?au(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?au(x)+": "+l:l),markers:p}},isAnimationEnabled:function(){if(v.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,o=Eu.getColorFromPalette.call(this,t,e,i);return o=o||n.getColorFromPalette(t,e,i)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function sc(t){var e=t.name;Uo(t)||(t.name=function(t){var i=t.getRawData(),e=i.mapDimension("seriesName",!0),n=[];return E(e,function(t){var e=i.getDimensionInfo(t);e.displayName&&n.push(e.displayName)}),n.join(" ")}(t)||e)}function lc(t){return t.model.getRawData().count()}function uc(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),hc}function hc(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function cc(e,i){E(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,T(dc,i))})}function dc(t){var e=fc(t);e&&e.setOutputEnd(this.count())}function fc(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var o=n.agentStubMap;o&&(n=o.get(t.uid))}return n}}b(rc,Uh),b(rc,Eu);var pc=function(){this.group=new Ci,this.uid=Nl("viewComponent")};pc.prototype={constructor:pc,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var gc=pc.prototype;gc.updateView=gc.updateLayout=gc.updateVisual=function(t,e,i,n){},oa(pc),ua(pc,{registerWhenExtend:!0});function mc(){var s=jo();return function(t){var e=s(t),i=t.pipelineContext,n=e.large,o=e.progressiveRender,a=e.large=i&&i.large,r=e.progressiveRender=i&&i.progressiveRender;return!!(n^a||o^r)&&"reset"}}var vc=jo(),yc=mc();function xc(){this.group=new Ci,this.uid=Nl("viewChart"),this.renderTask=Xh({plan:Sc,reset:Mc}),this.renderTask.context={view:this}}var _c=xc.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){bc(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){bc(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function wc(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Qs(t)))for(var n=0,o=t.childCount();nc?i+=p(g("data.partialData"),{displayCnt:c}):i+=g("data.allData");for(var r=[],s=0;si.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},zc.getPipeline=function(t){return this._pipelineMap.get(t)},zc.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:r,large:a}},zc.restorePipelines=function(t){var n=this,o=n._pipelineMap=Q();t.eachSeries(function(t){var e=t.getProgressive(),i=t.uid;o.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),qc(n,t,t.dataTask)})},zc.prepareStageTasks=function(){var i=this._stageTaskMap,n=this.ecInstance.getModel(),o=this.api;E(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,[]);t.reset&&function(n,o,t,a,r){var s=t.seriesTaskMap||(t.seriesTaskMap=Q()),e=o.seriesType,i=o.getTargetSeries;o.createOnAllSeries?a.eachRawSeries(l):e?a.eachRawSeriesByType(e,l):i&&i(a,r).each(l);function l(t){var e=t.uid,i=s.get(e)||s.set(e,Xh({plan:Zc,reset:Uc,count:jc}));i.context={model:t,ecModel:a,api:r,useClearVisual:o.isVisual&&!o.isLayout,plan:o.plan,reset:o.reset,scheduler:n},qc(n,t,i)}var u=n._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,n,o),t.overallReset&&function(n,t,e,i,o){var a=e.overallTask=e.overallTask||Xh({reset:Gc});a.context={ecModel:i,api:o,overallReset:t.overallReset,scheduler:n};var r=a.agentStubMap=a.agentStubMap||Q(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,c):l?l(i,o).each(c):(u=!1,E(i.getSeries(),c));function c(t){var e=t.uid,i=r.get(e);i||(i=r.set(e,Xh({reset:Fc,onDirty:Hc})),a.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:h},i.agent=a,i.__block=u,qc(n,t,i)}var d=n._pipelineMap;r.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),r.removeKey(e))})}(this,t,e,n,o)},this)},zc.prepareView=function(t,e,i,n){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=n,o.__block=!t.incrementalPrepareRender,qc(this,e,o)},zc.performDataProcessorTasks=function(t,e){Bc(this,this._dataProcessorHandlers,t,e,{block:!0})},zc.performVisualTasks=function(t,e,i){Bc(this,this._visualHandlers,t,e,i)},zc.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},zc.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Vc=zc.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Gc(t){t.overallReset(t.ecModel,t.api,t.payload)}function Fc(t,e){return t.overallProgress&&Wc}function Wc(){this.agent.dirty(),this.getDownstream().dirty()}function Hc(){this.agent&&this.agent.dirty()}function Zc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Uc(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Vo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1t.get("hoverLayerThreshold")&&!v.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=i._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(n,t),Oc(n._zr.dom,t)}function qd(e,i){Id(of,function(t){t(e,i)})}Rd.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[Ld]=!0,i&&Vd(this),Bd.update.call(this),this[Ld]=!1,Hd.call(this,n),Zd.call(this,n)}}},Rd.showLoading=function(t,e){if(!this._disposed&&(Ad(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),sf[t])){var i=sf[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},Rd.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},Rd.makeActionFromEvent=function(t){var e=k({},t);return e.type=tf[t.type],e},Rd.dispatchAction=function(t,e){this._disposed||(Ad(e)||(e={silent:!!e}),Qd[t.type]&&this._model&&(this[Ld]?this._pendingActions.push(t):(Wd.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),Hd.call(this,e.silent),Zd.call(this,e.silent))))},Rd.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},Rd.on=Nd("on",!1),Rd.off=Nd("off",!1),Rd.one=Nd("one",!1);var Kd=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function $d(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function Jd(){this.eventInfo}Rd._initEvents=function(){Id(Kd,function(u){function t(t){var e,i=this.getModel(),n=t.target;if("globalout"===u)e={};else if(n&&null!=n.dataIndex){var o=n.dataModel||i.getSeriesByIndex(n.seriesIndex);e=o&&o.getDataParams(n.dataIndex,n.dataType,n)||{}}else n&&n.eventData&&(e=k({},n.eventData));if(e){var a=e.componentType,r=e.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",r=e.seriesIndex);var s=a&&null!=r&&i.getComponent(a,r),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=u,this._ecEventProcessor.eventInfo={targetEl:n,packedEvent:e,model:s,view:l},this.trigger(u,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(u,t,this)},this),Id(tf,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},Rd.isDisposed=function(){return this._disposed},Rd.clear=function(){this._disposed||this.setOption({series:[]},!0)},Rd.dispose=function(){if(!this._disposed){this._disposed=!0,Jo(this.getDom(),df,"");var e=this._api,i=this._model;Id(this._componentsViews,function(t){t.dispose(i,e)}),Id(this._chartsViews,function(t){t.dispose(i,e)}),this._zr.dispose(),delete lf[this.id]}},b(Ed,Ct),Jd.prototype={constructor:Jd,normalizeQuery:function(t){var s={},l={},u={};if(R(t)){var e=Dd(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var h=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};E(t,function(t,e){for(var i=!1,n=0;nx[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},qf(this)},Yf._initDataFromProvider=function(t,e){if(!(e<=t)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!o.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=r[i],A=a[T][y];if(A){I=A[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,0=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&it))return a;o=a-1}}return-1},Yf.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=1/0,a=-1,r=0,s=0,l=this.count();st[I][1])&&(M=!1)}M&&(a[r++]=this.getRawIndex(m))}return rw[1]&&(w[1]=_)}}}return o},Yf.downSample=function(t,e,i,n){for(var o=ep(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(Wf(this))(u),f=0,p=0;pc[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getRawIndex=Jf,o},Yf.getItemModel=function(t){var e=this.hostModel;return new Cl(this.getRawDataItem(t),e,e&&e.ecModel)},Yf.diff=function(e){var i=this;return new Lf(e?e.getIndices():[],this.getIndices(),function(t){return Qf(e,t)},function(t){return Qf(i,t)})},Yf.getVisual=function(t){var e=this._visual;return e&&e[t]},Yf.setVisual=function(t,e){if(Rf(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},Yf.setLayout=function(t,e){if(Rf(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},Yf.getLayout=function(t){return this._layout[t]},Yf.getItemLayout=function(t){return this._itemLayouts[t]},Yf.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?k(this._itemLayouts[t]||{},e):e},Yf.clearItemLayouts=function(){this._itemLayouts.length=0},Yf.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},Yf.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,Rf(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},Yf.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function op(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function ap(t,e,i){Zu.isInstance(e)||(e=Zu.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),o=Q(),a=Q(),l=[],r=function(t,e,i,n){var o=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return E(e,function(t){var e=t.dimsDef;e&&(o=Math.max(o,e.length))}),o}(e,t,n,i.dimCount),s=0;s=e[0]&&t<=e[1]},gp.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},gp.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},gp.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},gp.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},gp.prototype.getExtent=function(){return this._extent.slice()},gp.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},gp.prototype.isBlank=function(){return this._isBlank},gp.prototype.setBlank=function(t){this._isBlank=t},gp.prototype.getLabel=null,oa(gp),ua(gp,{registerWhenExtend:!0}),mp.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&N(i,xp);return new mp({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var vp=mp.prototype;function yp(t){return t._map||(t._map=Q(t.categories))}function xp(t){return z(t)&&null!=t.value?t.value:t+""}vp.getOrdinal=function(t){return yp(this).get(t)},vp.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=yp(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var _p=gp.prototype,wp=gp.extend({type:"ordinal",init:function(t,e){t&&!O(t)||(t=new mp({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),_p.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return _p.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(_p.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:et,niceExtent:et});wp.create=function(){return new wp};var bp=zl;function Sp(t){return Gl(t)+2}function Mp(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Ip(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),Mp(t,0,e),Mp(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var Tp=zl,Ap=gp.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),Ap.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Sp(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,a=[];if(!e)return a;i[0]s&&(t?a.push(Tp(s+e,o)):a.push(i[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),o=1;on[0]&&h>>1;t[o][1]>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}Tg.prototype={constructor:Tg,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;ss[1];d(e[0].coord,s[0])&&(n?e[0].coord=s[0]:e.shift());n&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],a.coord)&&(n?a.coord=s[1]:e.pop());n&&d(a.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=zl(t),e=zl(e),c?en[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}var ym=Ar.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Xr(Ar.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,o=i.length,a=vm(i,e.smoothConstraint);if(e.connectNulls){for(;0n)return!1;return!0}(a,e))){var r=e.mapDimension(a.dim),s={};return E(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function Am(t,e,i){if("cartesian2d"!==t.type)return wm(t,e,i);var n=t.getBaseAxis().isHorizontal(),o=_m(t,e,i);if(!i.get("clip",!0)){var a=o.shape,r=Math.max(a.width,a.height);n?(a.y-=r,a.height+=2*r):(a.x-=r,a.width+=2*r)}return o}xc.extend({type:"line",init:function(){var t=new Ci,e=new em;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,o=this.group,a=t.getData(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===n.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,i){if(!i.valueDim)return[];for(var n=[],o=0,a=e.count();oh[c-1].coord&&(h.reverse(),d.reverse());var f=h[0].coord-10,p=h[c-1].coord+10,g=p-f;if(g<.001)return"transparent";E(h,function(t){t.offset=(t.coord-f)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new gs(0,0,0,0,h,!0);return m[n]=f,m[n+"2"]=p,m}}}(a,n)||a.getVisual("color");d.useStyle(D(r.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=Mm(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var T=a.getCalculationInfo("stackedOnSeries"),A=0;f.useStyle(D(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(A=Mm(T.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,i,n){var o=t.getData(),a=Yo(o,n);if(!(a instanceof Array)&&null!=a&&0<=a){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(r=new Ug(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else xc.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=Yo(o,n);if(null!=a&&0<=a){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else xc.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new ym({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new xm({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,i,n,o,a,r,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=rm(o,e,r),v=rm(a,t,s),y=0;ye&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},w(Em,Vg);var Rm={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},zm={};zm.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Rm),zm.valueAxis=m({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Rm),zm.timeAxis=D({scale:!0,min:"dataMin",max:"dataMax"},zm.valueAxis),zm.logAxis=D({scale:!0,logBase:10},zm.valueAxis);function Bm(a,t,r,e){E(Vm,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Mu(t):{};m(t,e.getTheme().get(o+"Axis")),m(t,this.getDefaultOption()),t.type=r(a,t),i&&Su(t,n,i)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=mp.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:p([{},zm[o+"Axis"],e],!0)})}),Lu.registerSubTypeDefaulter(a+"Axis",T(r,a))}var Vm=["value","category","time","log"],Gm=Lu.extend({type:"cartesian2dAxis",axis:null,init:function(){Gm.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Gm.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Gm.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Fm(t,e){return e.type||(e.data?"category":"value")}m(Gm.prototype,cg);var Wm={offset:0};function Hm(t,e){return t.getCoordSysModel()===e}function Zm(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}Bm("x",Gm,Fm,Wm),Bm("y",Gm,Fm,Wm),Lu.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Um=Zm.prototype;function Xm(t,e,i,n){i.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],r=i.model,s=r.get("axisLine.onZero"),l=r.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Ym(a[l])&&(o=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&Ym(a[u])&&!n[h(a[u])]){o=a[u];break}o&&(n[h(o)]=!0)}function h(t){return t.dim+"_"+t.index}}function Ym(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(0u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,av(a)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*Jm/180),av(a)?n=ev(t.rotation,null!=d?d:t.rotation,r):(n=function(t,e,i,n){var o,a,r=Zl(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;o=Ul(r-Jm/2)?(a=l?"bottom":"top","center"):Ul(r-1.5*Jm)?(a=l?"top":"bottom","center"):(a="middle",r<1.5*Jm&&Jm/2l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r=i.r0}}});var ey=Math.PI/180;function iy(o,t,e,i,n,a,r,s,l,u){function h(t,e,i){for(var n=t;nl+r);n++)if(o[n].y+=i,to[n].y+o[n].height)return void c(n,i/2);c(e-1,i/2)}function c(t,e){for(var i=t;0<=i&&!(o[i].y-eo[i-1].y+o[i-1].height));i--);}function d(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s=e?v.push(o[y]):m.push(o[y]);d(m,!1,t,e,i,n),d(v,!0,t,e,i,n)}function ny(t){return"center"===t.position}function oy(L,k,P,t,N,e){var O,E,R=L.getData(),z=[],B=!1,V=(L.get("minShowLabelAngle")||0)*ey;R.each(function(t){var e=R.getItemLayout(t),i=R.getItemModel(t),n=i.getModel("label"),o=n.get("position")||i.get("emphasis.label.position"),a=n.get("distanceToLabelLine"),r=n.get("alignTo"),s=Rl(n.get("margin"),P),l=n.get("bleedMargin"),u=n.getFont(),h=i.getModel("labelLine"),c=h.get("length");c=Rl(c,P);var d=h.get("length2");if(d=Rl(d,P),!(e.anglei[0]&&isFinite(h)&&isFinite(i[0]););else{var l=o.getTicks().length-1;c"+N(t,function(t,e){var i=o.get(o.mapDimension(t.dim),n);return au(t.name+" : "+i)}).join("
")},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,n=e.getValues(N(i.dimensions,function(t){return e.mapDimension(t)}),t,!0),o=0,a=n.length;o"+au(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}}),Xv);var Oy="\0_ec_interaction_mutex";function Ey(t,e){return!!Ry(t)[e]}function Ry(t){return t[Oy]||(t[Oy]={})}function zy(i){this.pointerChecker,this._zr=i,this._opt={};var t=A,n=t(By,this),o=t(Vy,this),a=t(Gy,this),r=t(Fy,this),s=t(Wy,this);Ct.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=D(L(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(i.on("mousedown",n),i.on("mousemove",o),i.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(i.on("mousewheel",r),i.on("pinch",s))},this.disable=function(){i.off("mousedown",n),i.off("mousemove",o),i.off("mouseup",a),i.off("mousewheel",r),i.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function By(t){if(!(Yt(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function Vy(t){if(this._dragging&&Uy("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!Ey(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,o=this._y,a=e-n,r=i-o;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&Xt(t.event),Zy(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:n,oldY:o,newX:e,newY:i})}}function Gy(t){Yt(t)||(this._dragging=!1)}function Fy(t){var e=Uy("zoomOnMouseWheel",t,this._opt),i=Uy("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),a=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=3e&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;ea&&(a=t.depth)});var r=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:a;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return au(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var Ex=Cs({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.childPoints,n=i.length,o=e.parentPoint,a=i[0],r=i[n-1];if(1===n)return t.moveTo(o[0],o[1]),void t.lineTo(a[0],a[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Rl(e.forkPosition,1),c=[];c[l]=o[l],c[u]=o[u]+(r[u]-o[u])*h,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(a[0],a[1]),c[l]=a[l],t.lineTo(c[0],c[1]),c[l]=r[l],t.lineTo(c[0],c[1]),t.lineTo(r[0],r[1]);for(var d=1;dx.x)||(m-=Math.PI);var b=v?"left":"right",S=a.labelModel.get("rotate"),M=S*(Math.PI/180);g.setStyle({textPosition:a.labelModel.get("position")||b,textRotation:null==S?-m:M,textOrigin:"center",verticalAlign:"middle"})}!function(t,e,i,n,o,a,r,s,l){var u=l.edgeShape,h=n.__edge;if("curve"===u)e.parentNode&&e.parentNode!==i&&cl(h=h||(n.__edge=new ds({shape:Gx(l,o,o),style:D({opacity:0,strokeNoScale:!0},l.lineStyle)})),{shape:Gx(l,a,r),style:{opacity:1}},t);else if("polyline"===u&&"orthogonal"===l.layout&&e!==i&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var c=e.children,d=[],f=0;fh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),Fx(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Lx(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=a/(h.getLayout().x+d+f),p=o/(c.depth-1||1),Fx(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:o-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),Fx(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}(t,e)})}),rc.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};!function i(t){var n=0;E(t.children,function(t){i(t);var e=t.value;O(e)&&(e=e[0]),n+=e});var e=t.value;O(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=n);e<0&&(e=0);O(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[];n=t.levels=function(t,e){var n,i=e.get("color");if(!i)return;if(E(t=t||[],function(t){var e=new Cl(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),!n){(t[0]||(t[0]={})).color=i.slice()}return t}(n,e);var o={};return o.levels=n,Ix.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=O(i)?tu(i[0]):tu(i);return au(e.getName(t)+": "+n)},getDataParams:function(t){var e=rc.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Ux(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},k(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Q(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var Xx=5;function Yx(t){this.group=new Ci,t.add(this.group)}function jx(t,e,i,n,o,a){var r=[[o?t:t-Xx,e],[t+i,e],[t+i,e+n],[o?t:t-Xx,e+n]];return a||r.splice(2,0,[t+i+Xx,e+n/2]),o||r.push([t,e+n/2]),r}Yx.prototype={constructor:Yx,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),bu(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a,r,s=0,l=e.emptyItemWidth,u=t.get("breadcrumb.height"),h=function(t,e,i){var n=e.width,o=e.height,a=Rl(t.x,n),r=Rl(t.y,o),s=Rl(t.x2,n),l=Rl(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=o),i=iu(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}(e.pos,e.box),c=e.totalWidth,d=e.renderList,f=d.length-1;0<=f;f--){var p=d[f],g=p.node,m=p.width,v=p.text;c>h.width&&(c-=m-l,m=l,v=null);var y=new Qr({shape:{points:jx(s,0,m,u,f===d.length-1,0===f)},style:D(i.getItemStyle(),{lineJoin:"bevel",text:v,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:T(o,g)});this.group.add(y),a=t,r=g,y.eventData={componentType:"series",componentSubType:"treemap",componentIndex:a.componentIndex,seriesIndex:a.componentIndex,seriesName:a.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&Ux(r,a)},s+=m+8}},remove:function(){this.group.removeAll()}};function qx(t){var e=a_(t);return e.stroke=e.fill=e.lineWidth=null,e}var Kx=A,$x=Ci,Jx=rs,Qx=E,t_=["label"],e_=["emphasis","label"],i_=["upperLabel"],n_=["emphasis","upperLabel"],o_=10,a_=ha([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function r_(c,r,s,l,u,e,d,t,i,n){if(d){var f=d.getLayout(),o=c.getData();if(o.setItemGraphicEl(d.dataIndex,null),f&&f.isInView){var h=f.width,p=f.height,g=f.borderWidth,m=f.invisible,v=d.getRawIndex(),y=t&&t.getRawIndex(),a=d.viewChildren,x=f.upperHeight,_=a&&a.length,w=d.getModel("itemStyle"),b=d.getModel("emphasis.itemStyle"),S=C("nodeGroup",$x);if(S){if(i.add(S),S.attr("position",[f.x||0,f.y||0]),S.__tmNodeWidth=h,S.__tmNodeHeight=p,f.isAboveViewRoot)return S;var M=d.getModel(),I=C("background",Jx,n,1);if(I&&function(t,e,i){if(e.dataIndex=d.dataIndex,e.seriesIndex=c.seriesIndex,e.setShape({x:0,y:0,width:h,height:p}),m)A(e);else{e.invisible=!1;var n=d.getVisual("borderColor",!0),o=b.get("borderColor"),a=qx(w);a.fill=n;var r=a_(b);if(r.fill=o,i){var s=h-2*g;D(a,r,n,s,x,{x:g,y:0,width:s,height:x})}else a.text=r.text=null;e.setStyle(a),Us(e,r)}t.add(e)}(S,I,_&&f.upperHeight),_)Qs(S)&&Js(S,!1),I&&(Js(I,!0),o.setItemGraphicEl(d.dataIndex,I));else{var T=C("content",Jx,n,2);T&&function(t,e){e.dataIndex=d.dataIndex,e.seriesIndex=c.seriesIndex;var i=Math.max(h-2*g,0),n=Math.max(p-2*g,0);if(e.culling=!0,e.setShape({x:g,y:g,width:i,height:n}),m)A(e);else{e.invisible=!1;var o=d.getVisual("color",!0),a=qx(w);a.fill=o;var r=a_(b);D(a,r,o,i,n),e.setStyle(a),Us(e,r)}t.add(e)}(S,T),I&&Qs(I)&&Js(I,!1),Js(S,!0),o.setItemGraphicEl(d.dataIndex,S)}return S}}}function A(t){t.invisible||e.push(t)}function D(t,e,i,n,o,a){var r=W(c.getFormattedLabel(d.dataIndex,"normal",null,null,a?"upperLabel":"label"),M.get("name"));if(!a&&f.isLeafRoot){var s=c.get("drillDownIcon",!0);r=s?s+" "+r:r}var l=M.getModel(a?i_:t_),u=M.getModel(a?n_:e_),h=l.getShallow("show");el(t,e,l,u,{defaultText:h?r:null,autoColor:i,isRectText:!0}),a&&(t.textRect=L(a)),t.truncate=h&&l.get("ellipsis")?{outerWidth:n,outerHeight:o,minChar:2}:null}function C(t,e,i,n){var o=null!=y&&s[t][y],a=u[t];return o?(s[t][y]=null,function(t,e,i){(t[v]={}).old="nodeGroup"===i?e.position.slice():k({},e.shape)}(a,o,t)):m||((o=new e({z:function(t,e){var i=t*o_+e;return(i-1)/i}(i,n)})).__tmDepth=i,function(t,e,i){var n=t[v]={},o=d.parentNode;if(o&&(!l||"drillDown"===l.direction)){var a=0,r=0,s=u.background[o.getRawIndex()];!l&&s&&s.old&&(a=s.old.width,r=s.old.height),n.old="nodeGroup"===i?[0,r]:{x:a,y:r,width:0,height:0}}n.fadein="nodeGroup"!==i}(a,0,o.__tmStorageName=t)),r[t][v]=o}}Df({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(_(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=Wx(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===a&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,h=this._giveContainerGroup(r),c=this._doRender(h,t,u);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?c.renderFinally():this._doAnimation(h,c,t,u),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new $x,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){var n=e.getData().tree,o=this._oldTree,a={nodeGroup:[],background:[],content:[]},r={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],c=T(r_,e,r,s,i,a,l);!function a(r,s,l,u,h){u?Qx(s=r,function(t,e){t.isRemoved()||i(e,e)}):new Lf(s,r,t,t).add(i).update(i).remove(T(i,null)).execute();function t(t){return t.getId()}function i(t,e){var i=null!=t?r[t]:null,n=null!=e?s[e]:null,o=c(i,n,l,h);o&&a(i&&i.viewChildren||[],n&&n.viewChildren||[],o,u,h+1)}}(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var u,h,d=(h={nodeGroup:[],background:[],content:[]},(u=s)&&Qx(u,function(t,e){var i=h[e];Qx(t,function(t){t&&(i.push(t),t.__tmWillDelete=1)})}),h);return this._oldTree=n,this._storage=r,{lastsForAnimation:a,willDeleteEls:d,renderFinally:function(){Qx(d,function(t){Qx(t,function(t){t.parent&&t.parent.remove(t)})}),Qx(l,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,a,e,s){if(e.get("animation")){var l=e.get("animationDurationUpdate"),u=e.get("animationEasing"),h=function(){var a,r=[],s={};return{add:function(t,e,i,n,o){return R(n)&&(o=n,n=0),!s[t.id]&&(s[t.id]=1,r.push({el:t,target:e,time:i,delay:n,easing:o}),!0)},done:function(t){return a=t,this},start:function(){for(var t=r.length,e=0,i=r.length;e=r.length||t===r[t.depth]){var i=O_(l,c,t,e,y,s);n(t,i,o,a,r,s)}})}else p=L_(c),t.setVisual("color",p)}(a,{},N(o.levelModels,function(t){return t?t.get(A_):null}),r,t.getViewRoot().getAncestors(),t)}};function C_(i,n,o,a){var r=k({},n);return E(["color","colorAlpha","colorSaturation"],function(t){var e=i.get(t,!0);null==e&&o&&(e=o[t]),null==e&&(e=n[t]),null==e&&(e=a.get(t)),null!=e&&(r[t]=e)}),r}function L_(t){var e=k_(t,"color");if(e){var i=k_(t,"colorAlpha"),n=k_(t,"colorSaturation");return n&&(e=qe(e,null,null,n)),i&&(e=Ke(e,i)),e}}function k_(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function P_(t,e,i,n,o,a){if(a&&a.length){var r=N_(e,"color")||null!=o.color&&"none"!==o.color&&(N_(e,"colorAlpha")||N_(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new f_(c);return d.__drColorMappingBy=h,d}}}function N_(t,e){var i=t.get(e);return T_(i)&&i.length?{name:e,range:i}:null}function O_(t,e,i,n,o,a){var r=k({},e);if(o){var s=o.type,l="color"===s&&o.__drColorMappingBy,u="index"===l?n:"id"===l?a.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));r[s]=o.mapValueToVisual(u)}return r}var E_=Math.max,R_=Math.min,z_=W,B_=E,V_=["itemStyle","borderWidth"],G_=["itemStyle","gapWidth"],F_=["upperLabel","show"],W_=["upperLabel","height"],H_={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),a=i.getHeight(),r=t.option,s=wu(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=r.size||[],u=Rl(z_(s.width,l[0]),o),h=Rl(z_(s.height,l[1]),a),c=n&&n.type,d=Wx(n,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?n.rootRect:null,p=t.getViewRoot(),g=Hx(p);if("treemapMove"!==c){var m="treemapZoomToNode"===c?function(t,e,i,n,o){var a,r=(e||{}).node,s=[n,o];if(!r||r===i)return s;var l=n*o,u=l*t.option.zoomToNodeRatio;for(;a=r.parentNode;){for(var h=0,c=a.children,d=0,f=c.length;ds[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,i,n,o){if(!n)return i;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;0<=l;l--){var u=o["asc"===n?r-l-1:l].getValue();u/i*ei[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;c "+d)),u++)}var f,p=i.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=pp(t,i);else{var g=sh.get(p),m=g&&"view"!==g.type&&g.dimensions||[];_(m,"value")<0&&m.concat(["value"]);var v=sp(t,{coordDimensions:m});(f=new Xf(v,i)).initData(t)}var y=new Xf(["value"],i);return y.initData(l,s),o&&o(f,y),mx({mainData:f,struct:a,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var ew=Af({type:"series.graph",init:function(t){ew.superApply(this,"init",arguments);var e=this;function i(){return e._categoriesData}this.legendVisualProvider=new Yv(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){ew.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){ew.superApply(this,"mergeDefaultAndTheme",arguments),Go(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],i=t.data||t.nodes||[],l=this;if(i&&e)return tw(i,e,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=l._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var i=l.getModel("edgeLabel"),n=new Cl({label:i.option},i.parentModel,s),o=l.getModel("emphasis.edgeLabel"),a=new Cl({emphasis:{label:o.option}},o.parentModel,s);function r(t){return(t=this.parsePath(t))&&"label"===t[0]?n:t&&"emphasis"===t[0]&&"label"===t[1]?a:this.parentModel}e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(r),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"!==i)return ew.superApply(this,"formatTooltip",arguments);var n=this.getData(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=au(l.join(" > ")),o.value&&(l+=" : "+au(o.value)),l},_updateCategoriesData:function(){var t=N(this.option.categories||[],function(t){return null!=t.value?t:k({value:0},t)}),e=new Xf(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return ew.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),iw=ls.prototype,nw=ds.prototype;function ow(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var aw=Cs({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[ow(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:iw.buildPath,_buildPathCurve:nw.buildPath,pointAt:function(t){return this[ow(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:iw.pointAt,_pointAtCurve:nw.pointAt,tangentAt:function(t){var e=this.shape,i=ow(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return mt(i,i)},_tangentAtCurve:nw.tangentAt}),rw=["fromSymbol","toSymbol"];function sw(t){return"_"+t+"Type"}function lw(t,e,i){var n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,t),a=e.getItemVisual(i,t+"Size");if(o&&"none"!==o){O(a)||(a=[a,a]);var r=_g(o,-a[0]/2,-a[1]/2,a[0],a[1],n);return r.name=t,r}}function uw(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}function hw(t,e,i){Ci.call(this),this._createLine(t,e,i)}var cw=hw.prototype;function dw(t){this._ctor=t||hw,this.group=new Ci}cw.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),i=this.childOfName("label");if(t||e||!i.ignore){for(var n=1,o=this.parent;o;)o.scale&&(n/=o.scale[0]),o=o.parent;var a=this.childOfName("line");if(this.__dirty||a.__dirty){var r=a.shape.percent,s=a.pointAt(0),l=a.pointAt(r),u=ht([],l,s);if(mt(u,u),t){t.attr("position",s);var h=a.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[n*r,n*r])}if(e){e.attr("position",l);h=a.tangentAt(1);e.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),e.attr("scale",[n*r,n*r])}if(!i.ignore){var c,d,f,p;i.attr("position",l);var g=i.__labelDistance,m=g[0]*n,v=g[1]*n,y=r/2,x=[(h=a.tangentAt(y))[1],-h[0]],_=a.pointAt(y);0=t&&(0===e?0:n[e-1][0])a&&(e[1-n]=e[n]+c.sign*a),e}function $w(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:0o*(1-h[0])?(l="jump",r=s-o*(1-h[2])):0<=(r=s-o*h[1])&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?Kw(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[eb(0,a[1]*s/o-o/2)])[1]=tb(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},sh.register("parallel",{create:function(n,o){var a=[];return n.eachComponent("parallel",function(t,e){var i=new rb(t,n,o);i.name="parallel_"+e,i.resize(t,o),(t.coordinateSystem=i).model=t,a.push(i)}),n.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=e.coordinateSystem}}),a}});var lb=Lu.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return ha([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=L(t);if(e)for(var i=e.length-1;0<=i;i--)Bl(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;nn.getWidth()||i<0||i>n.getHeight()}(t,e)){var n=t._zr,o=t._covers,a=Lb(t,e,i);if(!t._dragging)for(var r=0;rf&&(f=m.depth),g.setLayout({depth:v?m.depth:c},!0),"vertical"===a?g.setLayout({dy:i},!0):g.setLayout({dx:i},!0);for(var y=0;y "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});function uM(t,e,i){Ci.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var hM=uM.prototype;function cM(t,e,i){Ci.call(this),this._createPolyline(t,e,i)}hM.createLine=function(t,e,i){return new hw(t,e,i)},hM._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");O(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=_g(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._symbolScale=n,this._updateEffectAnimation(t,i,e))},hM._updateEffectAnimation=function(e,t,i){var n=this.childAt(1);if(n){var o=this,a=e.getItemLayout(i),r=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=W(t.get("delay"),function(t){return t/e.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),0e);r++);r=Math.min(r-1,o-2)}wt(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},w(fM,uM);var gM=Cs({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var o=0;o=e[0]&&t<=e[1]}}(y,e.option.range):function(e,n,o){var i=e[1]-e[0],a=(n=N(n,function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}})).length,r=0;return function(t){for(var e=r;e=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0==o?i.y+i.height/2:i.x+i.width/2,n}}).dimensions});var jM=["axisLine","axisTickLabel","axisName"],qM=["splitArea","splitLine"],KM=pv.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,i,n){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new Ci;var r=YM(e),s=new $m(e,r);E(jM,s.add,s),o.add(this._axisGroup),o.add(s.getGroup()),E(qM,function(t){e.get(t+".show")&&this["_"+t](e)},this),ml(a,this._axisGroup,e),KM.superCall(this,"render",e,t,i,n)},remove:function(){_v(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),o=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;fr)return!0;if(a){var s=cv(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=pI(t).pointerEl=new bl[o.type](gI(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=pI(t).labelEl=new rs(gI(e.label));t.add(o),xI(o,n)}},updatePointerEl:function(t,e,i){var n=pI(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=pI(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),xI(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),o=this._handle,a=i.getModel("handle"),r=i.get("status");if(!a.get("show")||!r||"hide"===r)return o&&n.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=yl(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Xt(t.event)},onmousedown:mI(this._onHandleDragMove,this,0,0),drift:mI(this._onHandleDragMove,this),ondragend:mI(this._onHandleDragEnd,this)}),n.add(o)),wI(o,i,!1);o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");O(s)||(s=[s,s]),o.attr("scale",[s[0]/2,s[1]/2]),Lc(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){yI(this._axisPointerModel,!e&&this._moveAnimation,this._handle,_I(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(_I(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(_I(n)),pI(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=vI);var LI=vI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=kI(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=bI(n),c=PI[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}TI(e,t,yv(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=yv(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:II(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=kI(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function kI(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var PI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:AI([e,i[0]],[e,i[1]],NI(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),o=i[1]-i[0];return{type:"Rect",shape:DI([e-n/2,i[0]],[n,o],NI(t))}}};function NI(t){return"x"===t.dim?0:1}pv.registerAxisPointerClass("CartesianAxisPointer",LI),vf(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!O(e)&&(t.axisPointer.link=[e])}}),yf(Cd.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=uv(t,e)}),xf({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||A(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){rI(r)&&(r=JM({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=rI(r),u=o.axesInfo,h=s.axesInfo,c="leave"===n||rI(r),d={},f={},p={list:[],map:{}},g={showPointer:tI(nI,f),showTooltip:tI(oI,p)};QM(s.coordSysMap,function(t,e){var a=l||t.containPoint(r);QM(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,n=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(u,t);if(!c&&a&&(!u||n)){var o=n&&n.value;null!=o||l||(o=i.pointToData(r)),null!=o&&iI(t,o,g,!1,d)}})});var m={};return QM(h,function(o,t){var a=o.linkGroup;a&&!f[t]&&QM(a.axesInfo,function(t,e){var i=f[e];if(t!==o&&i){var n=i.value;a.mapper&&(n=o.axis.scale.parse(a.mapper(n,aI(t),aI(o)))),m[o.key]=n}})}),QM(m,function(t,e){iI(h[e],t,g,!0,d)}),function(o,t,e){var a=e.axesInfo=[];QM(t,function(t,e){var i=t.axisPointerModel.option,n=o[e];n?(t.useHandle||(i.status="show"),i.value=n.value,i.seriesDataIndices=(n.payloadBatch||[]).slice()):t.useHandle||(i.status="hide"),"show"===i.status&&a.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}(f,h,d),function(t,e,i,n){if(rI(e)||!t.list.length)return n({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(p,r,t,a),function(t,e,i){var n=i.getZr(),o="axisPointerLastHighlights",a=eI(n)[o]||{},r=eI(n)[o]={};QM(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&QM(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var s=[],l=[];E(a,function(t,e){r[e]||l.push(t)}),E(r,function(t,e){a[e]||s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,i),d}});var OI=["x","y"],EI=["width","height"],RI=vI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=VI(r,1-BI(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=bI(n),c=zI[u](a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}TI(e,t,YM(i),i,n,o)},getHandleTransform:function(t,e,i){var n=YM(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:II(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=BI(o),s=VI(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=VI(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),zI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:AI([e,i[0]],[e,i[1]],BI(t))}},shadow:function(t,e,i){var n=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:DI([e-n/2,i[0]],[n,o],BI(t))}}};function BI(t){return t.isHorizontal()?0:1}function VI(t,e){var i=t.getRect();return[i[OI[e]],i[OI[e]]+i[EI[e]]]}pv.registerAxisPointerClass("SingleAxisPointer",RI),Tf({type:"single"});var GI=rc.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){GI.superApply(this,"init",arguments),this.legendVisualProvider=new Yv(A(this.getData,this),A(this.getRawData,this))},fixData:function(t){var e=t.length,i=ta(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,dataList:t})});for(var o=n.length,a=-1,r=-1,s=0;sMath.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,f>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,f>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),c.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var x=d*p+l.cx,_=d*g+l.cy;c.attr("position",[x,_]);var w=S("rotate"),b=0;function S(t){var e=a.get(t);return null==e?o.get(t):e}"radial"===w?(b=-f)<-Math.PI/2&&(b+=Math.PI):"tangential"===w?(b=Math.PI/2-f)>Math.PI/2?b-=Math.PI:b<-Math.PI/2&&(b+=Math.PI):"number"==typeof w&&(b=w*Math.PI/180),c.attr("rotation",b)},jI._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function o(){r.onEmphasis(n)}function a(){r.onNormal()}var r=this;i.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},w(YI,Ci);xc.extend({type:"sunburst",init:function(){},render:function(o,a,t,e){var n=this;this.seriesModel=o,this.api=t,this.ecModel=a;var r=o.getData(),s=r.tree.root,i=o.getViewRoot(),l=this.group,u=o.get("renderLabelForZeroData"),h=[];i.eachNode(function(t){h.push(t)});var c=this._oldChildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function t(t){return t.getId()}function e(t,e){!function(t,e){u||!t||t.getValue()||(t=null);if(t!==s&&e!==s)if(e&&e.piece)t?(e.piece.updateData(!1,t,"normal",o,a),r.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(e);else if(t){var i=new YI(t,o,a);l.add(i),r.setItemGraphicEl(t.dataIndex,i)}}(null==t?null:i[t],null==e?null:n[e])}new Lf(n,i,t,t).add(e).update(e).remove(T(e,null)).execute()}(h,c),function(t,e){if(0=i.r0}}});var qI="sunburstRootToNode";xf({type:qI,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var i=Wx(o,[qI],t);if(i){var n=t.getViewRoot();n&&(o.direction=Zx(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var KI="sunburstHighlight";xf({type:KI,update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){var i=Wx(n,[KI],t);i&&(n.highlight=i.node)})});xf({type:"sunburstUnhighlight",update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){i.unhighlight=!0})});var $I=Math.PI/180;function JI(t,e){if("function"==typeof e)return t.sort(e);var n="asc"===e;return t.sort(function(t,e){var i=(t.getValue()-e.getValue())*(n?1:-1);return 0==i?(t.dataIndex-e.dataIndex)*(n?-1:1):i})}function QI(a,r){return r=r||[0,0],N(["x","y"],function(t,e){var i=this.getAxis(t),n=r[e],o=a[e]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}bf(T(ty,"sunburst")),wf(T(function(t,e,C,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");O(i)||(i=[0,i]),O(e)||(e=[e,e]);var n=C.getWidth(),o=C.getHeight(),h=Math.min(n,o),c=Rl(e[0],n),d=Rl(e[1],o),f=Rl(i[0],h/2),a=Rl(i[1],h/2),r=-t.get("startAngle")*$I,p=t.get("minAngle")*$I,g=t.getData().tree.root,s=t.getViewRoot(),m=s.depth,l=t.get("sort");null!=l&&!function e(t,i){var n=t.children||[];t.children=JI(n,i);n.length&&E(t.children,function(t){e(t,i)})}(s,l);var u=0;E(s.children,function(t){isNaN(t.getValue())||u++});var v=s.getValue(),y=Math.PI/(v||u)*2,x=0t[1]&&t.reverse(),{coordSys:{type:"polar",cx:o.cx,cy:o.cy,r:t[1],r0:t[0]},api:{coord:A(function(t){var e=a.dataToRadius(t[0]),i=r.dataToAngle(t[1]),n=o.coordToPoint([e,i]);return n.push(e,i*Math.PI/180),n}),size:A(iT,o)}}},calendar:function(i){var t=i.getRect(),e=i.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:i.getCellWidth(),cellHeight:i.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return i.dataToPoint(t,e)}}}}};function hT(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function cT(a,r,e,t){var i=a.get("renderItem"),n=a.coordinateSystem,o={};n&&(o=n.prepareCustoms?n.prepareCustoms():uT[n.type](n));var s,l,u,h,c,d=D({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=s),r.get(r.getDimension(t||0),e)},style:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(oT).getItemStyle();null!=c&&(i.fill=c);var n=r.getItemVisual(e,"opacity");null!=n&&(i.opacity=n);var o=t?mT(t,u):u;return nl(i,o,null,{autoColor:c,isRectText:!0}),i.text=o.getShallow("show")?H(a.getFormattedLabel(e,"normal"),Zg(r,e)):null,t&&vT(i,t),i},styleEmphasis:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(aT).getItemStyle(),n=t?mT(t,h):h;return nl(i,n,null,{isRectText:!0},!0),i.text=n.getShallow("show")?Z(a.getFormattedLabel(e,"emphasis"),a.getFormattedLabel(e,"normal"),Zg(r,e)):null,t&&vT(i,t),i},visual:function(t,e){return null==e&&(e=s),r.getItemVisual(e,t)},barLayout:function(t){if(n.getBaseAxis){return function(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),o=0;oe[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,o=i*i+n*n,a=this.r,r=this.r0;return o<=a*a&&r*r<=o}}}};var AT=Lu.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});m(AT.prototype,cg);var DT={splitNumber:5};function CT(t,e){return e.type||(e.data?"category":"value")}function LT(t,e){var i=this,n=i.getAngleAxis(),o=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===i){var e=t.getData();E(e.mapDimension("radius",!0),function(t){o.scale.unionExtentFromData(e,fp(e,t))}),E(e.mapDimension("angle",!0),function(t){n.scale.unionExtentFromData(e,fp(e,t))})}}),ag(n.scale,n.model),ag(o.scale,o.model),"category"===n.type&&!n.onBand){var a=n.getExtent(),r=360/n.scale.count();n.inverse?a[1]+=r:a[1]-=r,n.setExtent(a[0],a[1])}}function kT(t,e){if(t.type=e.get("type"),t.scale=rg(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}(e.axis=t).model=e}Bm("angle",AT,CT,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),Bm("radius",AT,CT,DT),If({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}}),sh.register("polar",{dimensions:TT.prototype.dimensions,create:function(i,s){var l=[];return i.eachComponent("polar",function(t,e){var i=new TT(e);i.update=LT;var n=i.getRadiusAxis(),o=i.getAngleAxis(),a=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");kT(n,a),kT(o,r),function(t,e,i){var n=e.get("center"),o=i.getWidth(),a=i.getHeight();t.cx=Rl(n[0],o),t.cy=Rl(n[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=e.get("radius");null==l?l=[0,"100%"]:O(l)||(l=[0,l]),l=[Rl(l[0],s),Rl(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}(i,t,s),l.push(i),(t.coordinateSystem=i).model=t}),i.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=i.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=e.coordinateSystem}}),l}});var PT=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function NT(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function OT(t){return t.getRadiusAxis().inverse?0:1}function ET(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}pv.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),a=i.getTicksCoords(),r=i.getMinorTicksCoords(),s=N(i.getViewLabels(),function(t){return(t=L(t)).coord=i.dataToCoord(t.tickValue),t});ET(s),ET(a),E(PT,function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,a,r,o,s)},this)}},_axisLine:function(t,e,i,n,o){var a,r=t.getModel("axisLine.lineStyle"),s=OT(e),l=s?0:1;(a=0===o[l]?new Yr({shape:{cx:e.cx,cy:e.cy,r:o[s]},style:r.getLineStyle(),z2:1,silent:!0}):new Kr({shape:{cx:e.cx,cy:e.cy,r:o[s],r0:o[l]},style:r.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n,o){var a=t.getModel("axisTick"),r=(a.get("inside")?-1:1)*a.get("length"),s=o[OT(e)],l=N(i,function(t){return new ls({shape:NT(e,[s,s+r],t.coord)})});this.group.add(Es(l,{style:D(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,n,o){if(n.length){for(var a=t.getModel("axisTick"),r=t.getModel("minorTick"),s=(a.get("inside")?-1:1)*r.get("length"),l=o[OT(e)],u=[],h=0;hr?"left":"right",u=Math.abs(a[1]-s)/o<.3?"middle":a[1]>s?"top":"bottom";p&&p[n]&&p[n].textStyle&&(i=new Cl(p[n].textStyle,g,g.ecModel));var h=new Ur({silent:$m.isLabelSilent(c)});this.group.add(h),nl(h.style,i,{x:a[0],y:a[1],textFill:i.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u}),v&&(h.eventData=$m.makeAxisEventDataBase(c),h.eventData.targetType="axisLabel",h.eventData.value=t.rawLabel)},this)},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=0;um?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,i,0,s,d))}});var VT={line:function(t,e,i,n,o){return"angle"===t.dim?{type:"Line",shape:AI(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,o){var a=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:CI(e.cx,e.cy,n[0],n[1],(-i-a/2)*r,(a/2-i)*r)}:{type:"Sector",shape:CI(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};function GT(n,t){t.update="updateView",xf(t,function(t,e){var i={};return e.eachComponent({mainType:"geo",query:t},function(e){e[n](t.name),E(e.coordinateSystem.regions,function(t){i[t.name]=e.isSelected(t.name)||!1})}),{selected:i,name:t.name}})}pv.registerAxisPointerClass("PolarAxisPointer",BT),wf(T(function(t,e,i){var N={},O=function(t){var g={};E(t,function(t,e){var i=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=bT(n,o),r=o.getExtent(),s="category"===o.type?o.getBandWidth():Math.abs(r[1]-r[0])/i.count(),l=g[a]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;g[a]=l;var h=wT(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=Rl(t.get("barWidth"),s),d=Rl(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var d={};return E(g,function(t,i){d[i]={};var e=t.stacks,n=t.bandWidth,o=Rl(t.categoryGap,n),a=Rl(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a);l=Math.max(l,0),E(e,function(t,e){var i=t.maxWidth;i&&i=n.start.time&&i.timea.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();if(n.setDate(o+i-1),n.getDate()!==a)for(var r=0n.weeks||0===t&&en.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},FT.dimensions=FT.prototype.dimensions,FT.getDimensionsInfo=FT.prototype.getDimensionsInfo,FT.create=function(i,n){var o=[];return i.eachComponent("calendar",function(t){var e=new FT(t,i,n);o.push(e),t.coordinateSystem=e}),i.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=o[t.get("calendarIndex")||0])}),o},sh.register("calendar",FT);var HT=Lu.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=Mu(t);HT.superApply(this,"init",arguments),ZT(t,o)},mergeOption:function(t,e){HT.superApply(this,"mergeOption",arguments),ZT(this.option,t)}});function ZT(t,e){var i=t.cellSize;O(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=N([0,1],function(t){return function(t,e){return null!=t[yu[e][0]]||null!=t[yu[e][1]]&&null!=t[yu[e][2]]}(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});Su(t,e,{type:"box",ignoreSize:n})}var UT={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},XT={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Tf({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new rs({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(i,t,n,o){var a=this,r=i.coordinateSystem,s=i.getModel("splitLine.lineStyle").getLineStyle(),l=i.get("splitLine.show"),e=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){d(u.formatedDate),0===h&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var e=a._getLinePointsOfOneWeek(i,t,n);a._tlpoints.push(e[0]),a._blpoints.push(e[e.length-1]),l&&a._drawSplitline(e,s,o)}d(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,e,n),s,o),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,e,n),s,o)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new ts({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?uu(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r=r||("horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new Ur({z2:30});nl(m.style,o,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),a=n.get("margin"),r=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];R(o)&&(o=UT[o.toUpperCase()]||[]);var u="start"===r?0:1,h="horizontal"===e?0:1;a="start"===r?-a:a;for(var c="center"===s,d=0;dd.getHeight()&&(i.textPosition="top",a=!0);var r=a?-5-n.height:p+8;o+n.width/2>d.getWidth()?(i.textPosition=["100%",r],i.textAlign="right"):o-n.width/2<0&&(i.textPosition=[0,r],i.textAlign="left")}})}function t(t,e){var i,n=m[t],o=m[e],a=u[n],r=new Cl(a,h,h.ecModel);if(l&&null!=l.newTitle&&(a.title=l.newTitle),n&&!o){if(function(t){return 0===t.indexOf("my")}(n))i={model:r,onclick:r.option.onclick,featureName:n};else{var s=tA(n);if(!s)return;i=new s(r,c,d)}g[n]=i}else{if(!(i=g[o]))return;i.model=r,i.ecModel=c,i.api=d}n||!o?r.get("show")&&!i.unusable?(function(o,a,t){var r=o.getModel("iconStyle"),s=o.getModel("emphasis.iconStyle"),e=a.getIcons?a.getIcons():o.get("icon"),l=o.get("title")||{};if("string"==typeof e){var i=e,n=l;l={},(e={})[t]=i,l[t]=n}var u=o.iconPaths={};E(e,function(t,e){var i=yl(t,{},{x:-p/2,y:-p/2,width:p,height:p});i.setStyle(r.getItemStyle()),i.hoverStyle=s.getItemStyle(),i.setStyle({text:l[e],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var n=h.getModel("tooltip");n&&n.get("show")&&i.attr("tooltip",k({content:l[e],formatter:n.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:n.get("position",!0)||"bottom"},n.option)),$s(i),h.get("showTitle")&&(i.__title=l[e],i.on("mouseover",function(){var t=s.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";i.setStyle({textFill:s.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||e})}).on("mouseout",function(){i.setStyle({textFill:null,textBackgroundColor:null})})),i.trigger(o.get("iconStatus."+e)||"normal"),f.add(i),i.on("click",A(a.onclick,a,c,d,e)),u[e]=i})}(r,i,n),r.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},i.render&&i.render(r,c,d,l)):i.remove&&i.remove(c,d):i.dispose&&i.dispose(c,d)}},updateView:function(t,e,i,n){E(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(e,i){E(this._features,function(t){t.remove&&t.remove(e,i)}),this.group.removeAll()},dispose:function(e,i){E(this._features,function(t){t.dispose&&t.dispose(e,i)})}});var nA=Nc.toolbox.saveAsImage;function oA(t){this.model=t}oA.defaultOption={show:!0,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",title:nA.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:nA.lang.slice()},oA.prototype.unusable=!v.canvasSupported,oA.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=i.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(a.split(",")[1]),s=r.length,l=new Uint8Array(s);s--;)l[s]=r.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+o)}else{var h=i.get("lang"),c='';window.open().document.write(c)}else{var d=document.createElement("a");d.download=n+"."+o,d.target="_blank",d.href=a;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},QT("saveAsImage",oA);var aA=Nc.toolbox.magicType,rA="__ec_magicType_stack__";function sA(t){this.model=t}sA.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",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"},title:L(aA.title),option:{},seriesIndex:{}};var lA=sA.prototype;lA.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return E(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var uA={line:function(t,e,i,n){if("bar"===t)return m({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return m({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){var o=i.get("stack")===rA;if("line"===t||"bar"===t)return n.setIconStatus("stack",o?"normal":"emphasis"),m({id:e,stack:o?"":rA},n.get("option.stack")||{},!0)}},hA=[["line","bar"],["stack"]];lA.onclick=function(u,t,h){var c=this.model,e=c.get("seriesIndex."+h);if(uA[h]){var i,d={series:[]};if(E(hA,function(t){0<=_(t,h)&&E(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,i=t.id,n=uA[h](e,i,t,c);n&&(D(n,t.option),d.series.push(n));var o=t.coordinateSystem;if(o&&"cartesian2d"===o.type&&("line"===h||"bar"===h)){var a=o.getAxesByScale("ordinal")[0];if(a){var r=a.dim+"Axis",s=u.queryComponents({mainType:r,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;d[r]=d[r]||[];for(var l=0;l<=s;l++)d[r][s]=d[r][s]||{};d[r][s].boundaryGap="bar"===h}}}),"stack"===h)i=d.series&&d.series[0]&&d.series[0].stack===rA?m({stack:aA.title.tiled},aA.title):L(aA.title);t.dispatchAction({type:"changeMagicType",currentType:h,newOption:d,newTitle:i})}},xf({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),QT("magicType",sA);var cA=Nc.toolbox.dataView,dA=new Array(60).join("-"),fA="\t";function pA(t){var e=function(t){var o={},a=[],r=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)a.push(t);else{var i=e.getBaseAxis();if("category"===i.type){var n=i.dim+"_"+i.index;o[n]||(o[n]={categoryAxis:i,valueAxis:e.getOtherAxis(i),series:[]},r.push({axisDim:i.dim,axisIndex:i.index})),o[n].series.push(t)}else a.push(t)}}),{seriesGroupByCategoryAxis:o,other:a,meta:r}}(t);return{value:M([function(t){var h=[];return E(t,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,o=[" "].concat(N(t.series,function(t){return t.name})),a=[i.model.getCategories()];E(t.series,function(t){a.push(t.getRawData().mapArray(n,function(t){return t}))});for(var r=[o.join(fA)],s=0;st[1]&&t.reverse(),t}function AA(t,e){return Ko(t,e,{includeMainTypes:SA})}IA.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=kA[t.brushType](0,i,e);t.__rangeOffset={offset:NA[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},IA.matchOutputRanges=function(t,n,o){xA(t,function(i){var t=this.findTargetInfo(i,n);t&&!0!==t&&E(t.coordSyses,function(t){var e=kA[i.brushType](1,t,i.range);o(i,e.values,t,n)})},this)},IA.setInputRanges=function(t,o){xA(t,function(t){var e=this.findTargetInfo(t,o);if(t.range=t.range||[],e&&!0!==e){t.panelId=e.panelId;var i=kA[t.brushType](0,e.coordSys,t.coordRange),n=t.__rangeOffset;t.range=n?NA[t.brushType](i.values,n.offset,function(t,e){var i=EA(t),n=EA(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}(i.xyMinMax,n.xyMinMax)):i.values}},this)},IA.makePanelOpts=function(i,n){return N(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:n&&n(t),clipPath:Qb(e),isTargetByCursor:eS(e,i,t.coordSysModel),getLinearBrushOtherExtent:tS(e)}})},IA.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&0<=_A(n.coordSyses,e.coordinateSystem)},IA.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=AA(e,t),o=0;on[1]&&(n[1]=e[1])})}),n[1]c[1];if(r&&!s&&!l)return!0;r&&(n=!0),s&&(e=!0),l&&(i=!0)}return n&&e&&i}):YA(h,function(t){if("empty"===o)i.setData(u=u.map(t,function(t){return function(t){return t>=c[0]&&t<=c[1]}(t)?t:NaN}));else{var e={};e[t]=c,u.selectRange(e)}}),YA(h,function(t){u.setApproximateExtent(c,t)}))})}}};var KA=E,$A=ZA,JA=If({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=QA(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=QA(t);m(this.option,t,!0),m(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var i=this.option;v.canvasSupported||(i.realtime=!1),this._setDefaultThrottle(t),tD(this,t);var n=this.settledOption;KA([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(i[t[0]]=n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,i,n){var o=this.dependentModels[t.axis][e],a=o.__dzAxisProxy||(o.__dzAxisProxy=new XA(t.name,e,this,n));r[t.name+"_"+e]=a},this)},_resetTarget:function(){var i=this.option,t=this._judgeAutoMode();$A(function(t){var e=t.axisIndex;i[e]=Vo(i[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,i=!1;$A(function(t){null!=e[t.axisIndex]&&(i=!0)},this);var t=e.orient;return null==t&&i?"orient":i?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var a=!0,e=this.get("orient",!0),r=this.option,t=this.dependentModels;if(a){var i="vertical"===e?"y":"x";t[i+"Axis"].length?(r[i+"AxisIndex"]=[0],a=!1):KA(t.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})}a&&$A(function(t){if(a){var e=[],i=this.dependentModels[t.axis];if(i.length&&!e.length)for(var n=0,o=i.length;ne[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&FD(e)}};function FD(t){return new Di(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var WD=["#ddd"];If({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;e||DD(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:WD},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=N(t,function(t){return HD(this.option,t)},this))},setBrushOption:function(t){this.brushOption=HD(this.option,t),this.brushType=this.brushOption.brushType}});function HD(t,e){return m({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Cl(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function ZD(t,e,i,n){n&&n.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}Tf({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Sb(e.getZr())).on("brush",A(this._onBrush,this)).mount()},render:function(t){return this.model=t,ZD.apply(this,arguments)},updateTransform:function(t,e){return RD(e),ZD.apply(this,arguments)},updateView:ZD,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:i,areas:L(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:L(t),$from:i})}}),xf({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),xf({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),xf({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var UD=Nc.toolbox.brush;function XD(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}XD.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{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",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",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",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",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",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"},title:L(UD.title)};var YD=XD.prototype;YD.render=YD.updateView=function(e,t,i){var n,o,a;t.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,E(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===n)?"emphasis":"normal")})},YD.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return E(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},YD.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},QT("brush",XD),vf(function(t,e){var i=t&&t.brush;if(O(i)||(i=i?[i]:[]),i.length){var n=[];E(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;O(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),function(i){var e={};E(i,function(t){e[t]=1}),i.length=0,E(e,function(t,e){i.push(e)})}(s),e&&!s.length&&s.push.apply(s,MD)}}),If({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Tf({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,o=t.getModel("textStyle"),a=t.getModel("subtextStyle"),r=t.get("textAlign"),s=H(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Ur({style:nl({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Ur({style:nl({},a,{text:h,textFill:a.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=wu(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new rs({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(w)}}});function jD(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),a={normal:1,emphasis:1};E(n,function(t,e){a[e]||qD(o,e)||(o[e]=t)}),i.label&&!qD(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function qD(t,e){return t.hasOwnProperty(e)}Lu.registerSubTypeDefaulter("timeline",function(){return"slider"}),xf({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),D({currentIndex:i.option.currentIndex},t)}),xf({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var KD=Lu.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){KD.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,o=this._names=[];if("category"===i){var a=[];E(e,function(t,e){var i,n=Wo(t);z(t)?(i=L(t)).value=e:i=e,a.push(i),R(n)||null!=n&&!isNaN(n)||(n=""),o.push(n+"")}),e=a}var n={category:"ordinal",time:"time"}[i]||"number";(this._data=new Xf([{name:"value",type:n}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});b(KD.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Uh);function $D(t,e,i,n){Vg.call(this,t,e,i),this.type=n||"value",this.model=null}var JD=pc.extend({type:"timeline"});$D.prototype={constructor:$D,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},w($D,Vg);var QD=A,tC=E,eC=Math.PI;function iC(t,e,i,n,o,a){var r=e.get("color");o?(o.setColor(r),i.add(o),a&&a.onUpdate(o)):((o=_g(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),i.add(o),a&&a.onCreate(o));var s=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(s),n=m({rectHover:!0,z2:100},n,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,n.scale=l;var u=t.get("symbolOffset");if(u){var h=n.position=n.position||[0,0];h[0]+=Rl(u[0],l[0]),h[1]+=Rl(u[1],l[1])}var c=t.get("symbolRotate");return n.rotation=(c||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function nC(t,e,i,n,o){if(!t.dragging){var a=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}JD.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,i,n){if(this.model=e,this.api=i,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var o=this._layout(e,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,e);e.formatTooltip=function(t){return au(s.scale.getLabel(t))},tC(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](o,a,s,e)},this),this._renderAxisLabel(o,r,s,e),this._position(o,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=function(t,e){return wu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2n[1]&&(i=n[1]),i"),o&&(a+=aC(o),null!=i&&(a+=" : ")),null!=i&&(a+=aC(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});b(sC,Uh),sC.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var lC=_;function uC(t,e,i,n,o,a){var r=[],s=dp(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=mC(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(i,u),r[a]=e.get(s,u);var h=e.get(n,u),c=Vl(e.get(n,u));return 0<=(c=Math.min(c,20))&&(r[a]=+r[a].toFixed(c)),[r,h]}var hC=T,cC={min:hC(uC,"min"),max:hC(uC,"max"),average:hC(uC,"average")};function dC(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!O(e.coord)&&n){var o=n.dimensions,a=fC(e,i,n,t);if((e=L(e)).type&&cC[e.type]&&a.baseAxis&&a.valueAxis){var r=lC(o,a.baseAxis.dim),s=lC(o,a.valueAxis.dim),l=cC[e.type](i,a.baseDataDim,a.valueDataDim,r,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)cC[u[h]]&&(u[h]=mC(i,i.mapDimension(o[h]),u[h]));e.coord=u}}return e}function fC(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var o=0;oi[o],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=H(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[n]+=i[o]-c[o]:p[n]+=c[o]+m);g[1-n]+=h[a]/2-c[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[o]=d?i[o]:h[o],v[a]=Math.max(h[a],c[a]),v[r]=Math.min(0,c[r]+g[1-n]),l.__rectSize=i[o],d){var y={x:0,y:0};y[o]=Math.max(i[o]-c[o]-m,0),y[a]=v[a],l.setClipPath(new rs({shape:y})),l.__rectSize=y[o]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&cl(s,{position:x.contentPosition},d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(n,o){var a=this._controllerGroup;E(["pagePrev","pageNext"],function(t){var e=null!=o[t+"DataIndex"],i=a.childOfName(t);i&&(i.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),i.cursor=e?"pointer":"default")});var t=a.childOfName("pageText"),e=n.get("pageFormatter"),i=o.pageIndex,r=null!=i?i+1:0,s=o.pageCount;t&&e&&t.setStyle("text",R(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,a=UC[o],r=XC[o],s=this._findTargetItemIndex(e),l=i.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[o]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=h;++p)(!(v=y(l[p]))&&m.e>g.s+n||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;-1<=p;--p)(v=y(l[p]))&&x(m,v.s)||!(g.i=e&&t.s<=e+n}},_findTargetItemIndex:function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){var i=t.__legendDataIndex;null==a&&null!=i&&(a=e),i===n&&(o=e)}),null!=o?o:a):0;var o,a}});xf("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})});JA.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var jC=rs,qC=El,KC=Bl,$C=A,JC=E,QC="horizontal",tL="vertical",eL=["line","bar","candlestick","scatter"],iL=eD.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){iL.superApply(this,"render",arguments),Lc(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){iL.superApply(this,"remove",arguments),kc(this,"_dispatchZoomAction")},dispose:function(){iL.superApply(this,"dispose",arguments),kc(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Ci;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===QC?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Mu(t.option);E(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=wu(a,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===tL&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),a=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==QC||o?i===QC&&o?{scale:r?[-1,1]:[-1,-1]}:i!==tL||o?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new jC({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new jC({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:A(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=n.getDataExtent(o),r=.3*(a[1]-a[0]);a=[a[0]-r,a[1]+r];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],d=u[1]/(n.count()-1),f=0,p=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(0e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var i;if(JC(this.getTargetCoordInfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinateSystem;i=e.getRect&&e.getRect()}}),!i){var t=this.api.getWidth(),e=this.api.getHeight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function nL(t){return"vertical"===t?"ns-resize":"ew-resize"}JA.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var oL="\0_ec_dataZoom_roams";function aL(t,n){var e=sL(t),o=n.dataZoomId,a=n.coordId;E(e,function(t,e){var i=t.dataZoomInfos;i[o]&&_(n.allCoordIds,a)<0&&(delete i[o],t.count--)}),lL(e);var i=e[a];i||((i=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(t,r){var e=new zy(t.getZr());return E(["pan","zoom","scrollMove"],function(a){e.on(a,function(n){var o=[];E(r.dataZoomInfos,function(t){if(n.isAvailableBehavior(t.dataZoomModel.option)){var e=(t.getRange||{})[a],i=e&&e(r.controller,n);!t.dataZoomModel.get("disabled",!0)&&i&&o.push({dataZoomId:t.dataZoomId,start:i[0],end:i[1]})}}),o.length&&r.dispatchAction(o)})}),e}(t,i),i.dispatchAction=T(uL,t)),i.dataZoomInfos[o]||i.count++,i.dataZoomInfos[o]=n;var r=function(t){var n,o={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return E(t,function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");o["type_"+n]"],O(t)&&(t=t.slice(),n=!0),o=e?t:n?[u(t[0]),u(t[1])]:u(t),R(l)?l.replace("{value}",n?o[0]:o).replace("{value2}",n?o[1]:o):C(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+o[1]:t[1]===s[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=TL([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;0<=o;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),o=e.controller||(e.controller={});m(n,i),m(o,i);var u=this.isCategory();function a(n){ML(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")},IL(this.stateList,function(t){var e=n[t];if(R(e)){var i=_L(e,"active",u);i?(n[t]={},n[t][e]=i):delete n[t]}},this)}a.call(this,n),a.call(this,o),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},IL(n,function(t,e){if(f_.isValidType(e)){var i=_L(e,"inactive",u);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,n,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");IL(this.stateList,function(t){var e=this.itemSize,i=a[t];null==(i=i||(a[t]={color:u?l:[l]})).symbol&&(i.symbol=r&&L(r)||(u?"roundRect":["roundRect"])),null==i.symbolSize&&(i.symbolSize=s&&L(s)||(u?e[0]:[e[0],e[0]])),i.symbol=bL(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var n=i.symbolSize;if(null!=n){var o=-1/0;SL(n,function(t){oe[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){DL.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Bl((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(n){var o=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){n[0]<=t&&t<=n[1]&&i.push(e)},this),o.push({seriesId:t.id,dataIndex:i})},this),o},getVisualMeta:function(i){var t=kL(this,"outOfRange",this.getExtent()),e=kL(this,"inRange",this.option.range.slice()),n=[];function o(t,e){n.push({value:t,color:i(t,e)})}for(var a=0,r=0,s=e.length,l=t.length;rt[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new Ci("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(n,o){if(this._useHandle){var a=this._shapes,r=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels;RL([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=n[t];var i=pl(a.handleLabelPoints[t],fl(e,this.group));l[t].setStyle({x:i[0],y:i[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",a.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=EL(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",function(t,e,i,n){return t?[[0,-zL(e,BL(i,0))],[6,0],[0,zL(e,BL(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});h.setStyle("fill",c);var d=pl(u.indicatorLabelPoint,fl(h,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var n=this;this._shapes.barGroup.on("mousemove",function(t){if(n._hovering=!0,!n._dragging){var e=n.visualMapModel.itemSize,i=n._applyTransform([t.offsetX,t.offsetY],n._shapes.barGroup,!0,!0);i[1]=zL(BL(0,i[1]),e[1]),n._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=e[0])}}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=zL(BL(o[0],t),o[1]);var r=function(t,e,i){var n=6,o=t.get("hoverLinkDataSize");o&&(n=EL(o,e,i,!0)/2);return n}(i,a,o),s=[t-r,t+r],l=EL(t,o,a,!0),u=[EL(s[0],o,a,!0),EL(s[1],o,a,!0)];s[0] ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||FL(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=function(t,e){var i={},n={};return o(t||[],i),o(e||[],n,i),[a(i),a(n)];function o(t,e,i){for(var n=0,o=t.length;ni&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:a,outerColors:r}}function n(t,e){var i=s.getRepresentValue({interval:t});e=e||s.getValueState(i);var n=o(i,e);t[0]===-1/0?r[0]=n:t[1]===1/0?r[1]=n:a.push({value:t[0],color:n},{value:t[1],color:n})}}}),ZL={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};function UL(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}PL.extend({type:"visualMap.piecewise",doRender:function(){var a=this.group;a.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),i=e.endsText,d=W(r.get("showLabel",!0),!i);i&&this._renderEndsText(a,i[0],c,d,h),E(e.viewPieceList,function(t){var e=t.piece,i=new Ci;i.onclick=A(this._onItemClick,this,e),this._enableHoverLink(i,t.indexInModelPieceList);var n=r.getRepresentValue(e);if(this._createItemSymbol(i,n,[0,0,c[0],c[1]]),d){var o=this.visualMapModel.getValueState(n);i.add(new Ur({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===o?.5:1}}))}a.add(i)},this),i&&this._renderEndsText(a,i[1],c,d,h),_u(r.get("orient"),a,r.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},_enableHoverLink:function(t,i){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:OL(e.findTargetDataIndices(i),e)})}t.on("mouseover",A(e,this,"highlight")).on("mouseout",A(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return NL(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new Ci,r=this.visualMapModel.textStyleModel;a.add(new Ur({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=N(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i=i&&i.slice().reverse(),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(_g(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=L(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[o]=!0,E(n,function(t,e){n[e]=e===o})):n[o]=!n[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});vf(pL);var XL,YL="urn:schemas-microsoft-com:vml",jL="undefined"==typeof window?null:window,qL=!1,KL=jL&&jL.document;function $L(t){return XL(t)}if(KL&&!v.canvasSupported)try{KL.namespaces.zrvml||KL.namespaces.add("zrvml",YL),XL=function(t){return KL.createElement("')}}catch(t){XL=function(t){return KL.createElement("<"+t+' xmlns="'+YL+'" class="zrvml">')}}var JL,QL=rr.CMD,tk=Math.round,ek=Math.sqrt,ik=Math.abs,nk=Math.cos,ok=Math.sin,ak=Math.max;if(!v.canvasSupported){var rk=",",sk="progid:DXImageTransform.Microsoft",lk=21600,uk=lk/2,hk=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=lk+","+lk,t.coordorigin="0,0"},ck=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},dk=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},fk=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},pk=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},gk=Yn,mk=function(t,e,i){var n=Fe(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=ck(n[0],n[1],n[2]),t.opacity=i*n[3])},vk=function(t,e,i,n){var o="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof cs&&fk(t,a),a=a||$L(e),o?function(t,e,i){var n,o,a=e.fill;if(null!=a)if(a instanceof cs){var r,s=0,l=[0,0],u=0,h=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===a.type){r="gradient";var p=i.transform,g=[a.x*d,a.y*f],m=[a.x2*d,a.y2*f];p&&(bt(g,g,p),bt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{r="gradientradial";g=[a.x*d,a.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&bt(g,g,p),_/=x[0]*lk,w/=x[1]*lk;var b=ak(_,w);u=0/b,h=2*a.r/b-u}var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],T=[],A=0;A=c&&d<=i+1){for(var n=[],o=0;o=c&&d<=o+1)return rP(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var r=a();if(r)return r}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1