You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "KaguraDun (via GitHub)" <gi...@apache.org> on 2024/09/24 07:03:22 UTC

[I] [Bug] Funnel chart with custom labelLayout leads to incorrect label position after resize [echarts]

KaguraDun opened a new issue, #20366:
URL: https://github.com/apache/echarts/issues/20366

   ### Version
   
   5.5.1
   
   ### Link to Minimal Reproduction
   
   https://echarts.apache.org/examples/en/editor.html?c=funnel&code=PYBwLglsB2AEC8sDeAoWtJgDYFMBcya6GOAHmAQOQBiArtNDlpUQL4A0RYwwWkIBVMQwAnCAHNxOEVQhgcAW0qdhAM2AiFAQzDyZsSki2tYAHgBGIgPQA-JOZOCAxqwCkLdBy48s54KUEidFUcHVoRfEJhdAATHS0ANQgcAHdBWAitGIB5aCwATwJVLSwAZxxYL2iMnFLuCMEq6NKtADccAEFSgEltKUagyrYVWFwpaBjA4TiwLQIAbUoAZQALYBTlAwBhLAgnAGtNyiTSuUoAXWGicrFahcGhaOgtBUiaekZmEeEwfJA31QfJjKQboXCqCgGACMAAZ3N9iNwBLAAGwwhHoPy6YAKAhojGwFIQGJgFZUAAccJB1QUEGgBHRoNg2gCsFhjJpdKWEAAXm8qQSWdy-VR2fCmaUNJDKFpSk4cBM6eJqdFxFpkQAmAlYLTmJhTaqwUprNKiWg4AnoEDAU6QGBUYC0MCnGI4DzRJrCHV6rAAGTpkUe1Vw0HEpIIsMtowDS1-uANhsJxPDbKj6F-_yokt2MXd1VYTM9xDkilj-XjUUNfhErpEW14GioAGJVK2VdVq7WAOrJslswsExQgFayiClBPRb36yuJ9TQMDCyIamFMzwDplTv1afKOyEAChAWhEL1KAEoEDYZ4anDA6rAxwBRdpwRCH48KUoAOhmWm6EzIsCuLAGoIPAiAwgA3KuxaqLAe6Ps-55BomNRgOEcBvieUEoUMOERGhIhwMhiasphH6fpuABKOBOGAn6kLAAC0sBkV-ES0Z-RIkisabECUEj0gYYjiCsYDtoarDYR6BI_vciZILArQlOaBAAKzsLAzyvFQJxnJUUYKUpWAqWy6KaS8bx_gAjrQEAiPklD6dBhnKZE7IaVpbzZDW0iOUW6CXMIBYBSgklAA
   
   ### Steps to Reproduce
   
   1. Open chart by link
   2. Resize editor window
   
   
   ### Current Behavior
   
   labels goes off screen
   
   ### Expected Behavior
   
   Labels keep their positions
   
   ### Environment
   
   ```markdown
   - OS: Windows 11
   - Browser: chrome 128.0.6613.138
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   I try to distribute labels with even pattern.


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


Re: [I] [Bug] Funnel chart with custom labelLayout leads to incorrect label position after resize [echarts]

Posted by "KaguraDun (via GitHub)" <gi...@apache.org>.
KaguraDun commented on issue #20366:
URL: https://github.com/apache/echarts/issues/20366#issuecomment-2373980394

   Oh my bad. Thanks for help!


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


Re: [I] [Bug] Funnel chart with custom labelLayout leads to incorrect label position after resize [echarts]

Posted by "sz-p (via GitHub)" <gi...@apache.org>.
sz-p commented on issue #20366:
URL: https://github.com/apache/echarts/issues/20366#issuecomment-2373861549

   It doesn't look like a bug
   
   ```js
   labelLayout: (params) => {
       const isEven = params.dataIndex % 2 === 0;
       if (isEven) {
         return params;
       }
       return {
         // params.labelRect.x will changed in every callback
         x: params.labelRect.x - params.rect.width,
         align: 'right',
       };
    }
   ```
   
   try
   
   ```js
   labelLayout: (params) => {
       const isEven = params.dataIndex % 2 === 0;
       if (isEven) {
         return params;
       }
       return {
         x: params.rect.x - params.rect.width,
         align: 'right',
       };
    }
   ```


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


Re: [I] [Bug] Funnel chart with custom labelLayout leads to incorrect label position after resize [echarts]

Posted by "KaguraDun (via GitHub)" <gi...@apache.org>.
KaguraDun closed issue #20366: [Bug] Funnel chart with custom labelLayout leads to incorrect label position after resize
URL: https://github.com/apache/echarts/issues/20366


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