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/18 20:27:56 UTC

[GitHub] [echarts] DmitriyKondratyuk opened a new issue, #17941: [Bug] overflow=break it breaks "by character" instead of "by word" for ukraine language

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

   ### Version
   
   5.3.0+
   
   ### Link to Minimal Reproduction
   
   https://jsfiddle.net/nfaq68L2/
   
   ### Steps to Reproduce
   
       legend: {
             type: 'scroll',
             orient: 'vertical',
             right: '10%',
             top: 'middle',
             data: chartData,
             textStyle: {
               width: 300,
               overflow: 'break',
               verticalAlign: 'middle',
             },
   
   ### Current Behavior
   
   When I use ukraine language "overflow: 'break'" for pie series legend breaks by character instead of by word. For example word "цвітуть" must be at new line but on new line character "ь". When I use english language words breaks correct.
   ![telegram-cloud-photo-size-2-5456387265736589518-y](https://user-images.githubusercontent.com/13381209/202792560-af4a3c71-60e3-4784-8a35-527b94a29077.jpg)
   
   
   ### Expected Behavior
   
   overflow: 'break' for pie series legend should break by word.
   
   ### Environment
   
   ```markdown
   - OS: Mac
   - Browser: Chrome
   - Framework: React
   ```
   
   
   ### 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] pissang closed issue #17941: [Bug] overflow=break it breaks "by character" instead of "by word" for ukraine language

Posted by GitBox <gi...@apache.org>.
pissang closed issue #17941: [Bug] overflow=break it breaks "by character" instead of "by word" for ukraine language
URL: https://github.com/apache/echarts/issues/17941


-- 
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] Ovilia commented on issue #17941: [Bug] overflow=break it breaks "by character" instead of "by word" for ukraine language

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #17941:
URL: https://github.com/apache/echarts/issues/17941#issuecomment-1324504310

   Currently, the breaking logic is to [check if the letter is latin](https://github.com/ecomfe/zrender/blob/b952ca1c3313901dcab81d30c674060624ce3cb1/src/graphic/helper/parseText.ts#L607). Maybe this is not accurate. Any idea to improve this?


-- 
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] Ovilia commented on issue #17941: [Bug] overflow=break it breaks "by character" instead of "by word" for ukraine language

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #17941:
URL: https://github.com/apache/echarts/issues/17941#issuecomment-1326175298

   `isCyrillic` seems to be a correct way to fix this. I will make a PR. @DmitriyKondratyuk Thanks!


-- 
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] DmitriyKondratyuk commented on issue #17941: [Bug] overflow=break it breaks "by character" instead of "by word" for ukraine language

Posted by GitBox <gi...@apache.org>.
DmitriyKondratyuk commented on issue #17941:
URL: https://github.com/apache/echarts/issues/17941#issuecomment-1326131322

   Hi
   I had similar problem with tooltip. But for tooltip we can use css styles. I fixed this problem like this 
   ```
       tooltip: {
             trigger: 'item',
             formatter: '{a}<p>{b} ({d}%)</p>',
             appendToBody: true,
             extraCssText: 'max-width: 300px; white-space: normal; overflow-wrap: normal;',
        },
   ```
   
   If we could use css styles and formatter for legend like for tooltip it was great


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