Skip to content

calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。 #15037

Description

@bigfacewo

Version

5.1.1

Reproduction link

https://echarts.apache.org/examples/zh/editor.html?c=calendar-heatmap

Steps to reproduce

  1. 将案例中的calendar的range设置为"999",这时console会报一个错误:TypeError: Cannot read property 'slice' of undefined。
  2. 如果只是不支持时间小于1000也是能理解,但是这时候继续调用setOption会报错: Uncaught Error: setOption should not be called during main process.。
  3. 猜测是第一步的错误导致setOption中变量IN_MAIN_PROCESS_KEY的状态没有正确更新,导致后续无法再次调用setOption。

What is expected?

希望canlendar部分代码报错不要影响setOption的正常使用。

What is actually happening?

canlendar部分代码报错导致setOption无法再次调用。


如果每次都销毁实例,然后再调用setOption,是可以正常使用的。

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions