You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I create a 3D bar and hide all axes to customize the chart's view and the XY plane, I encounter a large number of errors, which increases the execution time. I am using vanilla JavaScript.
Current Behavior
I resolved this issue by modifying the code in echarts-gl.min.js. The error was caused by null axis values.
The correction I made is specifically required only in the explained rows, even though similar changes might need to be applied to other rows as well. My activity was limited to the modifications mentioned above.
Expected Behavior
I resolved the issue by changing specific lines in the echarts-gl.min.js code. The problem was caused by null axis values, and I addressed it as follows:
On.prototype = {
constructor: On,
add: function (e) {
return Et.add(this.array, this.array, e.array), this._dirty = !0, this },
set: function (e, t, r, i) {
return this.array[0] = e,
this.array[1] = t,
this.array[2] = r,
this.array[3] = i,
this._dirty = !0, this },
setArray: function (e) {
return
this.array[0] = e?.[0] ?? 0, <---------------------------- this.array[0] = e[0],
this.array[1] = e?.[1] ?? 0, <---------------------------- this.array[1] = e[1],
this.array[2] = e?.[2] ?? 0, <---------------------------- this.array[2] = e[2],
this.array[3] = e?.[3] ?? 0, <---------------------------- this.array[3] = e[3],
this._dirty = !0,
this
},
AND
this._axes.forEach((function(i) {
for (var n = i.axisLineCoords, a = (i.labelsMesh.geometry,
0); a < t.length; a++)
t[a].setArray(n?[a] ?? 0), <---------------------------- t[a].setArray(n[a]),
t[a].w = 1,
t[a].transformMat4(i.rootNode.worldTransform).transformMat4(e.viewMatrix).transformMat4(e.projectionMatrix),
t[a].x /= t[a].w,
t[a].y /= t[a].w;
var o, s, l = t[1].x - t[0].x, h = t[1].y - t[0].y, u = (t[1].x + t[0].x) / 2, c = (t[1].y + t[0].y) / 2;
Math.abs(h / l) < .5 ? (o = "center",
s = c > r.y ? "bottom" : "top") : (s = "middle",
o = u > r.x ? "left" : "right"),
i.setSpriteAlign(o, s, this._api)
}
Environment
- OS:
- Browser: chrome latest
- Framework: none
Any additional comments?
No response
The text was updated successfully, but these errors were encountered:
Version
5.5.1
Link to Minimal Reproduction
https://codepen.io/akiastyle/pen/LEPRddW
Steps to Reproduce
When I create a 3D bar and hide all axes to customize the chart's view and the XY plane, I encounter a large number of errors, which increases the execution time. I am using vanilla JavaScript.
Current Behavior
I resolved this issue by modifying the code in echarts-gl.min.js. The error was caused by null axis values.
The correction I made is specifically required only in the explained rows, even though similar changes might need to be applied to other rows as well. My activity was limited to the modifications mentioned above.
Expected Behavior
I resolved the issue by changing specific lines in the echarts-gl.min.js code. The problem was caused by null axis values, and I addressed it as follows:
On.prototype = {
constructor: On,
add: function (e) {
return Et.add(this.array, this.array, e.array), this._dirty = !0, this },
set: function (e, t, r, i) {
return this.array[0] = e,
this.array[1] = t,
this.array[2] = r,
this.array[3] = i,
this._dirty = !0, this },
setArray: function (e) {
return
this.array[0] = e?.[0] ?? 0, <---------------------------- this.array[0] = e[0],
this.array[1] = e?.[1] ?? 0, <---------------------------- this.array[1] = e[1],
this.array[2] = e?.[2] ?? 0, <---------------------------- this.array[2] = e[2],
this.array[3] = e?.[3] ?? 0, <---------------------------- this.array[3] = e[3],
this._dirty = !0,
this
},
AND
this._axes.forEach((function(i) {
for (var n = i.axisLineCoords, a = (i.labelsMesh.geometry,
0); a < t.length; a++)
t[a].setArray(n?[a] ?? 0), <---------------------------- t[a].setArray(n[a]),
t[a].w = 1,
t[a].transformMat4(i.rootNode.worldTransform).transformMat4(e.viewMatrix).transformMat4(e.projectionMatrix),
t[a].x /= t[a].w,
t[a].y /= t[a].w;
var o, s, l = t[1].x - t[0].x, h = t[1].y - t[0].y, u = (t[1].x + t[0].x) / 2, c = (t[1].y + t[0].y) / 2;
Math.abs(h / l) < .5 ? (o = "center",
s = c > r.y ? "bottom" : "top") : (s = "middle",
o = u > r.x ? "left" : "right"),
i.setSpriteAlign(o, s, this._api)
}
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: