You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "Quska45 (via GitHub)" <gi...@apache.org> on 2023/07/10 06:31:03 UTC
[GitHub] [echarts] Quska45 opened a new issue, #18869: [Bug] tooltip.textStyle some value is not working
Quska45 opened a new issue, #18869:
URL: https://github.com/apache/echarts/issues/18869
### Version
5.4.2
### Link to Minimal Reproduction
https://codepen.io/quska45/pen/BaGmZoq
### Steps to Reproduce
https://codepen.io/quska45/pen/BaGmZoq
1.How do you create the chart.
- using echarts 5.4.2 version
- please check codepen link
2.What's the chart option
```javascript
option = {
legend: {},
tooltip: {
textStyle: {
color: 'blue',
width: 10,
overflow: 'truncate',
ellipsis: '...',
height: 51,
}
},
dataset: {
source: [
[
'month',
'longText1111111111111111111111111111111111111111111',
'longText2222222222222222222222222222222222222222222',
'longText33333333333333333333333333333333333333333333',
'longText44444444444444444444444444444444444444444444'
],
['1月', 223, 635, 342, 988],
['2月', 473, 575, 612, 1128],
['3月', 354, 0, 578, 867]
],
// 请问这种写法怎么改其他配置项才可以跟上边一样的效果图
// dimensions: ['month', '电脑', '手机', '笔记本', '键盘'],
// source: [
// { month: '1月', 电脑: 223, 手机: 635, 笔记本: 342, 键盘: 988 },
// { month: '2月', 电脑: 473, 手机: 575, 笔记本: 612, 键盘: 1128 },
// { month: '3月', 电脑: 354, 手机: 0, 笔记本: 578, 键盘: 867 }
// ],
},
xAxis: [
{ type: 'category', gridIndex: 0 },
{ type: 'category', gridIndex: 1 }
],
yAxis: [{ gridIndex: 0 }, { gridIndex: 1 }],
grid: [{ bottom: '55%' }, { top: '55%' }],
series: [
// These series are in the first grid.
{ type: 'bar', seriesLayoutBy: 'row' },
{ type: 'bar', seriesLayoutBy: 'row' },
{ type: 'bar', seriesLayoutBy: 'row' },
// These series are in the second grid.
{ type: 'bar', xAxisIndex: 1, yAxisIndex: 1 },
{ type: 'bar', xAxisIndex: 1, yAxisIndex: 1 },
{ type: 'bar', xAxisIndex: 1, yAxisIndex: 1 },
{ type: 'bar', xAxisIndex: 1, yAxisIndex: 1 }
]
};
```
3.User interactions before the error happens.
- I just make chart
### Current Behavior

