apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.2k stars 19.61k forks source link

tooltip.textStyle.width It doesn't work. #14211

Open xiaolannuoyi opened 3 years ago

xiaolannuoyi commented 3 years ago

Version

5.0.2-rc.1

Steps to reproduce

tooltip.textStyle.width tooltip.textStyle.overflow = ‘ truncate’ It doesn't work.

What is expected?

'truncate' Truncate the text and trailing with ellipsis.

What is actually happening?

It doesn't work.

echarts-bot[bot] commented 3 years ago

Hi! We've received your issue and please be patient to get responded. 🎉 The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list.

Have a nice day! 🍵

ShaShengWan-suma commented 2 years ago

Has the problem been solved?I still met the same problem... @susiwen8

gtzinos commented 2 years ago

any update on this?

bilalshabir1 commented 2 years ago

any updates? It is still not working

mohit2314 commented 1 year ago

Any update on this ??

MazakasAlexander commented 1 year ago

It doesn't work yet. Please update. Thanks.

evanmosby commented 1 year ago

Encountering this in 5.4.2

Geloosa commented 1 year ago

having the same issue, 5.4.3

Jeekwar commented 11 months ago

testStyle.width and overflow still not working v5.4.3

kenarp commented 10 months ago

testStyle.width and overflow still not working v5.4.3

Having the same issue, but managed to get it fixed by setting the extraCssText attribute:

textStyle:{ extraCssText: "max-width: 30%; white-space: normal; word-wrap: break-word;"}

The extraCssText will overwrite the default CSS. The default CSS of the tooltip element states white-space: nowrap; , which breaks the textStyle.overflow and consequently should be fixed by the developers.

This is what the default style of tooltip element looks like in my explorer developer tool: user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); position: absolute; display: block; border-style: solid; **white-space: nowrap;** z-index: 9999999; box-shadow: rgba(0, 0, 0, 0.2) 1px 2px 10px; transition: opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0s, visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0s, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s; background-color: rgb(255, 255, 255); border-width: 1px; border-radius: 4px; color: rgb(102, 102, 102); font: 14px / 21px "Microsoft YaHei"; padding: 10px; top: 0px; left: 0px; transform: translate3d(77px, 293px, 0px); border-color: rgb(154, 96, 180); pointer-events: none; visibility: hidden; opacity: 0;

kenarp commented 10 months ago

19258

cgy859854649 commented 3 weeks ago

there are still issues with version 5.5.1