echarts-gl
echarts-gl copied to clipboard
Grid3D Axis labels and Axis3D names do not preserve margin/nameGap when data is updated
Version
1.1.2
Reproduction link
https://jsfiddle.net/ked7uxpL/
Steps to reproduce
The axes label and names change position whenever the data is updated dynamically, for example when using setInterval().
Rotating or zooming out sets them back to the original position temporarily but they get displaced again every time setOption() is called again.
What is expected?
The axes names and labels should always remain in the same position, as specified by the nameGap and margin options
What is actually happening?
The axes names and labels do not preserve the position set by the nameGap and margin options whenever setOption() is called again dynamically.
before setOption() update:

after update:

u can modify src/component/grid3D/Grid3DView.js fix this issue

if (
Reflect.has(grid3DModel.option, "afterRenderedUpdateAxisPosition") &&
grid3DModel.option.afterRenderedUpdateAxisPosition
) {
this._updateAxisLinePosition();
}
ecahrts options
{
...,
grid3D: {
...,
afterRenderedUpdateAxisPosition: true
}
}