textStyle.width: 10
textStyle.overflow: 'truncate'
textStyle.ellipsis: '...'
textStyle.height: 51
above options is not working.
### Expected Behavior
textStyle.width: 10
textStyle.overflow: 'truncate'
textStyle.ellipsis: '...'
textStyle.height: 51
i want above option working
### Environment
```markdown
- OS:window 11
- Browser:chrome
- Framework:svelte
```
### Any additional comments?
https://github.com/apache/echarts/issues/14211
same issue in above url.
I think tooltip.textStyle option not work.
please check this option 😭
--
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] echarts-bot[bot] commented on issue #18869: [Bug] tooltip.textStyle some value is not working
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #18869:
URL: https://github.com/apache/echarts/issues/18869#issuecomment-1628323237
@Quska45 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**BODY**
### Version
5.4.2
### Link to Minimal Reproduction
https://codepen.io/quska45/pen/BaGmZoq
### Steps to Reproduce
https://codepen.io/quska45/pen/BaGmZoq
1. How do you create the chart.
- using echarts 5.4.2 version
- please check codepen link
2. What's the chart option
```javascript
option = {
legend: {},
tooltip: {
textStyle: {
color: 'blue',
width: 10,
overflow: 'truncate',
ellipsis: '...',
height: 51,
}
},
dataset: {
source: [
[
'month',
'longText1111111111111111111111111111111111111111',
'longText222222222222222222222222222222222222222222',
'longText3333333333333333333333333333333333333333333',
'longText4444444444444444444444444444444444444444444'
],
['January', 223, 635, 342, 988],
['February', 473, 575, 612, 1128],
['March', 354, 0, 578, 867]
],
// May I ask how to change other configuration items in this way to get the same rendering as above?
// dimensions: ['month', 'computer', 'mobile phone', 'notebook', 'keyboard'],
// source: [
// { month: 'January', computer: 223, mobile phone: 635, notebook: 342, keyboard: 988 },
// { month: 'February', computer: 473, mobile phone: 575, notebook: 612, keyboard: 1128 },
// { month: 'March', computer: 354, mobile phone: 0, notebook: 578, keyboard: 867 }
// ],
},
xAxis: [
{ type: 'category', gridIndex: 0 },
{ type: 'category', gridIndex: 1 }
],
yAxis: [{ gridIndex: 0 }, { gridIndex: 1 }],
grid: [{ bottom: '55%' }, { top: '55%' }],
series: [
// These series are in the first grid.
{ type: 'bar', seriesLayoutBy: 'row' },
{ type: 'bar', seriesLayoutBy: 'row' },
{ type: 'bar', seriesLayoutBy: 'row' },
// These series are in the second grid.
{ type: 'bar', xAxisIndex: 1, yAxisIndex: 1 },
{ type: 'bar', xAxisIndex: 1, yAxisIndex: 1 },
{ type: 'bar', xAxisIndex: 1, yAxisIndex: 1 },
{ type: 'bar', xAxisIndex: 1, yAxisIndex: 1 }
]
};
```
3.User interactions before the error happens.
- I just make chart
### Current Behavior

textStyle. width: 10
textStyle. overflow: 'truncate'
textStyle.ellipsis: '...'
textStyle. height: 51
above options are not working.
### Expected Behavior
textStyle. width: 10
textStyle. overflow: 'truncate'
textStyle.ellipsis: '...'
textStyle. height: 51
i want above option working
### Environment
```markdown
-OS:window 11
- Browser: chrome
- Framework: svelte
```
### Any additional comments?
https://github.com/apache/echarts/issues/14211
same issue in above url.
I think tooltip. textStyle option not working.
please check this option 😭
</details>
--
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] q1anxiaodong commented on issue #18869: [Bug] tooltip.textStyle some value is not working
Posted by "q1anxiaodong (via GitHub)" <gi...@apache.org>.
q1anxiaodong commented on issue #18869:
URL: https://github.com/apache/echarts/issues/18869#issuecomment-1628930416
通过给tooltip绑定类样式,可以设置css样式来调整tooltip里的文字如何截断,但这种方法只限于[renderMode](https://echarts.apache.org/zh/option.html#tooltip.renderMode)为`html`模式下的tooltip, `richText`渲染的情况可以参考富文本的文字样式修改
tooltip绑定类样式:https://echarts.apache.org/zh/option.html#tooltip.className
https://codepen.io/q1anxiaodong/pen/eYQeVXq
--
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] Quska45 commented on issue #18869: [Bug] tooltip.textStyle some value is not working
Posted by "Quska45 (via GitHub)" <gi...@apache.org>.
Quska45 commented on issue #18869:
URL: https://github.com/apache/echarts/issues/18869#issuecomment-1633650189
> 通过给tooltip绑定类样式,可以设置css样式来调整tooltip里的文字如何截断,但这种方法只限于[renderMode](https://echarts.apache.org/zh/option.html#tooltip.renderMode)为`html`模式下的tooltip, `richText`渲染的情况可以参考富文本的文字样式修改 tooltip绑定类样式:https://echarts.apache.org/zh/option.html#tooltip.className
>
> https://codepen.io/q1anxiaodong/pen/eYQeVXq
thank you. you save my life
--
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] Quska45 closed issue #18869: [Bug] tooltip.textStyle some value is not working
Posted by "Quska45 (via GitHub)" <gi...@apache.org>.
Quska45 closed issue #18869: [Bug] tooltip.textStyle some value is not working
URL: https://github.com/apache/echarts/issues/18869
--
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