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/07/22 14:20:39 UTC
[GitHub] [echarts] susiwen8 opened a new pull request #15404: Label text style support `lineOverflow` and `ellipsis`
susiwen8 opened a new pull request #15404:
URL: https://github.com/apache/echarts/pull/15404
<!-- Please fill in the following information to help us review your PR more efficiently. -->
## Brief Information
This pull request is in the type of:
- [x] bug fixing
- [x] new feature
- [ ] others
### What does this PR do?
Add `lineOverflow` and `ellipsis` for `label`, also fix `lineOverflow` doesn't affect in `title`
### Fixed issues
Close #15395
## Details
### Before: What was the problem?
<img width="533" alt="Screen Shot 2021-07-21 at 11 25 38 PM" src="https://user-images.githubusercontent.com/20318608/126654364-772098af-e7a5-414f-9c14-98ce1f2b36a2.png">
<img width="517" alt="Screen Shot 2021-07-22 at 10 17 03 PM" src="https://user-images.githubusercontent.com/20318608/126654491-3e84b444-4135-48f7-ab0a-dc8cb41c4ce1.png">
<img width="374" alt="Screen Shot 2021-07-22 at 10 19 25 PM" src="https://user-images.githubusercontent.com/20318608/126654968-64f806c2-84f3-4dd5-b786-29b071f63d4e.png">
### After: How is it fixed in this PR?
<img width="511" alt="Screen Shot 2021-07-21 at 11 22 34 PM" src="https://user-images.githubusercontent.com/20318608/126654132-808e02af-52e4-43cc-a5fe-710104e09c12.png">
<img width="468" alt="Screen Shot 2021-07-22 at 10 16 01 PM" src="https://user-images.githubusercontent.com/20318608/126654338-68b7826b-62ec-4210-9039-b0c7625a5a15.png">
<img width="182" alt="Screen Shot 2021-07-22 at 10 19 47 PM" src="https://user-images.githubusercontent.com/20318608/126654940-e775fde6-cb6b-4bb2-87f0-0b121214b4b5.png">
## Misc
<!-- ADD RELATED ISSUE ID WHEN APPLICABLE -->
- [ ] The API has been changed (apache/echarts-doc#xxx).
- [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
### Related test cases or examples to use the new APIs
NA.
## Others
### Merging options
- [ ] Please squash the commits into a single one when merge.
### Other information
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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] Ovilia commented on a change in pull request #15404: Label text style support `lineOverflow` and `ellipsis`
Posted by GitBox <gi...@apache.org>.
Ovilia commented on a change in pull request #15404:
URL: https://github.com/apache/echarts/pull/15404#discussion_r676253119
##########
File path: src/util/types.ts
##########
@@ -1109,6 +1109,8 @@ export interface LabelOption extends TextCommonOption {
// formatter?: string | ((params: CallbackDataParams) => string)
rich?: Dictionary<TextCommonOption>
+ lineOverflow?: 'truncate'
Review comment:
I'm not sure if the default value should be `'truncate'` since the document takes `'none'` for default values. @pissang
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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] pissang commented on pull request #15404: Label text style support `lineOverflow` and `ellipsis`
Posted by GitBox <gi...@apache.org>.
pissang commented on pull request #15404:
URL: https://github.com/apache/echarts/pull/15404#issuecomment-886509028
I remember I didn't add ellipse and lineOverflow for some compatible considerations.
Especially the ellipse, `treemap` already has ellipse in the 4.x versions but with different meanings, which is same with overflow: 'truncate'. I noticed in this PR it is changed from boolean to string. In fact, it still works for the old code and will be converted to overflow: 'truncate'. Introducing `ellipse` to the label option will break it.
For `lineOverflow` it's mainly because I thought it is not implemented well yet.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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 pull request #15404: Label text style support `lineOverflow` and `ellipsis`
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #15404:
URL: https://github.com/apache/echarts/pull/15404#issuecomment-884952028
Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).
The pull request is marked to be `PR: author is committer` because you are a committer of this project.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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] plainheart commented on a change in pull request #15404: Label text style support `lineOverflow` and `ellipsis`
Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #15404:
URL: https://github.com/apache/echarts/pull/15404#discussion_r676304189
##########
File path: src/util/types.ts
##########
@@ -1109,6 +1109,8 @@ export interface LabelOption extends TextCommonOption {
// formatter?: string | ((params: CallbackDataParams) => string)
rich?: Dictionary<TextCommonOption>
+ lineOverflow?: 'truncate'
Review comment:
Just take this line of code, it's not to specify the default value but to define the type of `lineOverflow`.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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] susiwen8 closed pull request #15404: Label text style support `lineOverflow` and `ellipsis`
Posted by GitBox <gi...@apache.org>.
susiwen8 closed pull request #15404:
URL: https://github.com/apache/echarts/pull/15404
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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