pe-3 opened a new pull request, #18052: URL: https://github.com/apache/echarts/pull/18052
<!-- Please fill in the following information to help us review your PR more efficiently. --> ## Brief Information This pull request is in the type of: - [ ] bug fixing - [X] new feature - [ ] others ### What does this PR do? <!-- USE ONE SENTENCE TO DESCRIBE WHAT THIS PR DOES. --> This PR will add line segment styling to line chart. ### Fixed issues <!-- - #xxxx: ... --> https://github.com/apache/echarts/issues/17138 ## Details ### Before: What was the problem? <!-- DESCRIBE THE BUG OR REQUIREMENT HERE. --> <!-- ADD SCREENSHOT HERE IF APPLICABLE. --> We cannot set segment styles for a line chart, so the entire line has to use the same style, making it monotonous. To achieve this effect, we need to increase the complexity of the configuration, which is not elegant. Therefore, at the source code level, we need to implement this effect to provide users with a direct configuration option to easily configure such segmented effects. ### After: How does it behave after the fixing? <!-- THE RESULT AFTER FIXING AND A SIMPLE EXPLANATION ABOUT HOW IT IS FIXED. --> <!-- ADD SCREENSHOT HERE IF APPLICABLE. --> Users can configure segment styles like this ```js { linePieces: [ { segment: [1, 3], lineStyle: { type: "solid", color: 'red' } }, { segment: ({dataIndex})= dataIndex >= 6 && dataIndex <= 9, lineStyle: { type: "dashed", color: 'cyan', width:'4' } } ] } ``` The effect will be like this: ![image](https://user-images.githubusercontent.com/103579791/206901898-c777567a-3c53-4e46-9db4-a54001819235.png) ## Document Info One of the following should be checked. - [ ] This PR doesn't relate to document changes - [X] The document should be updated later - [ ] The document changes have been made in apache/echarts-doc#xxx ## Misc ### ZRender Changes - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx). ### Related test cases or examples to use the new APIs N.A. ## Others ### Merging options - [ ] Please squash the commits into a single one when merging. ### 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-unsubscr...@echarts.apache.org 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