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/03/24 02:30:33 UTC
[GitHub] [echarts] crazy-wang opened a new issue #16734: [Bug] series-bar.labelLayout. dx的值在图表容器大小改变后执行resize后并没有正确渲染到相应的比例位置
crazy-wang opened a new issue #16734:
URL: https://github.com/apache/echarts/issues/16734
### Version
echarts@5+
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
柱状图,把label标签设置为顶部显示,然后通过设置dx控制位置,调整dx到合适位置后。
在视窗大小改变后,触发echarts的resize方法,echarts图形会按原比例自适应调整大小,但是dx设置的值并没有按原比例调整大小。必须刷新下页面才可以到比例位置。
### Current Behavior
柱状图,把label标签设置为顶部显示,然后通过设置dx控制位置,调整dx到合适位置后。
在视窗大小改变后,触发echarts的resize方法,echarts图形设置的dx的值并没有按原比例调整大小。必须刷新下页面才可以到比例位置。
### Expected Behavior
设置的dx的值也应该基于新图的初始坐标位置到合适的位置。
### Environment
```markdown
- OS: win10
- Browser: Chrome
- Framework: Vue@2
```
### Any additional comments?

--
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] echarts-bot[bot] commented on issue #16734: [Bug] series-bar.labelLayout. dx的值在图表容器大小改变后执行resize后并没有正确渲染到相应的比例位置
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #16734:
URL: https://github.com/apache/echarts/issues/16734#issuecomment-1077004791
@crazy-wang 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>
**TITLE**
[Bug] The value of series-bar.labelLayout.dx is not correctly rendered to the corresponding scale position after performing resize after the chart container size is changed
**BODY**
### Version
echarts@5+
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
For the histogram, set the label label to the top display, and then control the position by setting the dx, and adjust the dx to the appropriate position.
After the window size is changed, the resize method of echarts is triggered, and the echarts graphics will be adaptively resized according to the original ratio, but the value set by dx is not resized according to the original ratio. You must refresh the page to get to the scale position.
### Current Behavior
For the histogram, set the label label to the top display, and then control the position by setting the dx, and adjust the dx to the appropriate position.
After the window size is changed, the resize method of echarts is triggered, and the value of dx set by the echarts graphics is not resized according to the original proportion. You must refresh the page to get to the scale position.
### Expected Behavior
The value of the set dx should also be based on the initial coordinate position of the new graph to an appropriate position.
### Environment
````markdown
- OS: win10
- Browser: Chrome
- Framework: Vue@2
````
### Any additional comments?

</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] crazy-wang edited a comment on issue #16734: [Bug] series-bar.labelLayout. dx的值在图表容器大小改变后执行resize后并没有正确渲染到相应的比例位置
Posted by GitBox <gi...@apache.org>.
crazy-wang edited a comment on issue #16734:
URL: https://github.com/apache/echarts/issues/16734#issuecomment-1077313413
> @crazy-wang 我这无法复现你的问题
这样可以很快复现:
您进入这个链接,官方demo https://echarts.apache.org/examples/zh/editor.html?c=bar-background
然后添加几行我图中的代码,这个时候label标签在柱子中间位置了。如下图效果。然后您改变浏览器窗口大小,可以看到echarts图大小会根据比例自适应改变,但是label标签的位置没有自适应改变导致是不居中的,再保持窗口大小不变,再点击运行下才会居中。


label: {
show: true
},
labelLayout: {
y: 10,
dx: -10
}
--
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] crazy-wang commented on issue #16734: [Bug] series-bar.labelLayout. dx的值在图表容器大小改变后执行resize后并没有正确渲染到相应的比例位置
Posted by GitBox <gi...@apache.org>.
crazy-wang commented on issue #16734:
URL: https://github.com/apache/echarts/issues/16734#issuecomment-1077313413
> @crazy-wang 我这无法复现你的问题
这样可以很快复现:
您进入这个链接,官方demo https://echarts.apache.org/examples/zh/editor.html?c=bar-background
然后添加几行我图中的代码,这个时候label标签在柱子中间位置了。如下图效果。然后您改变浏览器窗口大小,可以看到echarts图大小会根据比例自适应改变,但是label标签的位置是不居中的,再保持窗口大小不变,再点击运行下才会居中。

--
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] crazy-wang commented on issue #16734: [Bug] series-bar.labelLayout. dx的值在图表容器大小改变后执行resize后并没有正确渲染到相应的比例位置
Posted by GitBox <gi...@apache.org>.
crazy-wang commented on issue #16734:
URL: https://github.com/apache/echarts/issues/16734#issuecomment-1077274824
series: [
{
name: 'Life Cost',
type: 'bar',
labelLayout: {
y: 0,
dx: -15 // 这个值调整位置后,容器改变不会自适应刷新,必须刷新页面才可以
},
stack: 'Total',
label: {
show: true,
position: 'top' // 设置在顶部
},
data: [2900, 1200, 300, 200, 900, 300]
}
]
--
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] crazy-wang closed issue #16734: [Bug] series-bar.labelLayout. dx的值在图表容器大小改变后执行resize后并没有正确渲染到相应的比例位置
Posted by GitBox <gi...@apache.org>.
crazy-wang closed issue #16734:
URL: https://github.com/apache/echarts/issues/16734
--
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] crazy-wang edited a comment on issue #16734: [Bug] series-bar.labelLayout. dx的值在图表容器大小改变后执行resize后并没有正确渲染到相应的比例位置
Posted by GitBox <gi...@apache.org>.
crazy-wang edited a comment on issue #16734:
URL: https://github.com/apache/echarts/issues/16734#issuecomment-1077274824
```ts
series: [
{
name: 'Life Cost',
type: 'bar',
labelLayout: {
y: 0,
dx: -15 // 这个值调整位置后,容器改变不会自适应刷新,必须刷新页面才可以
},
stack: 'Total',
label: {
show: true,
position: 'top' // 设置在顶部
},
data: [2900, 1200, 300, 200, 900, 300]
}
]
```
--
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] pissang commented on issue #16734: [Bug] series-bar.labelLayout. dx的值在图表容器大小改变后执行resize后并没有正确渲染到相应的比例位置
Posted by GitBox <gi...@apache.org>.
pissang commented on issue #16734:
URL: https://github.com/apache/echarts/issues/16734#issuecomment-1077281642
@crazy-wang 我这无法复现你的问题
--
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