You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "zhouzhili (via GitHub)" <gi...@apache.org> on 2023/07/20 09:15:53 UTC
[GitHub] [echarts] zhouzhili opened a new issue, #18914: [Feature] 横向柱状图能否设置左侧起点从10开始
zhouzhili opened a new issue, #18914:
URL: https://github.com/apache/echarts/issues/18914
### What problem does this feature solve?
我有一个横向柱状图,它有一个背景边框,但是目前无法配置柱状图和左侧边框间的间距,有什么办法可以设置吗?
我的option 如下:
```js
option = {
xAxis: {
type: 'value',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
yAxis: {
type: 'category',
show:false,
},
series: [
{
name:'bar',
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
barWidth:10,
itemStyle: {
borderRadius: 5,
},
},
{
name:'bg',
data: [200, 200, 200, 200, 200, 200, 200],
type: 'bar',
barWidth:15,
barGap: '-125%',
itemStyle: {
borderRadius: 5,
color:'rgba(0,0,0,0)',
borderColor:'green'
},
z:-1
}
]
};
```
在线示例如下:
https://codepen.io/zhili124/pen/XWyYgWE

想达到的效果是蓝色柱子和绿色边框的左侧有一定的间距
### What does the proposed API look like?
比如bar可以设置`offset:[10,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.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] linghaoSu commented on issue #18914: [Feature] 横向柱状图能否设置左侧起点从10开始
Posted by "linghaoSu (via GitHub)" <gi...@apache.org>.
linghaoSu commented on issue #18914:
URL: https://github.com/apache/echarts/issues/18914#issuecomment-1646568929
不知道这样算么 [demo](https://echarts.apache.org/examples/zh/editor.html?c=line-simple&code=MYewdgzgLgBA5gUygZQQJwJYIgeQGZ4RIwC8MAFKGHhnKTAN4C-ANDCAUbGQIwAMASlIA-RgCgYMCTCrRGAEwCGURfQDaAXSb0qNOAG4pk6bNgdCSACLLVZJSoB0AW0UAHchigInI9pyQC-tIm4HJgCADu1ir09orObh5ePiSint4wALR-FlCBwcaSaEgArmhgMGrSkuI1dVAAnq4IAFwwAOQARopo7SzVNXFt5lzRiv11ktCKwADWbV2KRJkjSH0DkulOyI0ANq21k5KguyBoC1BoipCuPQhgUOtHTAOsAwwbMA7furQTk0MYOEojZ_nVpnMFt1lqtHmCYG9pBoxC8xCBXFAMOB6B9JAAPACCeIwEDauJqjWaCwAbopdiUEE9BjY2mp2gBZcB9DoAFQZ3PaAHUEPIBTyABYlAUAMUwAuQynlJTA7Q0_zekgaRJJZIGlIO7WAygQcDODSZU3FIAiLTwdKI6v-REw2FZ0gA9O6auTPZMwIonK1Fr1_r66oC1DwAEx8Ngx2MwHgAVgTAA4EwB2BM8fhsHgAZj4ao9XvqTQN3RDJcmlcFGHkUHFLVz1bqWx2DX2uoAkN3fb3Omd5OgAEqKeQYEqkmBJthiXv9jUwMMI-HfByIFDoLC4fxQcjkur-wMtYMW5kqVnRhPxvMptjpthZvO5xOF4tHfVQnrnyS1-uNs2safO2ewHB8vYDkOo7jpO06zlIkFLpITACPCh41MeQadHAv4wBGt4wIRxF8DepFxuRRGkR-kxfh0lZ4f-DZNsm8J_j0ADibgLJk0ZJgApHhoGduB86QYOaDDmgY4TlObSzmJvYnGcp5oHA3TkLGWksII6yQd2ElSQAwiApznO0cDFPc7SKW8kEAF4tLxrxIii-hAA)
<img width="978" alt="image" src="https://github.com/apache/echarts/assets/56526981/e34ee242-c6e4-4202-af60-490ea3ec255a">
--
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 #18914: [Feature] 横向柱状图能否设置左侧起点从10开始
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #18914:
URL: https://github.com/apache/echarts/issues/18914#issuecomment-1643570790
@zhouzhili 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**
[Feature] Can the horizontal bar chart set the left starting point from 10
**BODY**
### What problem does this feature solve?
I have a horizontal histogram which has a background border, but currently I can't configure the spacing between the histogram and the left border, is there any way to set it?
My options are as follows:
```js
option = {
xAxis: {
type: 'value',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
yAxis: {
type: 'category',
show:false,
},
series: [
{
name:'bar',
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
barWidth:10,
itemStyle: {
borderRadius: 5,
},
},
{
name:'bg',
data: [200, 200, 200, 200, 200, 200, 200],
type: 'bar',
barWidth:15,
barGap: '-125%',
itemStyle: {
borderRadius: 5,
color:'rgba(0,0,0,0)',
borderColor:'green'
},
z:-1
}
]
};
```
Examples online are as follows:
https://codepen.io/zhili124/pen/XWyYgWE

The desired effect is that there is a certain spacing between the blue pillar and the left side of the green border
### What does the proposed API look like?
For example, bar can be set to 'offset:[10,10]', or something else that can be implemented
</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] plainheart commented on issue #18914: [Feature] 横向柱状图能否设置左侧起点从10开始
Posted by "plainheart (via GitHub)" <gi...@apache.org>.
plainheart commented on issue #18914:
URL: https://github.com/apache/echarts/issues/18914#issuecomment-1643657806
可以设置轴的[最小值 `min`](https://echarts.apache.org/option.html#xAxis.min) 为 `10`,参见 [demo](https://echarts.apache.org/examples/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurAPRmx4AWwA7kQGYCGANngKYA0J6YAniA5EA5ADc2AVw4iepWAFsI0IgEYADCQC-c2Pxz4iqeQKGiAxszAcA5sABO_Wb1gATK8yIBtEQFkYsrAiACrSgSIA6hyu4cHUkuEAYvYQ4QDKVumS0CIAutq6nCkchLBeLsbysNDMCsJBAEbM9s5Vbh7eqgBM6lywPb2wqgCsgwAcgwDsg6oafaoAzOq5uiaC9SJNLaukWxEQrmDUar0u6BDWCmkCrPWVbQ0Orhz2AErMrhCSpcNnsFouHQVP41OqiBo2VpVdxgTxlAZ9BH9dSDJFolGIlErP6mDZbKHyPYHI5qYY7dBbADizBAogAtN1hgBSAmkC4cK43O5_ClPF7vT7fIhknmwczAVgOUT2GxNAAUvUVXHUAEpWYS-fYAMISqVBGz2DgcHJ_IFtABeRAZgJI-S0AG4gA)。
--
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] closed issue #18914: [Feature] 横向柱状图能否设置左侧起点从10开始
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] closed issue #18914: [Feature] 横向柱状图能否设置左侧起点从10开始
URL: https://github.com/apache/echarts/issues/18914
--
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] zhouzhili commented on issue #18914: [Feature] 横向柱状图能否设置左侧起点从10开始
Posted by "zhouzhili (via GitHub)" <gi...@apache.org>.
zhouzhili commented on issue #18914:
URL: https://github.com/apache/echarts/issues/18914#issuecomment-1647092588
@linghaoSu 感谢您的回答,是我想要的效果,
--
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