[GitHub] [incubator-echarts] Ovilia edited a comment on pull request #12859: feat: time axis label formatter
Ovilia edited a comment on pull request #12859: URL: https://github.com/apache/incubator-echarts/pull/12859#issuecomment-655945171 @quillblue Thanks for your comments. Here are my thoughts on this. ## Primary & Secondary Ticks I think secondary ticks may not be a minor tick. Consider the following case: ``` |_|_|_|__ ... 2020 Feb Mar Apr ``` By our definition, `2020` is a primary tick since it's in the year level, while others are secondary ticks because they are in the month level. But in most cases, the tick color of `2020` may not be different than others while text color may be different. Also, primary and secondary are two default rich text styles we provide. There may also be a tertiary level like week info in the above case. So major and minor ticks may not deal with situations like this. ## i18n First, we have to provide some frequently used formats like `'HH:mm:ss'`. It's unwise to ask users to install another library if they want simple time formats like this. On the other side, if we provide too many formats, it will increase package size while most people won't use it. So we should be prudent when deciding which formats to support. Here are my proposed formatters supported: | Group| Template | Examples (EN) | (ZH) | [Moment.js](https://momentjs.com/docs/#/displaying/) | [date-fns](https://date-fns.org/v2.14.0/docs/format) | |--|--|---||---|--| | Year | | 2020, 1990|| | SAME | | | yy | 20, 90|| YY| SAME | | Quarter | Q| 1, 2 || SAME | SAME | | Month| | January, February | 一月、二月 | SAME | SAME | | | MMM | Jan, Feb | 一、二 | SAME | SAME | | | MM | 01, 02|| SAME | SAME | | | M| 1, 2 || SAME | SAME | | Week of Year | ww | 01, 02 || SAME | SAME | | | w| 1, 2 | | SAME | SAME | | Day of Month | dd | 01, 02|| DD| SAME | | | d| 1, 2 || D | SAME | | Day of Week | | Monday, Tuesday | 周一、周二星期一、星期二 | | SAME | | | e | M, T | 一、二 | ddd | SAME | | | e| 1, 2 || d | SAME | | Hour (0-23)| HH | 00, 23|| SAME | SAME | | | H| 0, 23 || SAME | SAME | | Hour (1-12)| hh | 01, 12 || SAME | SAME | | | h| 1, 12 | | SAME | SAME | | Minute | mm | 00, 01|| SAME | SAME | | | m| 0, 1 || SAME | SAME | | Second | ss | 00, 01|| SAME | SAME | | | s| 0, 1 || SAME | SAME | | Millisecond | SSS | 000, 001 || SAME | SAME | | | S| 0, 1 || SAME | SAME | 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: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] Ovilia edited a comment on pull request #12859: feat: time axis label formatter
Ovilia edited a comment on pull request #12859: URL: https://github.com/apache/incubator-echarts/pull/12859#issuecomment-655945171 @quillblue Thanks for your comments. Here are my thoughts on this. ## Primary & Secondary Ticks I think secondary ticks may not be a minor tick. Consider the following case: ``` |_|_|_|__ ... 2020 Feb Mar Apr ``` By our definition, `2020` is a primary tick since it's in the year level, while others are secondary ticks because they are in the month level. But in most cases, the tick color of `2020` may not be different than others while text color may be different. Also, primary and secondary are two default rich text styles we provide. There may also be a tertiary level like week info in the above case. So major and minor ticks may not deal with situations like this. ## i18n First, we have to provide some frequently used formats like `'HH:mm:ss'`. It's unwise to ask users to install another library if they want simple time formats like this. On the other side, if we provide too many formats, it will increase package size while most people won't use it. So we should be prudent when deciding which formats to support. Here are my proposed formatters supported: | Group| Template | Examples (EN) | (ZH) | [Moment.js](https://momentjs.com/docs/#/displaying/) | [date-fns](https://date-fns.org/v2.14.0/docs/format) | |--|--|---||---|--| | Year | | 2020, 1990|| | SAME | | | yy | 20, 90|| YY| SAME | | Quarter | Q| 1, 2 || SAME | SAME | | Month| | January, February | 一月、二月 | SAME | SAME | | | MMM | Jan, Feb | 一、二 | SAME | SAME | | | MM | 01, 02|| SAME | SAME | | | M| 1, 2 || SAME | SAME | | Week of Year | ww | 01, 02 || SAME | SAME | | | w| 1, 2 | | SAME | SAME | | Day of Month | dd | 01, 02|| DD| SAME | | | d| 1, 2 || D | SAME | | Day of Week | | Monday, Tuesday | 周一、周二星期一、星期二 | | SAME | | | e | M, T | 一、二 | ddd | SAME | | | e| 1, 2 || d | SAME | | Hour (0-23)| HH | 00, 23|| SAME | SAME | | | H| 0, 23 || SAME | SAME | | Hour (0-11)| hh | 01, 12 || SAME | SAME | | | h| 1, 12 | | SAME | SAME | | Minute | mm | 00, 01|| SAME | SAME | | | m| 0, 1 || SAME | SAME | | Second | ss | 00, 01|| SAME | SAME | | | s| 0, 1 || SAME | SAME | | Millisecond | SSS | 000, 001 || SAME | SAME | | | S| 0, 1 || SAME | SAME | 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: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] Ovilia edited a comment on pull request #12859: feat: time axis label formatter
Ovilia edited a comment on pull request #12859: URL: https://github.com/apache/incubator-echarts/pull/12859#issuecomment-655945171 @quillblue Thanks for your comments. Here are my thoughts on this. ## Primary & Secondary Ticks I think secondary ticks may not be a minor tick. Consider the following case: ``` |_|_|_|__ ... 2020 Feb Mar Apr ``` By our definition, `2020` is a primary tick since it's in the year level, while others are secondary ticks because they are in the month level. But in most cases, the tick color of `2020` may not be different than others while text color may be different. Also, primary and secondary are two default rich text styles we provide. There may also be a tertiary level like week info in the above case. So major and minor ticks may not deal with situations like this. ## i18n First, we have to provide some frequently used formats like `'HH:mm:ss'`. It's unwise to ask users to install another library if they want simple time formats like this. On the other side, if we provide too many formats, it will increase package size while most people won't use it. So we should be prudent when deciding which formats to support. Here are my proposed formatters supported: | Group| Template | Examples (EN) | (ZH) | [Moment.js](https://momentjs.com/docs/#/displaying/) | [date-fns](https://date-fns.org/v2.14.0/docs/format) | |--|--|---||---|--| | Year | | 2020, 1990|| | SAME | | | yy | 20, 90|| YY| SAME | | Quarter | Q| 1, 2 || SAME | SAME | | Month| | January, February | 一月、二月 | SAME | SAME | | | MMM | Jan, Feb | 一、二 | SAME | SAME | | | MM | 01, 02|| SAME | SAME | | | M| 1, 2 || SAME | SAME | | Week of Year | ww | 01, 02 || SAME | SAME | | | w| 1, 2 | | SAME | SAME | | Day of Month | dd | 01, 02|| DD| SAME | | | d| 1, 2 || D | SAME | | Day of Week | | Monday, Tuesday | 周一、周二星期一、星期二 | | SAME | | | e | M, T | 一、二 | ddd | SAME | | | e| 1, 2 || d | SAME | | Hour | HH | 00, 23|| SAME | SAME | | | H| 0, 23 || SAME | SAME | | Minute | mm | 00, 01|| SAME | SAME | | | m| 0, 1 || SAME | SAME | | Second | ss | 00, 01|| SAME | SAME | | | s| 0, 1 || SAME | SAME | | Millisecond | SSS | 000, 001 || SAME | SAME | | | S| 0, 1 || SAME | SAME | 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: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] Ovilia edited a comment on pull request #12859: feat: time axis label formatter
Ovilia edited a comment on pull request #12859: URL: https://github.com/apache/incubator-echarts/pull/12859#issuecomment-655945171 @quillblue Thanks for your comments. Here are my thoughts on this. ## Primary & Secondary Ticks I think secondary ticks may not be a minor tick. Consider the following case: ``` |_|_|_|__ ... 2020 Feb Mar Apr ``` By our definition, `2020` is a primary tick since it's in the year level, while others are secondary ticks because they are in the month level. But in most cases, the tick color of `2020` may not be different than others while text color may be different. Also, primary and secondary are two default rich text styles we provide. There may also be a tertiary level like week info in the above case. So major and minor ticks may not deal with situations like this. ## i18n First, we have to provide some frequently used formats like `'HH:mm:ss'`. It's unwise to ask users to install another library if they want simple time formats like this. On the other side, if we provide too many formats, it will increase package size while most people won't use it. So we should be prudent when deciding which formats to support. Here are my proposed formatters supported: | Group| Template | Examples (EN) | (ZH) | [Moment.js](https://momentjs.com/docs/#/displaying/) | [date-fns](https://date-fns.org/v2.14.0/docs/format) | |--|--|---||---|--| | Year | | 2020, 1990|| | SAME | | | yy | 20, 90|| YY| SAME | | Quarter | Q| 1, 2 || SAME | SAME | | Month| | January, February | 一月、二月 | SAME | SAME | | | MMM | Jan, Feb | 一、二 | SAME | SAME | | | MM | 01, 02|| SAME | SAME | | | M| 1, 2 || SAME | SAME | | Week of Year | ww | 01, 02|| SAME | SAME | | | w| 1, 2 || SAME | SAME | | Day of Month | dd | 01, 02|| DD| SAME | | | d| 1, 2 || D | SAME | | Day of Week | | Monday, Tuesday | 周一、周二星期一、星期二 | | SAME | | | e | M, T | 一、二 | ddd | SAME | | | e| 1, 2 || d | SAME | | Hour | HH | 00, 23|| SAME | SAME | | | H| 0, 23 || SAME | SAME | | Minute | mm | 00, 01|| SAME | SAME | | | m| 0, 1 || SAME | SAME | | Second | ss | 00, 01|| SAME | SAME | | | s| 0, 1 || SAME | SAME | | Millisecond | SSS | 000, 001 || SAME | SAME | | | S| 0, 1 || SAME | SAME | 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: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] Ovilia edited a comment on pull request #12859: feat: time axis label formatter
Ovilia edited a comment on pull request #12859: URL: https://github.com/apache/incubator-echarts/pull/12859#issuecomment-655951837 @100pah I think that makes sense. `一、二` should take `ee` if we have future feature requests. Or do you think we should provide `ee` for `Mo, Tu` and ` 一,二` for now? I would suggest break change it to 1~12 because it's more universal and it cannot provide extra help to `HH`. 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: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org
[GitHub] [incubator-echarts] Ovilia edited a comment on pull request #12859: feat: time axis label formatter
Ovilia edited a comment on pull request #12859: URL: https://github.com/apache/incubator-echarts/pull/12859#issuecomment-655951837 @100pah I think that makes sense. `一、二` should take `ee` if we have future feature requests. I would suggest break change it to 1~12 because it's more universal and it cannot provide extra help to `HH`. 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: us...@infra.apache.org - To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org