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 2022/11/23 08:33:45 UTC

[GitHub] [echarts] 001XuemeiLi opened a new issue, #17958: [Bug] For line chart,when I set some label's position on top,some label's position on bottom ,the labelline position seems not right

001XuemeiLi opened a new issue, #17958:
URL: https://github.com/apache/echarts/issues/17958

   ### Version
   
   5.4.0
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   1
                                   label: {
                                       normal: {
                                           show: true,
                                           position: (index % 2) === 0 ? 'top' : 'bottom',
                                           distance:20,
                                           formatter: (params) => {
                                               if (developDescription[params.dataIndex]) {
                                                   let str = this.makeMultiLine(developDescription[params.dataIndex], 17) // 每 5 个字符一行
                                                   if ((params.dataIndex % 2) === 0) {//判定条件余数为0时为偶数
                                                       // alert(num + '是' + '偶数')
                                                       console.log("我很烦躁", `{lineUp|}{content|${str}}`)
                                                       return `{content|${str}}` // 使用 rich 中的 n 和 b 来对两段内容单独设置样式
                                                   } else {
                                                       // alert(num + '是' + '奇数')
                                                       return `{content|${str}}`
                                                   }
   
                                               } else {
                                                   return ''
                                               }
                                           }
                                       },
                                   }
                                   },
   
   
   ### Current Behavior
   
   when I set label position some top,some bottom,the labelline position not right
   
   ### Expected Behavior
   
   when I set label position some top,some bottom,the labelline position should follow the label tightly
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_


-- 
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.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 issue #17958: [Bug] For line chart,when I set some label's position on top,some label's position on bottom ,the labelline position seems not right

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17958:
URL: https://github.com/apache/echarts/issues/17958#issuecomment-1381265739

   This issue is closed due to not being active. Please feel free to open it again (for the author) or create a new one and reference this (for others) if you have further questions.


-- 
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 issue #17958: [Bug] For line chart,when I set some label's position on top,some label's position on bottom ,the labelline position seems not right

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17958:
URL: https://github.com/apache/echarts/issues/17958#issuecomment-1326262087

   @001XuemeiLi Please provide a demo for the issue either with [Official Editor](https://echarts.apache.org/examples/editor.html), [CodePen](https://codepen.io/Ovilia/pen/dyYWXWM), [CodeSandbox](https://codesandbox.io/s/echarts-basic-example-template-mpfz1s) or [JSFiddle](https://jsfiddle.net/plainheart/e46ozpqj/7/).


-- 
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] closed issue #17958: [Bug] For line chart,when I set some label's position on top,some label's position on bottom ,the labelline position seems not right

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] closed issue #17958: [Bug] For line chart,when I set some label's position on top,some label's position  on bottom ,the labelline position seems not right
URL: https://github.com/apache/echarts/issues/17958


-- 
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 issue #17958: [Bug] For line chart,when I set some label's position on top,some label's position on bottom ,the labelline position seems not right

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17958:
URL: https://github.com/apache/echarts/issues/17958#issuecomment-1324705184

   @001XuemeiLi It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **BODY**
   
   ### Version
   
   5.4.0
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   1
                                   label: {
                                       normal: {
                                           show: true,
                                           position: (index % 2) === 0 ? 'top' : 'bottom',
                                           distance:20,
                                           formatter: (params) => {
                                               if (developDescription[params. dataIndex]) {
                                                   let str = this.makeMultiLine(developDescription[params.dataIndex], 17) // make a line every 5 characters
                                                   if ((params.dataIndex % 2) === 0) {//Determination condition is even when the remainder is 0
                                                       // alert(num + 'yes' + 'even')
                                                       console.log("I'm very upset", `{lineUp|}{content|${str}}`)
                                                       return `{content|${str}}` // Use n and b in rich to style the two pieces of content separately
                                                   } else {
                                                       // alert(num + 'is' + 'odd')
                                                       return `{content|${str}}`
                                                   }
   
                                               } else {
                                                   return ''
                                               }
                                           }
                                       },
                                   }
                                   },
   
   
   ### Current Behavior
   
   when I set label position some top, some bottom, the labelline position not right
   
   ### Expected Behavior
   
   when I set label position some top, some bottom, the labelline position should follow the label tightly
   
   ### Environment
   
   ```markdown
   - OS:
   -Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_
   </details>


-- 
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