@lingshugroup/web-plus 1.8.7 → 1.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapLayer/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapLayer/index.js +47 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapLayer/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapLayer/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapSeries/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapSeries/index.js +46 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapSeries/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapSeries/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapView/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapView/index.js +159 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapView/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/HeatmapView/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/install/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/install/index.js +11 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousModel/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousModel/index.js +113 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousModel/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousModel/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousView/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousView/index.js +388 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousView/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/ContinuousView/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseModel/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseModel/index.js +220 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseModel/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseModel/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseView/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseView/index.js +120 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseView/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/PiecewiseView/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapModel/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapModel/index.js +166 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapModel/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapModel/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapView/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapView/index.js +81 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapView/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/VisualMapView/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/helper/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/helper/index.js +28 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/helper/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/helper/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/install/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/install/index.js +12 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/installCommon/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/installCommon/index.js +18 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/installVisualMapContinuous/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/installVisualMapContinuous/index.js +12 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/installVisualMapPiecewise/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/installVisualMapPiecewise/index.js +12 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/preprocessor/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/preprocessor/index.js +24 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/visualEncoding/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/visualEncoding/index.js +54 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/visualEncoding/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/visualEncoding/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/visualMapAction/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/component/visualMap/visualMapAction/index.js +19 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/model/index.cjs +1 -1
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/model/index.js +199 -165
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/model/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/model/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/number/index.cjs +1 -1
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/number/index.js +129 -113
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/number/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/util/number/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/VisualMapping/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/VisualMapping/index.js +278 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/VisualMapping/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/VisualMapping/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/helper/index.cjs +1 -1
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/helper/index.js +30 -10
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/helper/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/helper/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/visualDefault/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/visualDefault/index.js +48 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/visualSolution/index.cjs +1 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/visualSolution/index.js +81 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/visualSolution/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/visual/visualSolution/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/zrender@5.6.1/node_modules/zrender/lib/tool/color/index.cjs +1 -1
- package/lib/node_modules/.pnpm/zrender@5.6.1/node_modules/zrender/lib/tool/color/index.js +165 -123
- package/lib/node_modules/.pnpm/zrender@5.6.1/node_modules/zrender/lib/tool/color/index.js.br +0 -0
- package/lib/node_modules/.pnpm/zrender@5.6.1/node_modules/zrender/lib/tool/color/index.js.gz +0 -0
- package/lib/packages/ls-components/components/chart/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/chart/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/chart/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/chart/Index.vue/index2.js +17 -13
- package/lib/packages/ls-components/components/chart/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/chart/Index.vue/index2.js.gz +0 -0
- package/package.json +1 -1
package/lib/index.css.br
CHANGED
|
Binary file
|
package/lib/index.css.gz
CHANGED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var L=Object.defineProperty;var S=(v,t)=>L(v,"name",{value:t,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/platform/index.cjs");var D=256,G=function(){function v(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=b.platformApi.createCanvas();this.canvas=t}return S(v,"HeatmapLayer"),v.prototype.update=function(t,e,r,a,h,l){var u=this._getBrush(),_=this._getGradient(h,"inRange"),w=this._getGradient(h,"outOfRange"),m=this.pointSize+this.blurSize,i=this.canvas,p=i.getContext("2d"),O=t.length;i.width=e,i.height=r;for(var f=0;f<O;++f){var d=t[f],C=d[0],z=d[1],R=d[2],n=a(R);p.globalAlpha=n,p.drawImage(u,C-m,z-m)}if(!i.width||!i.height)return i;for(var y=p.getImageData(0,0,i.width,i.height),o=y.data,s=0,P=o.length,x=this.minOpacity,I=this.maxOpacity,A=I-x;s<P;){var n=o[s+3]/256,g=Math.floor(n*(D-1))*4;if(n>0){var c=l(n)?_:w;n>0&&(n=n*A+x),o[s++]=c[g],o[s++]=c[g+1],o[s++]=c[g+2],o[s++]=c[g+3]*n*256}else s+=4}return p.putImageData(y,0,0),i},v.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=b.platformApi.createCanvas()),e=this.pointSize+this.blurSize,r=e*2;t.width=r,t.height=r;var a=t.getContext("2d");return a.clearRect(0,0,r,r),a.shadowOffsetX=r,a.shadowBlur=this.blurSize,a.shadowColor="#000",a.beginPath(),a.arc(-e,e,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),t},v.prototype._getGradient=function(t,e){for(var r=this._gradientPixels,a=r[e]||(r[e]=new Uint8ClampedArray(256*4)),h=[0,0,0,0],l=0,u=0;u<256;u++)t[e](u/255,!0,h),a[l++]=h[0],a[l++]=h[1],a[l++]=h[2],a[l++]=h[3];return a},v}();exports.default=G;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var A = Object.defineProperty;
|
|
2
|
+
var S = (v, t) => A(v, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { platformApi as b } from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/platform/index.js";
|
|
4
|
+
var D = 256, E = (
|
|
5
|
+
/** @class */
|
|
6
|
+
function() {
|
|
7
|
+
function v() {
|
|
8
|
+
this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {
|
|
9
|
+
inRange: null,
|
|
10
|
+
outOfRange: null
|
|
11
|
+
};
|
|
12
|
+
var t = b.createCanvas();
|
|
13
|
+
this.canvas = t;
|
|
14
|
+
}
|
|
15
|
+
return S(v, "HeatmapLayer"), v.prototype.update = function(t, e, r, a, h, o) {
|
|
16
|
+
var u = this._getBrush(), w = this._getGradient(h, "inRange"), _ = this._getGradient(h, "outOfRange"), m = this.pointSize + this.blurSize, i = this.canvas, p = i.getContext("2d"), C = t.length;
|
|
17
|
+
i.width = e, i.height = r;
|
|
18
|
+
for (var f = 0; f < C; ++f) {
|
|
19
|
+
var d = t[f], O = d[0], z = d[1], R = d[2], n = a(R);
|
|
20
|
+
p.globalAlpha = n, p.drawImage(u, O - m, z - m);
|
|
21
|
+
}
|
|
22
|
+
if (!i.width || !i.height)
|
|
23
|
+
return i;
|
|
24
|
+
for (var x = p.getImageData(0, 0, i.width, i.height), l = x.data, s = 0, I = l.length, y = this.minOpacity, P = this.maxOpacity, L = P - y; s < I; ) {
|
|
25
|
+
var n = l[s + 3] / 256, g = Math.floor(n * (D - 1)) * 4;
|
|
26
|
+
if (n > 0) {
|
|
27
|
+
var c = o(n) ? w : _;
|
|
28
|
+
n > 0 && (n = n * L + y), l[s++] = c[g], l[s++] = c[g + 1], l[s++] = c[g + 2], l[s++] = c[g + 3] * n * 256;
|
|
29
|
+
} else
|
|
30
|
+
s += 4;
|
|
31
|
+
}
|
|
32
|
+
return p.putImageData(x, 0, 0), i;
|
|
33
|
+
}, v.prototype._getBrush = function() {
|
|
34
|
+
var t = this._brushCanvas || (this._brushCanvas = b.createCanvas()), e = this.pointSize + this.blurSize, r = e * 2;
|
|
35
|
+
t.width = r, t.height = r;
|
|
36
|
+
var a = t.getContext("2d");
|
|
37
|
+
return a.clearRect(0, 0, r, r), a.shadowOffsetX = r, a.shadowBlur = this.blurSize, a.shadowColor = "#000", a.beginPath(), a.arc(-e, e, this.pointSize, 0, Math.PI * 2, !0), a.closePath(), a.fill(), t;
|
|
38
|
+
}, v.prototype._getGradient = function(t, e) {
|
|
39
|
+
for (var r = this._gradientPixels, a = r[e] || (r[e] = new Uint8ClampedArray(256 * 4)), h = [0, 0, 0, 0], o = 0, u = 0; u < 256; u++)
|
|
40
|
+
t[e](u / 255, !0, h), a[o++] = h[0], a[o++] = h[1], a[o++] = h[2], a[o++] = h[3];
|
|
41
|
+
return a;
|
|
42
|
+
}, v;
|
|
43
|
+
}()
|
|
44
|
+
);
|
|
45
|
+
export {
|
|
46
|
+
E as default
|
|
47
|
+
};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var n=Object.defineProperty;var i=(r,e)=>n(r,"name",{value:e,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6/index.cjs"),a=require("../../../model/Series/index.cjs"),s=require("../../helper/createSeriesData/index.cjs"),l=require("../../../core/CoordinateSystem/index.cjs");var d=function(r){o.__extends(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return i(e,"HeatmapSeriesModel"),e.prototype.getInitialData=function(t,u){return s.default(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=l.default.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(a.default);exports.default=d;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var i = Object.defineProperty;
|
|
2
|
+
var o = (r, e) => i(r, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { __extends as n } from "../../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6/index.js";
|
|
4
|
+
import a from "../../../model/Series/index.js";
|
|
5
|
+
import s from "../../helper/createSeriesData/index.js";
|
|
6
|
+
import d from "../../../core/CoordinateSystem/index.js";
|
|
7
|
+
var f = (
|
|
8
|
+
/** @class */
|
|
9
|
+
function(r) {
|
|
10
|
+
n(e, r);
|
|
11
|
+
function e() {
|
|
12
|
+
var t = r !== null && r.apply(this, arguments) || this;
|
|
13
|
+
return t.type = e.type, t;
|
|
14
|
+
}
|
|
15
|
+
return o(e, "HeatmapSeriesModel"), e.prototype.getInitialData = function(t, m) {
|
|
16
|
+
return s(null, this, {
|
|
17
|
+
generateCoord: "value"
|
|
18
|
+
});
|
|
19
|
+
}, e.prototype.preventIncremental = function() {
|
|
20
|
+
var t = d.get(this.get("coordinateSystem"));
|
|
21
|
+
if (t && t.dimensions)
|
|
22
|
+
return t.dimensions[0] === "lng" && t.dimensions[1] === "lat";
|
|
23
|
+
}, e.type = "series.heatmap", e.dependencies = ["grid", "geo", "calendar"], e.defaultOption = {
|
|
24
|
+
coordinateSystem: "cartesian2d",
|
|
25
|
+
// zlevel: 0,
|
|
26
|
+
z: 2,
|
|
27
|
+
// Cartesian coordinate system
|
|
28
|
+
// xAxisIndex: 0,
|
|
29
|
+
// yAxisIndex: 0,
|
|
30
|
+
// Geo coordinate system
|
|
31
|
+
geoIndex: 0,
|
|
32
|
+
blurSize: 30,
|
|
33
|
+
pointSize: 20,
|
|
34
|
+
maxOpacity: 1,
|
|
35
|
+
minOpacity: 0,
|
|
36
|
+
select: {
|
|
37
|
+
itemStyle: {
|
|
38
|
+
borderColor: "#212121"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}, e;
|
|
42
|
+
}(a)
|
|
43
|
+
);
|
|
44
|
+
export {
|
|
45
|
+
f as default
|
|
46
|
+
};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var k=Object.defineProperty;var I=(o,t)=>k(o,"name",{value:t,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("../../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6/index.cjs"),j=require("../../../util/graphic/index.cjs"),F=require("../../../util/states/index.cjs"),J=require("../HeatmapLayer/index.cjs"),K=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/util/index.cjs"),Q=require("../../../view/Chart/index.cjs"),U=require("../../../coord/CoordinateSystem/index.cjs"),G=require("../../../label/labelStyle/index.cjs"),B=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/shape/Rect/index.cjs"),Z=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/Image/index.cjs");function $(o,t,e){var n=o[1]-o[0];t=K.map(t,function(r){return{interval:[(r.interval[0]-o[0])/n,(r.interval[1]-o[0])/n]}});var i=t.length,u=0;return function(r){var a;for(a=u;a<i;a++){var l=t[a].interval;if(l[0]<=r&&r<=l[1]){u=a;break}}if(a===i)for(a=u-1;a>=0;a--){var l=t[a].interval;if(l[0]<=r&&r<=l[1]){u=a;break}}return a>=0&&a<i&&e[a]}}I($,"getIsInPiecewiseRange");function X(o,t){var e=o[1]-o[0];return t=[(t[0]-o[0])/e,(t[1]-o[0])/e],function(n){return n>=t[0]&&n<=t[1]}}I(X,"getIsInContinuousRange");function W(o){var t=o.dimensions;return t[0]==="lng"&&t[1]==="lat"}I(W,"isGeoCoordSys");var Y=function(o){x.__extends(t,o);function t(){var e=o!==null&&o.apply(this,arguments)||this;return e.type=t.type,e}return I(t,"HeatmapView"),t.prototype.render=function(e,n,i){var u;if(n.eachComponent("visualMap",function(a){a.eachTargetSeries(function(l){l===e&&(u=a)})}),process.env.NODE_ENV!=="production"&&!u)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var r=e.coordinateSystem;r.type==="cartesian2d"||r.type==="calendar"?this._renderOnCartesianAndCalendar(e,i,0,e.getData().count()):W(r)&&this._renderOnGeo(r,e,u,i)},t.prototype.incrementalPrepareRender=function(e,n,i){this.group.removeAll()},t.prototype.incrementalRender=function(e,n,i,u){var r=n.coordinateSystem;r&&(W(r)?this.render(n,i,u):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,u,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){j.traverseElements(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,n,i,u,r){var a=e.coordinateSystem,l=U.isCoordinateSystemType(a,"cartesian2d"),m,v,d,y;if(l){var c=a.getAxis("x"),f=a.getAxis("y");if(process.env.NODE_ENV!=="production"){if(!(c.type==="category"&&f.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(c.onBand&&f.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}m=c.getBandWidth()+.5,v=f.getBandWidth()+.5,d=c.scale.getExtent(),y=f.scale.getExtent()}for(var H=this.group,s=e.getData(),S=e.getModel(["emphasis","itemStyle"]).getItemStyle(),O=e.getModel(["blur","itemStyle"]).getItemStyle(),C=e.getModel(["select","itemStyle"]).getItemStyle(),b=e.get(["itemStyle","borderRadius"]),E=G.getLabelStatesModels(e),w=e.getModel("emphasis"),_=w.get("focus"),N=w.get("blurScope"),q=w.get("disabled"),h=l?[s.mapDimension("x"),s.mapDimension("y"),s.mapDimension("value")]:[s.mapDimension("time"),s.mapDimension("value")],p=i;p<u;p++){var g=void 0,z=s.getItemVisual(p,"style");if(l){var D=s.get(h[0],p),T=s.get(h[1],p);if(isNaN(s.get(h[2],p))||isNaN(D)||isNaN(T)||D<d[0]||D>d[1]||T<y[0]||T>y[1])continue;var L=a.dataToPoint([D,T]);g=new B.default({shape:{x:L[0]-m/2,y:L[1]-v/2,width:m,height:v},style:z})}else{if(isNaN(s.get(h[1],p)))continue;g=new B.default({z2:1,shape:a.dataToRect([s.get(h[0],p)]).contentShape,style:z})}if(s.hasItemOption){var R=s.getItemModel(p),V=R.getModel("emphasis");S=V.getModel("itemStyle").getItemStyle(),O=R.getModel(["blur","itemStyle"]).getItemStyle(),C=R.getModel(["select","itemStyle"]).getItemStyle(),b=R.get(["itemStyle","borderRadius"]),_=V.get("focus"),N=V.get("blurScope"),q=V.get("disabled"),E=G.getLabelStatesModels(R)}g.shape.r=b;var P=e.getRawValue(p),A="-";P&&P[2]!=null&&(A=P[2]+""),G.setLabelStyle(g,E,{labelFetcher:e,labelDataIndex:p,defaultOpacity:z.opacity,defaultText:A}),g.ensureState("emphasis").style=S,g.ensureState("blur").style=O,g.ensureState("select").style=C,F.toggleHoverEmphasis(g,_,N,q),g.incremental=r,r&&(g.states.emphasis.hoverLayer=!0),H.add(g),s.setItemGraphicEl(p,g),this._progressiveEls&&this._progressiveEls.push(g)}},t.prototype._renderOnGeo=function(e,n,i,u){var r=i.targetVisuals.inRange,a=i.targetVisuals.outOfRange,l=n.getData(),m=this._hmLayer||this._hmLayer||new J.default;m.blurSize=n.get("blurSize"),m.pointSize=n.get("pointSize"),m.minOpacity=n.get("minOpacity"),m.maxOpacity=n.get("maxOpacity");var v=e.getViewRect().clone(),d=e.getRoamTransform();v.applyTransform(d);var y=Math.max(v.x,0),c=Math.max(v.y,0),f=Math.min(v.width+v.x,u.getWidth()),H=Math.min(v.height+v.y,u.getHeight()),s=f-y,S=H-c,O=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],C=l.mapArray(O,function(_,N,q){var h=e.dataToPoint([_,N]);return h[0]-=y,h[1]-=c,h.push(q),h}),b=i.getExtent(),E=i.type==="visualMap.continuous"?X(b,i.option.range):$(b,i.getPieceList(),i.option.selected);m.update(C,s,S,r.color.getNormalizer(),{inRange:r.color.getColorMapper(),outOfRange:a.color.getColorMapper()},E);var w=new Z.default({style:{width:s,height:S,x:y,y:c,image:m.canvas},silent:!0});this.group.add(w)},t.type="heatmap",t}(Q.default);exports.default=Y;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
var k = Object.defineProperty;
|
|
2
|
+
var I = (o, e) => k(o, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { __extends as F } from "../../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6/index.js";
|
|
4
|
+
import { traverseElements as Z } from "../../../util/graphic/index.js";
|
|
5
|
+
import { toggleHoverEmphasis as j } from "../../../util/states/index.js";
|
|
6
|
+
import q from "../HeatmapLayer/index.js";
|
|
7
|
+
import { map as J } from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/util/index.js";
|
|
8
|
+
import K from "../../../view/Chart/index.js";
|
|
9
|
+
import { isCoordinateSystemType as Q } from "../../../coord/CoordinateSystem/index.js";
|
|
10
|
+
import { getLabelStatesModels as L, setLabelStyle as U } from "../../../label/labelStyle/index.js";
|
|
11
|
+
import x from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/shape/Rect/index.js";
|
|
12
|
+
import $ from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/Image/index.js";
|
|
13
|
+
function X(o, e, t) {
|
|
14
|
+
var n = o[1] - o[0];
|
|
15
|
+
e = J(e, function(r) {
|
|
16
|
+
return {
|
|
17
|
+
interval: [(r.interval[0] - o[0]) / n, (r.interval[1] - o[0]) / n]
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
var i = e.length, m = 0;
|
|
21
|
+
return function(r) {
|
|
22
|
+
var a;
|
|
23
|
+
for (a = m; a < i; a++) {
|
|
24
|
+
var p = e[a].interval;
|
|
25
|
+
if (p[0] <= r && r <= p[1]) {
|
|
26
|
+
m = a;
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (a === i)
|
|
31
|
+
for (a = m - 1; a >= 0; a--) {
|
|
32
|
+
var p = e[a].interval;
|
|
33
|
+
if (p[0] <= r && r <= p[1]) {
|
|
34
|
+
m = a;
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return a >= 0 && a < i && t[a];
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
I(X, "getIsInPiecewiseRange");
|
|
42
|
+
function Y(o, e) {
|
|
43
|
+
var t = o[1] - o[0];
|
|
44
|
+
return e = [(e[0] - o[0]) / t, (e[1] - o[0]) / t], function(n) {
|
|
45
|
+
return n >= e[0] && n <= e[1];
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
I(Y, "getIsInContinuousRange");
|
|
49
|
+
function W(o) {
|
|
50
|
+
var e = o.dimensions;
|
|
51
|
+
return e[0] === "lng" && e[1] === "lat";
|
|
52
|
+
}
|
|
53
|
+
I(W, "isGeoCoordSys");
|
|
54
|
+
var gt = (
|
|
55
|
+
/** @class */
|
|
56
|
+
function(o) {
|
|
57
|
+
F(e, o);
|
|
58
|
+
function e() {
|
|
59
|
+
var t = o !== null && o.apply(this, arguments) || this;
|
|
60
|
+
return t.type = e.type, t;
|
|
61
|
+
}
|
|
62
|
+
return I(e, "HeatmapView"), e.prototype.render = function(t, n, i) {
|
|
63
|
+
var m;
|
|
64
|
+
if (n.eachComponent("visualMap", function(a) {
|
|
65
|
+
a.eachTargetSeries(function(p) {
|
|
66
|
+
p === t && (m = a);
|
|
67
|
+
});
|
|
68
|
+
}), process.env.NODE_ENV !== "production" && !m)
|
|
69
|
+
throw new Error("Heatmap must use with visualMap");
|
|
70
|
+
this._progressiveEls = null, this.group.removeAll();
|
|
71
|
+
var r = t.coordinateSystem;
|
|
72
|
+
r.type === "cartesian2d" || r.type === "calendar" ? this._renderOnCartesianAndCalendar(t, i, 0, t.getData().count()) : W(r) && this._renderOnGeo(r, t, m, i);
|
|
73
|
+
}, e.prototype.incrementalPrepareRender = function(t, n, i) {
|
|
74
|
+
this.group.removeAll();
|
|
75
|
+
}, e.prototype.incrementalRender = function(t, n, i, m) {
|
|
76
|
+
var r = n.coordinateSystem;
|
|
77
|
+
r && (W(r) ? this.render(n, i, m) : (this._progressiveEls = [], this._renderOnCartesianAndCalendar(n, m, t.start, t.end, !0)));
|
|
78
|
+
}, e.prototype.eachRendered = function(t) {
|
|
79
|
+
Z(this._progressiveEls || this.group, t);
|
|
80
|
+
}, e.prototype._renderOnCartesianAndCalendar = function(t, n, i, m, r) {
|
|
81
|
+
var a = t.coordinateSystem, p = Q(a, "cartesian2d"), v, u, S, f;
|
|
82
|
+
if (p) {
|
|
83
|
+
var y = a.getAxis("x"), c = a.getAxis("y");
|
|
84
|
+
if (process.env.NODE_ENV !== "production") {
|
|
85
|
+
if (!(y.type === "category" && c.type === "category"))
|
|
86
|
+
throw new Error("Heatmap on cartesian must have two category axes");
|
|
87
|
+
if (!(y.onBand && c.onBand))
|
|
88
|
+
throw new Error("Heatmap on cartesian must have two axes with boundaryGap true");
|
|
89
|
+
}
|
|
90
|
+
v = y.getBandWidth() + 0.5, u = c.getBandWidth() + 0.5, S = y.scale.getExtent(), f = c.scale.getExtent();
|
|
91
|
+
}
|
|
92
|
+
for (var z = this.group, s = t.getData(), d = t.getModel(["emphasis", "itemStyle"]).getItemStyle(), O = t.getModel(["blur", "itemStyle"]).getItemStyle(), E = t.getModel(["select", "itemStyle"]).getItemStyle(), b = t.get(["itemStyle", "borderRadius"]), C = L(t), w = t.getModel("emphasis"), N = w.get("focus"), _ = w.get("blurScope"), D = w.get("disabled"), h = p ? [s.mapDimension("x"), s.mapDimension("y"), s.mapDimension("value")] : [s.mapDimension("time"), s.mapDimension("value")], l = i; l < m; l++) {
|
|
93
|
+
var g = void 0, G = s.getItemVisual(l, "style");
|
|
94
|
+
if (p) {
|
|
95
|
+
var V = s.get(h[0], l), T = s.get(h[1], l);
|
|
96
|
+
if (isNaN(s.get(h[2], l)) || isNaN(V) || isNaN(T) || V < S[0] || V > S[1] || T < f[0] || T > f[1])
|
|
97
|
+
continue;
|
|
98
|
+
var A = a.dataToPoint([V, T]);
|
|
99
|
+
g = new x({
|
|
100
|
+
shape: {
|
|
101
|
+
x: A[0] - v / 2,
|
|
102
|
+
y: A[1] - u / 2,
|
|
103
|
+
width: v,
|
|
104
|
+
height: u
|
|
105
|
+
},
|
|
106
|
+
style: G
|
|
107
|
+
});
|
|
108
|
+
} else {
|
|
109
|
+
if (isNaN(s.get(h[1], l)))
|
|
110
|
+
continue;
|
|
111
|
+
g = new x({
|
|
112
|
+
z2: 1,
|
|
113
|
+
shape: a.dataToRect([s.get(h[0], l)]).contentShape,
|
|
114
|
+
style: G
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
if (s.hasItemOption) {
|
|
118
|
+
var R = s.getItemModel(l), H = R.getModel("emphasis");
|
|
119
|
+
d = H.getModel("itemStyle").getItemStyle(), O = R.getModel(["blur", "itemStyle"]).getItemStyle(), E = R.getModel(["select", "itemStyle"]).getItemStyle(), b = R.get(["itemStyle", "borderRadius"]), N = H.get("focus"), _ = H.get("blurScope"), D = H.get("disabled"), C = L(R);
|
|
120
|
+
}
|
|
121
|
+
g.shape.r = b;
|
|
122
|
+
var P = t.getRawValue(l), B = "-";
|
|
123
|
+
P && P[2] != null && (B = P[2] + ""), U(g, C, {
|
|
124
|
+
labelFetcher: t,
|
|
125
|
+
labelDataIndex: l,
|
|
126
|
+
defaultOpacity: G.opacity,
|
|
127
|
+
defaultText: B
|
|
128
|
+
}), g.ensureState("emphasis").style = d, g.ensureState("blur").style = O, g.ensureState("select").style = E, j(g, N, _, D), g.incremental = r, r && (g.states.emphasis.hoverLayer = !0), z.add(g), s.setItemGraphicEl(l, g), this._progressiveEls && this._progressiveEls.push(g);
|
|
129
|
+
}
|
|
130
|
+
}, e.prototype._renderOnGeo = function(t, n, i, m) {
|
|
131
|
+
var r = i.targetVisuals.inRange, a = i.targetVisuals.outOfRange, p = n.getData(), v = this._hmLayer || this._hmLayer || new q();
|
|
132
|
+
v.blurSize = n.get("blurSize"), v.pointSize = n.get("pointSize"), v.minOpacity = n.get("minOpacity"), v.maxOpacity = n.get("maxOpacity");
|
|
133
|
+
var u = t.getViewRect().clone(), S = t.getRoamTransform();
|
|
134
|
+
u.applyTransform(S);
|
|
135
|
+
var f = Math.max(u.x, 0), y = Math.max(u.y, 0), c = Math.min(u.width + u.x, m.getWidth()), z = Math.min(u.height + u.y, m.getHeight()), s = c - f, d = z - y, O = [p.mapDimension("lng"), p.mapDimension("lat"), p.mapDimension("value")], E = p.mapArray(O, function(N, _, D) {
|
|
136
|
+
var h = t.dataToPoint([N, _]);
|
|
137
|
+
return h[0] -= f, h[1] -= y, h.push(D), h;
|
|
138
|
+
}), b = i.getExtent(), C = i.type === "visualMap.continuous" ? Y(b, i.option.range) : X(b, i.getPieceList(), i.option.selected);
|
|
139
|
+
v.update(E, s, d, r.color.getNormalizer(), {
|
|
140
|
+
inRange: r.color.getColorMapper(),
|
|
141
|
+
outOfRange: a.color.getColorMapper()
|
|
142
|
+
}, C);
|
|
143
|
+
var w = new $({
|
|
144
|
+
style: {
|
|
145
|
+
width: s,
|
|
146
|
+
height: d,
|
|
147
|
+
x: f,
|
|
148
|
+
y,
|
|
149
|
+
image: v.canvas
|
|
150
|
+
},
|
|
151
|
+
silent: !0
|
|
152
|
+
});
|
|
153
|
+
this.group.add(w);
|
|
154
|
+
}, e.type = "heatmap", e;
|
|
155
|
+
}(K)
|
|
156
|
+
);
|
|
157
|
+
export {
|
|
158
|
+
gt as default
|
|
159
|
+
};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var t=(e,i)=>r(e,"name",{value:i,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../HeatmapView/index.cjs"),l=require("../HeatmapSeries/index.cjs");function n(e){e.registerChartView(a.default),e.registerSeriesModel(l.default)}t(n,"install");exports.install=n;
|
package/lib/node_modules/.pnpm/echarts@5.6.0/node_modules/echarts/lib/chart/heatmap/install/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var t = Object.defineProperty;
|
|
2
|
+
var r = (e, i) => t(e, "name", { value: i, configurable: !0 });
|
|
3
|
+
import o from "../HeatmapView/index.js";
|
|
4
|
+
import a from "../HeatmapSeries/index.js";
|
|
5
|
+
function f(e) {
|
|
6
|
+
e.registerChartView(o), e.registerSeriesModel(a);
|
|
7
|
+
}
|
|
8
|
+
r(f, "install");
|
|
9
|
+
export {
|
|
10
|
+
f as install
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var O=Object.defineProperty;var h=(l,o)=>O(l,"name",{value:o,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const I=require("../../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6/index.cjs"),g=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/util/index.cjs"),d=require("../VisualMapModel/index.cjs"),M=require("../../../util/number/index.cjs"),R=require("../../../util/component/index.cjs");var v=[20,140],b=function(l){I.__extends(o,l);function o(){var t=l!==null&&l.apply(this,arguments)||this;return t.type=o.type,t}return h(o,"ContinuousModel"),o.prototype.optionUpdated=function(t,e){l.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},o.prototype.resetItemSize=function(){l.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=v[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=v[1])},o.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):g.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},o.prototype.completeVisualOption=function(){l.prototype.completeVisualOption.apply(this,arguments),g.each(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)},this)},o.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},o.prototype.getSelected=function(){var t=this.getExtent(),e=M.asc((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},o.prototype.getValueState=function(t){var e=this.option.range,n=this.getExtent();return(e[0]<=n[0]||e[0]<=t)&&(e[1]>=n[1]||t<=e[1])?"inRange":"outOfRange"},o.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries(function(n){var i=[],a=n.getData();a.each(this.getDataDimensionIndex(a),function(r,s){t[0]<=r&&r<=t[1]&&i.push(s)},this),e.push({seriesId:n.id,dataIndex:i})},this),e},o.prototype.getVisualMeta=function(t){var e=y(this,"outOfRange",this.getExtent()),n=y(this,"inRange",this.option.range.slice()),i=[];function a(f,S){i.push({value:f,color:t(f,S)})}h(a,"setStop");for(var r=0,s=0,m=n.length,c=e.length;s<c&&(!n.length||e[s]<=n[0]);s++)e[s]<n[r]&&a(e[s],"outOfRange");for(var u=1;r<m;r++,u=0)u&&i.length&&a(n[r],"outOfRange"),a(n[r],"inRange");for(var u=1;s<c;s++)(!n.length||n[n.length-1]<e[s])&&(u&&(i.length&&a(i[i.length-1].value,"outOfRange"),u=0),a(e[s],"outOfRange"));var p=i.length;return{stops:i,outerColors:[p?i[0].color:"transparent",p?i[p-1].color:"transparent"]}},o.type="visualMap.continuous",o.defaultOption=R.inheritDefaultOption(d.default.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),o}(d.default);function y(l,o,t){if(t[0]===t[1])return t.slice();for(var e=200,n=(t[1]-t[0])/e,i=t[0],a=[],r=0;r<=e&&i<t[1];r++)a.push(i),i+=n;return a.push(t[1]),a}h(y,"getColorStopValues");exports.default=b;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
var S = Object.defineProperty;
|
|
2
|
+
var u = (l, n) => S(l, "name", { value: n, configurable: !0 });
|
|
3
|
+
import { __extends as O } from "../../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6/index.js";
|
|
4
|
+
import { isArray as I, each as R } from "../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/util/index.js";
|
|
5
|
+
import c from "../VisualMapModel/index.js";
|
|
6
|
+
import { asc as M } from "../../../util/number/index.js";
|
|
7
|
+
import { inheritDefaultOption as x } from "../../../util/component/index.js";
|
|
8
|
+
var d = [20, 140], w = (
|
|
9
|
+
/** @class */
|
|
10
|
+
function(l) {
|
|
11
|
+
O(n, l);
|
|
12
|
+
function n() {
|
|
13
|
+
var t = l !== null && l.apply(this, arguments) || this;
|
|
14
|
+
return t.type = n.type, t;
|
|
15
|
+
}
|
|
16
|
+
return u(n, "ContinuousModel"), n.prototype.optionUpdated = function(t, e) {
|
|
17
|
+
l.prototype.optionUpdated.apply(this, arguments), this.resetExtent(), this.resetVisual(function(o) {
|
|
18
|
+
o.mappingMethod = "linear", o.dataExtent = this.getExtent();
|
|
19
|
+
}), this._resetRange();
|
|
20
|
+
}, n.prototype.resetItemSize = function() {
|
|
21
|
+
l.prototype.resetItemSize.apply(this, arguments);
|
|
22
|
+
var t = this.itemSize;
|
|
23
|
+
(t[0] == null || isNaN(t[0])) && (t[0] = d[0]), (t[1] == null || isNaN(t[1])) && (t[1] = d[1]);
|
|
24
|
+
}, n.prototype._resetRange = function() {
|
|
25
|
+
var t = this.getExtent(), e = this.option.range;
|
|
26
|
+
!e || e.auto ? (t.auto = 1, this.option.range = t) : I(e) && (e[0] > e[1] && e.reverse(), e[0] = Math.max(e[0], t[0]), e[1] = Math.min(e[1], t[1]));
|
|
27
|
+
}, n.prototype.completeVisualOption = function() {
|
|
28
|
+
l.prototype.completeVisualOption.apply(this, arguments), R(this.stateList, function(t) {
|
|
29
|
+
var e = this.option.controller[t].symbolSize;
|
|
30
|
+
e && e[0] !== e[1] && (e[0] = e[1] / 3);
|
|
31
|
+
}, this);
|
|
32
|
+
}, n.prototype.setSelected = function(t) {
|
|
33
|
+
this.option.range = t.slice(), this._resetRange();
|
|
34
|
+
}, n.prototype.getSelected = function() {
|
|
35
|
+
var t = this.getExtent(), e = M((this.get("range") || []).slice());
|
|
36
|
+
return e[0] > t[1] && (e[0] = t[1]), e[1] > t[1] && (e[1] = t[1]), e[0] < t[0] && (e[0] = t[0]), e[1] < t[0] && (e[1] = t[0]), e;
|
|
37
|
+
}, n.prototype.getValueState = function(t) {
|
|
38
|
+
var e = this.option.range, o = this.getExtent();
|
|
39
|
+
return (e[0] <= o[0] || e[0] <= t) && (e[1] >= o[1] || t <= e[1]) ? "inRange" : "outOfRange";
|
|
40
|
+
}, n.prototype.findTargetDataIndices = function(t) {
|
|
41
|
+
var e = [];
|
|
42
|
+
return this.eachTargetSeries(function(o) {
|
|
43
|
+
var a = [], i = o.getData();
|
|
44
|
+
i.each(this.getDataDimensionIndex(i), function(r, s) {
|
|
45
|
+
t[0] <= r && r <= t[1] && a.push(s);
|
|
46
|
+
}, this), e.push({
|
|
47
|
+
seriesId: o.id,
|
|
48
|
+
dataIndex: a
|
|
49
|
+
});
|
|
50
|
+
}, this), e;
|
|
51
|
+
}, n.prototype.getVisualMeta = function(t) {
|
|
52
|
+
var e = v(this, "outOfRange", this.getExtent()), o = v(this, "inRange", this.option.range.slice()), a = [];
|
|
53
|
+
function i(g, y) {
|
|
54
|
+
a.push({
|
|
55
|
+
value: g,
|
|
56
|
+
color: t(g, y)
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
u(i, "setStop");
|
|
60
|
+
for (var r = 0, s = 0, m = o.length, f = e.length; s < f && (!o.length || e[s] <= o[0]); s++)
|
|
61
|
+
e[s] < o[r] && i(e[s], "outOfRange");
|
|
62
|
+
for (var p = 1; r < m; r++, p = 0)
|
|
63
|
+
p && a.length && i(o[r], "outOfRange"), i(o[r], "inRange");
|
|
64
|
+
for (var p = 1; s < f; s++)
|
|
65
|
+
(!o.length || o[o.length - 1] < e[s]) && (p && (a.length && i(a[a.length - 1].value, "outOfRange"), p = 0), i(e[s], "outOfRange"));
|
|
66
|
+
var h = a.length;
|
|
67
|
+
return {
|
|
68
|
+
stops: a,
|
|
69
|
+
outerColors: [h ? a[0].color : "transparent", h ? a[h - 1].color : "transparent"]
|
|
70
|
+
};
|
|
71
|
+
}, n.type = "visualMap.continuous", n.defaultOption = x(c.defaultOption, {
|
|
72
|
+
align: "auto",
|
|
73
|
+
calculable: !1,
|
|
74
|
+
hoverLink: !0,
|
|
75
|
+
realtime: !0,
|
|
76
|
+
handleIcon: "path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",
|
|
77
|
+
handleSize: "120%",
|
|
78
|
+
handleStyle: {
|
|
79
|
+
borderColor: "#fff",
|
|
80
|
+
borderWidth: 1
|
|
81
|
+
},
|
|
82
|
+
indicatorIcon: "circle",
|
|
83
|
+
indicatorSize: "50%",
|
|
84
|
+
indicatorStyle: {
|
|
85
|
+
borderColor: "#fff",
|
|
86
|
+
borderWidth: 2,
|
|
87
|
+
shadowBlur: 2,
|
|
88
|
+
shadowOffsetX: 1,
|
|
89
|
+
shadowOffsetY: 1,
|
|
90
|
+
shadowColor: "rgba(0,0,0,0.2)"
|
|
91
|
+
}
|
|
92
|
+
// emphasis: {
|
|
93
|
+
// handleStyle: {
|
|
94
|
+
// shadowBlur: 3,
|
|
95
|
+
// shadowOffsetX: 1,
|
|
96
|
+
// shadowOffsetY: 1,
|
|
97
|
+
// shadowColor: 'rgba(0,0,0,0.2)'
|
|
98
|
+
// }
|
|
99
|
+
// }
|
|
100
|
+
}), n;
|
|
101
|
+
}(c)
|
|
102
|
+
);
|
|
103
|
+
function v(l, n, t) {
|
|
104
|
+
if (t[0] === t[1])
|
|
105
|
+
return t.slice();
|
|
106
|
+
for (var e = 200, o = (t[1] - t[0]) / e, a = t[0], i = [], r = 0; r <= e && a < t[1]; r++)
|
|
107
|
+
i.push(a), a += o;
|
|
108
|
+
return i.push(t[1]), i;
|
|
109
|
+
}
|
|
110
|
+
u(v, "getColorStopValues");
|
|
111
|
+
export {
|
|
112
|
+
w as default
|
|
113
|
+
};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var X=Object.defineProperty;var g=(p,s)=>X(p,"name",{value:s,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Y=require("../../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6/index.cjs"),_=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/util/index.cjs"),Z=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/LinearGradient/index.cjs"),w=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/core/event/index.cjs"),K=require("../VisualMapView/index.cjs"),S=require("../../../util/graphic/index.cjs"),j=require("../../../util/number/index.cjs"),U=require("../../helper/sliderMove/index.cjs"),x=require("../helper/index.cjs"),W=require("../../../util/model/index.cjs"),G=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/contain/text/index.cjs"),$=require("../../../util/states/index.cjs"),B=require("../../../util/symbol/index.cjs"),J=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/Image/index.cjs"),Q=require("../../../util/innerStore/index.cjs"),T=require("../../../label/labelStyle/index.cjs"),ee=require("../../../util/event/index.cjs"),z=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/Text/index.cjs"),C=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/Group/index.cjs"),te=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/shape/Rect/index.cjs"),ie=require("../../../../../../../zrender@5.6.1/node_modules/zrender/lib/graphic/shape/Polygon/index.cjs");var f=j.linearMap,re=_.each,O=Math.min,k=Math.max,ae=12,oe=6,ne=function(p){Y.__extends(s,p);function s(){var e=p!==null&&p.apply(this,arguments)||this;return e.type=s.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return g(s,"ContinuousView"),s.prototype.init=function(e,i){p.prototype.init.call(this,e,i),this._hoverLinkFromSeriesMouseOver=_.bind(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=_.bind(this._hideIndicator,this)},s.prototype.doRender=function(e,i,t,r){(!r||r.type!=="selectDataRange"||r.from!==this.uid)&&this._buildView()},s.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,i=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(i);var t=e.get("text");this._renderEndsText(i,t,0),this._renderEndsText(i,t,1),this._updateView(!0),this.renderBackground(i),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(i)},s.prototype._renderEndsText=function(e,i,t){if(i){var r=i[1-t];r=r!=null?r+"":"";var a=this.visualMapModel,l=a.get("textGap"),n=a.itemSize,u=this._shapes.mainGroup,h=this._applyTransform([n[0]/2,t===0?-l:n[1]+l],u),o=this._applyTransform(t===0?"bottom":"top",u),d=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new z.default({style:T.createTextStyle(c,{x:h[0],y:h[1],verticalAlign:d==="horizontal"?"middle":o,align:d==="horizontal"?o:"center",text:r})}))}},s.prototype._renderBar=function(e){var i=this.visualMapModel,t=this._shapes,r=i.itemSize,a=this._orient,l=this._useHandle,n=x.getItemAlign(i,this.api,r),u=t.mainGroup=this._createBarGroup(n),h=new C.default;u.add(h),h.add(t.outOfRange=R()),h.add(t.inRange=R(null,l?A(this._orient):null,_.bind(this._dragHandle,this,"all",!1),_.bind(this._dragHandle,this,"all",!0))),h.setClipPath(new te.default({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var o=i.textStyleModel.getTextRect("国"),d=k(o.width,o.height);l&&(t.handleThumbs=[],t.handleLabels=[],t.handleLabelPoints=[],this._createHandle(i,u,0,r,d,a),this._createHandle(i,u,1,r,d,a)),this._createIndicator(i,u,r,d,a),e.add(u)},s.prototype._createHandle=function(e,i,t,r,a,l){var n=_.bind(this._dragHandle,this,t,!1),u=_.bind(this._dragHandle,this,t,!0),h=G.parsePercent(e.get("handleSize"),r[0]),o=B.createSymbol(e.get("handleIcon"),-h/2,-h/2,h,h,null,!0),d=A(this._orient);o.attr({cursor:d,draggable:!0,drift:n,ondragend:u,onmousemove:g(function(M){w.stop(M.event)},"onmousemove")}),o.x=r[0]/2,o.useStyle(e.getModel("handleStyle").getItemStyle()),o.setStyle({strokeNoScale:!0,strokeFirst:!0}),o.style.lineWidth*=2,o.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),$.setAsHighDownDispatcher(o,!0),i.add(o);var c=this.visualMapModel.textStyleModel,v=new z.default({cursor:d,draggable:!0,drift:n,onmousemove:g(function(M){w.stop(M.event)},"onmousemove"),ondragend:u,style:T.createTextStyle(c,{x:0,y:0,text:""})});v.ensureState("blur").style={opacity:.1},v.stateTransition={duration:200},this.group.add(v);var y=[h,0],m=this._shapes;m.handleThumbs[t]=o,m.handleLabelPoints[t]=y,m.handleLabels[t]=v},s.prototype._createIndicator=function(e,i,t,r,a){var l=G.parsePercent(e.get("indicatorSize"),t[0]),n=B.createSymbol(e.get("indicatorIcon"),-l/2,-l/2,l,l,null,!0);n.attr({cursor:"move",invisible:!0,silent:!0,x:t[0]/2});var u=e.getModel("indicatorStyle").getItemStyle();if(n instanceof J.default){var h=n.style;n.useStyle(_.extend({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},u))}else n.useStyle(u);i.add(n);var o=this.visualMapModel.textStyleModel,d=new z.default({silent:!0,invisible:!0,style:T.createTextStyle(o,{x:0,y:0,text:""})});this.group.add(d);var c=[(a==="horizontal"?r/2:oe)+t[0]/2,0],v=this._shapes;v.indicator=n,v.indicatorLabel=d,v.indicatorLabelPoint=c,this._firstShowIndicator=!0},s.prototype._dragHandle=function(e,i,t,r){if(this._useHandle){if(this._dragging=!i,!i){var a=this._applyTransform([t,r],this._shapes.mainGroup,!0);this._updateInterval(e,a[1]),this._hideIndicator(),this._updateView()}i===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),i?!this._hovering&&this._clearHoverLinkToSeries():F(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},s.prototype._resetInterval=function(){var e=this.visualMapModel,i=this._dataInterval=e.getSelected(),t=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[f(i[0],t,r,!0),f(i[1],t,r,!0)]},s.prototype._updateInterval=function(e,i){i=i||0;var t=this.visualMapModel,r=this._handleEnds,a=[0,t.itemSize[1]];U.default(i,r,a,e,0);var l=t.getExtent();this._dataInterval=[f(r[0],a,l,!0),f(r[1],a,l,!0)]},s.prototype._updateView=function(e){var i=this.visualMapModel,t=i.getExtent(),r=this._shapes,a=[0,i.itemSize[1]],l=e?a:this._handleEnds,n=this._createBarVisual(this._dataInterval,t,l,"inRange"),u=this._createBarVisual(t,t,a,"outOfRange");r.inRange.setStyle({fill:n.barColor}).setShape("points",n.barPoints),r.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(l,n)},s.prototype._createBarVisual=function(e,i,t,r){var a={forceState:r,convertOpacityToAlpha:!0},l=this._makeColorGradient(e,a),n=[this.getControllerVisual(e[0],"symbolSize",a),this.getControllerVisual(e[1],"symbolSize",a)],u=this._createBarPoints(t,n);return{barColor:new Z.default(0,0,0,1,l),barPoints:u,handlesColor:[l[0].color,l[l.length-1].color]}},s.prototype._makeColorGradient=function(e,i){var t=100,r=[],a=(e[1]-e[0])/t;r.push({color:this.getControllerVisual(e[0],"color",i),offset:0});for(var l=1;l<t;l++){var n=e[0]+a*l;if(n>e[1])break;r.push({color:this.getControllerVisual(n,"color",i),offset:l/t})}return r.push({color:this.getControllerVisual(e[1],"color",i),offset:1}),r},s.prototype._createBarPoints=function(e,i){var t=this.visualMapModel.itemSize;return[[t[0]-i[0],e[0]],[t[0],e[0]],[t[0],e[1]],[t[0]-i[1],e[1]]]},s.prototype._createBarGroup=function(e){var i=this._orient,t=this.visualMapModel.get("inverse");return new C.default(i==="horizontal"&&!t?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&t?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!t?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},s.prototype._updateHandle=function(e,i){if(this._useHandle){var t=this._shapes,r=this.visualMapModel,a=t.handleThumbs,l=t.handleLabels,n=r.itemSize,u=r.getExtent(),h=this._applyTransform("left",t.mainGroup);re([0,1],function(o){var d=a[o];d.setStyle("fill",i.handlesColor[o]),d.y=e[o];var c=f(e[o],[0,n[1]],u,!0),v=this.getControllerVisual(c,"symbolSize");d.scaleX=d.scaleY=v/n[0],d.x=n[0]-v/2;var y=S.applyTransform(t.handleLabelPoints[o],S.getTransform(d,this.group));if(this._orient==="horizontal"){var m=h==="left"||h==="top"?(n[0]-v)/2:(n[0]-v)/-2;y[1]+=m}l[o].setStyle({x:y[0],y:y[1],text:r.formatValueText(this._dataInterval[o]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",t.mainGroup):"center"})},this)}},s.prototype._showIndicator=function(e,i,t,r){var a=this.visualMapModel,l=a.getExtent(),n=a.itemSize,u=[0,n[1]],h=this._shapes,o=h.indicator;if(o){o.attr("invisible",!1);var d={convertOpacityToAlpha:!0},c=this.getControllerVisual(e,"color",d),v=this.getControllerVisual(e,"symbolSize"),y=f(e,l,u,!0),m=n[0]-v/2,M={x:o.x,y:o.y};o.y=y,o.x=m;var I=S.applyTransform(h.indicatorLabelPoint,S.getTransform(o,this.group)),b=h.indicatorLabel;b.attr("invisible",!1);var E=this._applyTransform("left",h.mainGroup),N=this._orient,D=N==="horizontal";b.setStyle({text:(t||"")+a.formatValueText(i),verticalAlign:D?E:"middle",align:D?"center":E});var V={x:m,y,style:{fill:c}},P={style:{x:I[0],y:I[1]}};if(a.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var q={duration:100,easing:"cubicInOut",additive:!0};o.x=M.x,o.y=M.y,o.animateTo(V,q),b.animateTo(P,q)}else o.attr(V),b.attr(P);this._firstShowIndicator=!1;var L=this._shapes.handleLabels;if(L)for(var H=0;H<L.length;H++)this.api.enterBlur(L[H])}},s.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(i){if(e._hovering=!0,!e._dragging){var t=e.visualMapModel.itemSize,r=e._applyTransform([i.offsetX,i.offsetY],e._shapes.mainGroup,!0,!0);r[1]=O(k(0,r[1]),t[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=t[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},s.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},s.prototype._doHoverLinkToSeries=function(e,i){var t=this.visualMapModel,r=t.itemSize;if(t.option.hoverLink){var a=[0,r[1]],l=t.getExtent();e=O(k(a[0],e),a[1]);var n=se(t,l,a),u=[e-n,e+n],h=f(e,a,l,!0),o=[f(u[0],a,l,!0),f(u[1],a,l,!0)];u[0]<a[0]&&(o[0]=-1/0),u[1]>a[1]&&(o[1]=1/0),i&&(o[0]===-1/0?this._showIndicator(h,o[1],"< ",n):o[1]===1/0?this._showIndicator(h,o[0],"> ",n):this._showIndicator(h,h,"≈ ",n));var d=this._hoverLinkDataIndices,c=[];(i||F(t))&&(c=this._hoverLinkDataIndices=t.findTargetDataIndices(o));var v=W.compressBatches(d,c);this._dispatchHighDown("downplay",x.makeHighDownBatch(v[0],t)),this._dispatchHighDown("highlight",x.makeHighDownBatch(v[1],t))}},s.prototype._hoverLinkFromSeriesMouseOver=function(e){var i;if(ee.findEventDispatcher(e.target,function(n){var u=Q.getECData(n);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var t=this.ecModel.getSeriesByIndex(i.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(t)){var a=t.getData(i.dataType),l=a.getStore().get(r.getDataDimensionIndex(a),i.dataIndex);isNaN(l)||this._showIndicator(l,l)}}},s.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var i=this._shapes.handleLabels;if(i)for(var t=0;t<i.length;t++)this.api.leaveBlur(i[t])},s.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",x.makeHighDownBatch(e,this.visualMapModel)),e.length=0},s.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},s.prototype._applyTransform=function(e,i,t,r){var a=S.getTransform(i,r?null:this.group);return _.isArray(e)?S.applyTransform(e,a,t):S.transformDirection(e,a,t)},s.prototype._dispatchHighDown=function(e,i){i&&i.length&&this.api.dispatchAction({type:e,batch:i})},s.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},s.type="visualMap.continuous",s}(K.default);function R(p,s,e,i){return new ie.default({shape:{points:p},draggable:!!e,cursor:s,drift:e,onmousemove:g(function(t){w.stop(t.event)},"onmousemove"),ondragend:i})}g(R,"createPolygon");function se(p,s,e){var i=ae/2,t=p.get("hoverLinkDataSize");return t&&(i=f(t,s,e,!0)/2),i}g(se,"getHalfHoverLinkSize");function F(p){var s=p.get("hoverLinkOnHandle");return!!(s??p.get("realtime"))}g(F,"useHoverLinkOnHandle");function A(p){return p==="vertical"?"ns-resize":"ew-resize"}g(A,"getCursor");exports.default=ne;
|