Skip to content

fix(label): Charsets like Cyrillic should break work the same as Latin #17941

@DmytroKondratiuk

Description

@DmytroKondratiuk

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

Expected Behavior

overflow: 'break' for pie series legend should break by word.

Environment

- OS: Mac
- Browser: Chrome
- Framework: React

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions