You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/05/26 04:52:05 UTC

[GitHub] [echarts] bigfacewo opened a new issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

bigfacewo opened a new issue #15037:
URL: https://github.com/apache/echarts/issues/15037


   ### Version
   5.1.1
   
   ### Reproduction link
   [https://echarts.apache.org/examples/zh/editor.html?c=calendar-heatmap](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中变量__DEV__的状态没有正确更新,导致后续无法再次调用setOption。
   
   ### What is expected?
   希望canlendar部分代码报错不要影响setOption的正常使用。
   
   ### What is actually happening?
   canlendar部分代码报错导致setOption无法再次调用。
   
   ---
   如果每次都销毁实例,然后再调用setOption,是可以正常使用的。
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] fuchunhui commented on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
fuchunhui commented on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-854350190


   > I think this problem should be solved by echarts.
   
   yes, I agree with you.
   
   one more,  you should use select component, not input. users just can select one from options.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] bigfacewo commented on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
bigfacewo commented on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-848451511


   截图补充:
   ![image](https://user-images.githubusercontent.com/31603897/119604165-34904380-be21-11eb-86e7-83ccaed08a4f.png)
   ![image](https://user-images.githubusercontent.com/31603897/119604175-3bb75180-be21-11eb-9946-b58a45740e18.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-848451324






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] bigfacewo edited a comment on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
bigfacewo edited a comment on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-855735734


   @fuchunhui 
   In some cases, you're right, if I've decided that the user's input is certain, such as the year. But when I look at the echarts doc, this field supports a lot of input formats, such as: number, string and format "yyyy, yyyy-mm" or an array of them. if I want to support all formats and let users choose, it's actually a bit troublesome. Of course, this is also a solution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] bigfacewo edited a comment on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
bigfacewo edited a comment on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-848451511


   截图补充:
   ![image](https://user-images.githubusercontent.com/31603897/119604165-34904380-be21-11eb-86e7-83ccaed08a4f.png)
   ![image](https://user-images.githubusercontent.com/31603897/119604361-7de09300-be21-11eb-8bca-107f1a82ea81.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] fuchunhui edited a comment on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
fuchunhui edited a comment on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-854350190


   > I think this problem should be solved by echarts. @bigfacewo
   
   yes, I agree with you.
   
   one more,  you should use select component, not input. users just can select one from options.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-848596513


   This issue is labeled with `difficulty: easy`.
   @bigfacewo Would you like to debug it by yourself? This is a quicker way to get your problem fixed. Or you may wait for the community to fix.
   
   Please have a look at [How to debug ECharts](https://github.com/apache/echarts/blob/master/CONTRIBUTING.md#how-to-debug-echarts) if you'd like to give a try. 🤓


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] bigfacewo edited a comment on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
bigfacewo edited a comment on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-855735734


   @fuchunhui 
   In some cases, you're right, if I've decided that the user's input is certain, such as the year. But when I look at the echarts file, this field supports a lot of input formats, such as: number, string and format "yyyy, yyyy-mm" or an array of them. if I want to support all formats and let users choose, it's actually a bit troublesome. Of course, this is also a solution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] bigfacewo commented on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
bigfacewo commented on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-853539738


   @fuchunhui Thanks!
   In fact, my problem is not whether I need to support a time format like 999. In my system, for example, my initial value 2021, when the user wants to modify it to 2020, he needs to delete the 1 at the end first, and then it becomes 202, which will cause this error. When he continues to enter 0, it becomes 2020, but because of the above error, he cannot render the chart again, Maybe we can avoid this problem by use debounce, but I think this problem should be solved by echarts.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] bigfacewo commented on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
bigfacewo commented on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-853539738


   @fuchunhui Thanks!
   In fact, my problem is not whether I need to support a time format like 999. In my system, for example, my initial value 2021, when the user wants to modify it to 2020, he needs to delete the 1 at the end first, and then it becomes 202, which will cause this error. When he continues to enter 0, it becomes 2020, but because of the above error, he cannot render the chart again, Maybe we can avoid this problem by use debounce, but I think this problem should be solved by echarts.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] fuchunhui edited a comment on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
fuchunhui edited a comment on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-854350190






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] bigfacewo commented on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
bigfacewo commented on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-855735734


   @fuchunhui 
   In some cases, you're right, if I've decided that the user's input is certain, such as the year. But when I look at the ecarts file, this field supports a lot of input formats, such as: number, string and format "yyyy, yyyy-mm" or an array of them. if I want to support all formats and let users choose, it's actually a bit troublesome. Of course, this is also a solution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] fuchunhui edited a comment on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
fuchunhui edited a comment on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-854350190


   > I think this problem should be solved by echarts. 
   
   yes, I agree with you.@bigfacewo
   
   one more,  you should use select component, not input. users just can select one from options.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] fuchunhui commented on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
fuchunhui commented on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-854350190


   > I think this problem should be solved by echarts.
   
   yes, I agree with you.
   
   one more,  you should use select component, not input. users just can select one from options.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] fuchunhui commented on issue #15037: calendar的range设置小于1000,会导致同一个实例的setOption方法无法执行。

Posted by GitBox <gi...@apache.org>.
fuchunhui commented on issue #15037:
URL: https://github.com/apache/echarts/issues/15037#issuecomment-852977902


   According to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Years), you must type year in four-digit to avoid Y2K, It represents years from 0000 to 9999.
   
   how to fix this issue, it depends on whether echarts should support it or not.
   
   perhaps some ways:
   1. using '0999' instead of  '999'.
   2. not support less than 1000.
   3. still 999, adjust /^\d{4}/ to /^\d{1,4}/, and fix error by two-digit year.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org