NguyenTienDat commented on issue #16699:
URL: https://github.com/apache/echarts/issues/16699#issuecomment-1136936975
> > Tooltip goes out of page/window if text is long
>
> give you an idea : use html tag and css style in tooltip `formatter`
funtction. e.g :
>
> ```
> option = {
> xAxis: {
> type: 'category',
> data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
> },
> yAxis: {
> type: 'value'
> },
> tooltip: {
> confine: true,
> formatter: `<div style="word-break: break-all;white-space:
pre-wrap;">'This is a very very very very very very very very very very very
very very very long textThis is a very very very very very very very very very
very very very very very long textThis is a very very very very very very very
very very very very very very very long text'</div>`
> },
> series: [
> {
> data: [120, 200, 150, 80, 70, 110, 130],
> type: 'line'
> }
> ]
> };
> ```
@Chewieez @plainheart
I think `confine: true` is working fine, but `overflow` isn't.
I must try `formatter`.
Could you share me solution with `textStyle` in this case?
```
textStyle: {
overflow: 'breakAll',
width: 40,
},
```

--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]