Skip to content

Conversation

@susiwen8
Copy link
Contributor

Brief Information

This pull request is in the type of:

  • bug fixing
  • 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?

Screen Shot 2021-07-21 at 11 25 38 PM

Screen Shot 2021-07-22 at 10 17 03 PM

Screen Shot 2021-07-22 at 10 19 25 PM

After: How is it fixed in this PR?

Screen Shot 2021-07-21 at 11 22 34 PM

Screen Shot 2021-07-22 at 10 16 01 PM

Screen Shot 2021-07-22 at 10 19 47 PM

Misc

  • 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

@echarts-bot
Copy link

echarts-bot bot commented Jul 22, 2021

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about 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.

// formatter?: string | ((params: CallbackDataParams) => string)

rich?: Dictionary<TextCommonOption>
lineOverflow?: 'truncate'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the default value should be 'truncate' since the document takes 'none' for default values. @pissang

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just take this line of code, it's not to specify the default value but to define the type of lineOverflow.

@pissang pissang modified the milestones: 5.2, 5.3 Jul 26, 2021
@pissang
Copy link
Contributor

pissang commented Jul 26, 2021

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.

@pissang pissang changed the base branch from master to next September 2, 2021 04:41
@susiwen8 susiwen8 closed this Feb 11, 2022
@susiwen8 susiwen8 deleted the text-style branch February 11, 2022 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

配置项title属性textStyle里的lineOverflow设置无效

4 participants