rapid-spreadjs 1.0.17 → 1.0.18

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/dist/index.esm.js CHANGED
@@ -7095,6 +7095,10 @@ const EChartsUtils = {
7095
7095
  * @param isHideChart 是否隐藏图表
7096
7096
  */
7097
7097
  initChart: (spread, sheet, config, isHideChart = false) => {
7098
+ // 此时可能ECharts所在的div还没有渲染(如浮动元素还没有在可视区域的时候是不会创建的)
7099
+ if (document.getElementById(config.chartId + '_ec') == null) {
7100
+ return null;
7101
+ }
7098
7102
  // 获取多条x轴的数组(类似[[1,2,3,4],[1,2,3,4]])
7099
7103
  let xDataArr = [], yDataArr = [];
7100
7104
  // 获取多条x轴的数组(单元格原始数据,类似[['1.0','2.0','3.0'],['1.0','2.0','3.0']],此数据可能在有些情况下需要使用原始数据,如:原始数据为字符串的1.0,可能需要在x轴显示为1.0这个字符文本)