Skip to content

Conversation

@plainheart
Copy link
Member

@plainheart plainheart commented Apr 7, 2020

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Fix the option symbolRotate in markLine does not work for line series. Close #12388.

Fixed issues

Related test cases

Refer to test/markLine-symbolRotate.html

@echarts-bot
Copy link

echarts-bot bot commented Apr 7, 2020

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.

@plainheart plainheart changed the title Fix 12388 fix(line): fix symbolRotate for markLine does not work. close #12388. Apr 7, 2020
@pissang pissang added this to the 4.9.0 milestone Apr 7, 2020
@YiYingWu1302
Copy link

It works perfect for me! Thanks for quick fixing :)

@YiYingWu1302
Copy link

YiYingWu1302 commented Apr 8, 2020

Another question,
Before, when setting symbol in makrLine, two symbols with different directions will be created as shown below
螢幕快照 2020-04-08 上午10 37 16
now the symbols will point to the same direction as shown below
螢幕快照 2020-04-08 上午10 38 38
Just wonder is this expected?

@plainheart
Copy link
Member Author

@YiYingWu1302 Could you provide an example?

@YiYingWu1302
Copy link

@plainheart I set symbol in makrLine instead of markLine.data

markLine: {
  symbol: 'triangle'
}

@plainheart
Copy link
Member Author

THX! That's not expected. I've made a fix for it, now it should work well. A default rotation action would be performed if symbolRotate is not specified(undefined or null) or NaN. You can refer to this commit f949aeb for more details.

@YiYingWu1302
Copy link

It works well!
Just come up with an idea, since symbol supports Array as value, to set fromSymboland toSymbol, is it possible Array is also supported for symbolRotate to set fromSymbol & toSymbol's rotation?
Like below

markLine: {
  symbol: 'triangle',
  symbolRotate: [0, 180]
}

@plainheart
Copy link
Member Author

@YiYingWu1302 That's OK, but we may have to wait until this PR is merged since current PR is for fixing. After it is merged, you can open a feature request issue for these requirements. BTW, sorry for late reply. :)

@YiYingWu1302
Copy link

@plainheart I get it. Thanks for your kindly reply!

@plainheart
Copy link
Member Author

It works well!
Just come up with an idea, since symbol supports Array as value, to set fromSymboland toSymbol, is it possible Array is also supported for symbolRotate to set fromSymbol & toSymbol's rotation?
Like below

markLine: {
  symbol: 'triangle',
  symbolRotate: [0, 180]
}

Hi~ @YiYingWu1302 I've made some commits for this feature you mentioned about two months ago.
Please feel free to see #12736 for details.

100pah added a commit that referenced this pull request Aug 5, 2020
…ecified by users, the "auto rotation" rule should not be broken when rendered at the second time (like when drag graph or move dataZoom). (Brought by 7c3f189 #12392 )
plainheart added a commit that referenced this pull request Mar 1, 2021
- Resolves #9325
- Resolves #14106
- Resolves #4771
2) feat: `markLine.symbolRotate` can be an array to specify symbol rotation at the two endpoints.
- Related #12736, #12392
3) feat: add `markLine.symbolKeepAspect` and fix `symbolKeepAspect` doesn't work bug.
4) feat: `symbolOffset` can be a callback function, close #12495.
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.

Symbol rotate for markLine dose not work on line chart

3 participants