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/11/30 10:36:57 UTC
[GitHub] [echarts] SongJuXin opened a new issue, #17998: [Bug] yAxis.nameTextStyle.width not working
SongJuXin opened a new issue, #17998:
URL: https://github.com/apache/echarts/issues/17998
### Version
5.4.0
### Link to Minimal Reproduction
https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWsDGwA2wBOAXLANoBEAxAMyUCcAHACIBCpAugDRqxjA6QhFU6dGDwQA5uICmhWKQCGADwgBnUp2GwlqgArAI0MDMFdNYAJ4gpRUioAW8gCbAA7qVOwAvl08bY4sUdBXy5FAEFlFSJiIWELKxsMeSNxfHN1D0dk-WjSAFkYdTkAFQBXKSLSAHUpR0riu1LKgDExSoBlZI7S6DYfDi5zCNVo2JFLazkAN3lscozNaHkAWykAcXkBAFoARgAGPb90JdXiqUUwdotsSbHhYCmZADNcFxsAIzwpeQBrMOxsAtNLAAPQglwQRxgOxEAAshw86AhUJh8IRwNgdikEjsYAIlHRwOwBikAAlseJcUQdgAmI7Cd7yDA_ALAHqOADCOHwNjw4kZAAoaQBWYXsWCHCXivYAOkoAEp3JoQosVpNSIBpW0Aq9GwE5SWCAI2NADIRSq8A3QKhkECkURIdz1NkAL26AUuNAP3RgDvUoHjBJyRl4L2wP1VSHQmwANj2AFIA1kwDkSPtxcK6bAaQdxdRYRmaJLqJKaWnWP0UJ4gA&_source=echarts-doc-preview
### Steps to Reproduce
option :
```javascript
option = {
color: ["#3398DB"],
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow"
}
},
grid: {},
xAxis: [{
type: "category",
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
}],
yAxis: [{
type: "value",
nameGap:-100,
nameTextStyle: {
overflow: "breakAll",
//width: 40,
width:400,
height:30,
lineHeight: 12,
backgroundColor: "rgba(255, 0, 0, 0.3)"
},
name: "测试 name 换行"
}],
series: [{
name: "直接访问",
type: "bar",
barWidth: "60%",
data: [10, 52, 200, 334, 390, 330, 220]
}]
}
```
### Current Behavior
The configuration of **yAxis.nameTextStyle.width** is not working, whether it is given a larger value or a smaller value.
### Expected Behavior
`yAxis.nameTextStyle.width` can work.
### Environment
```markdown
- OS:windows
- Browser:chrome
- Framework:js
```
### Any additional comments?
Acctually,I expect `yAxis.name` could wrap.
--
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] SongJuXin closed issue #17998: [Bug] yAxis.nameTextStyle.width not working
Posted by "SongJuXin (via GitHub)" <gi...@apache.org>.
SongJuXin closed issue #17998: [Bug] yAxis.nameTextStyle.width not working
URL: https://github.com/apache/echarts/issues/17998
--
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] SongJuXin commented on issue #17998: [Bug] yAxis.nameTextStyle.width not working
Posted by "SongJuXin (via GitHub)" <gi...@apache.org>.
SongJuXin commented on issue #17998:
URL: https://github.com/apache/echarts/issues/17998#issuecomment-1422431583
> Aah, this is fun - how to fix one bug with another !
>
> 1. yes, [yAxis.nameTextStyle.width](https://echarts.apache.org/en/option.html#yAxis.nameTextStyle.width) does not do anything
> 2. while trying a workaround with [padding](https://echarts.apache.org/en/option.html#yAxis.nameTextStyle.padding) I realize it has a bug also...
> 3. then I use the _padding_ bug to make some kind of a _width_. And it works! (but not responsive)
>
> [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=bar-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXLANqrrpgCeIApkQEQDGAhmDQObABOl9ANGnIATVsyLF6AWRj9Y9ACoBXGrPoB1GkNXyAFotUAxLhFUBlVmcXR6AXUEBfGwPSUc-cWXJVaDAG7MAG2V-QXRoZgBbGnkaDDBTKgC6ZFDyAHo0gHcIITAdIgBmAAYivnJ0tNghYBo8WGhgMFhM7gBrVPQM7Nz82AByYqKQDD6y2AyqmrqGppaudvL0DvHKkGYhIQhodlgAM24I1lh8EjBQMuN2HTAygCNGs4iypN2wO0WV2BoAR0VA2Eu11gADJYC8mv4grVYHgdMBFAEhLBGDRoGwuLA2HE7oomtVoTMiLdFOxlhk1hstuxxKUAIz0vh0-lOMmVNQAJQA8gA5ADiMJoYEg20xwGRqPRmNiszaeGWFM22xpfAA7KUmbSWR8dDQIFcwAQAEylZa3ZiMVrsLjw6BCADCwAC3AYXHYZoAFIaAKxesqlWD-ooAOgKAEp6Kl7M5yOEokQ-nhgFF6pEaH0HFqBcZah5Ut5kvQzVwQuURGAxCRaf6vYaysb_QUCgAWMoFACcDeKdeN71gjhQ9iAA)
>
> ![image](https://user-images.githubusercontent.com/13038071/216845355-0bc7d0b3-9d9e-451f-b653-c4fd7985325a.png)
Yes,The width can be controlled in this way.
But,My purpose is to wrap the yAxis.name.
--
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] helgasoft commented on issue #17998: [Bug] yAxis.nameTextStyle.width not working
Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #17998:
URL: https://github.com/apache/echarts/issues/17998#issuecomment-1423018163
Hard to do auto-wrap without _width_, but one can use _new line_ "\n" in text to 'manually' wrap the name. [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=bar-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXLANqrrpgCeIApkQEQDGAhmDQObABOl9ANGnIATVsyLF6AWRj9Y9ACoBXGrPoB1GkNXyAFotUAxLhFUBlVmcXR6AXUEBfGwPSUc-cWXLRmAWxryaDDBTKgAbOmRBclgAehiAdwghMB0iAGYABj5o9DjYIWAaPFhoYDBYeO4AayjyOMTk1NgAcgAmDJAMZuzYmPzC4tLyyq4anNgdGgh2HTACABYs2FCIaBoACSmZudh25xyAI2ZGKvYuYCshAGFgUO4GLnYjgApWgFY37KXvgDo0gEp6LV7Pt0N4_ERmnhgH4Sr4aAAdOB4GiMGBCWDneLNBxOQQo4xFDy1Ki0BhHLj8WoiMBiEgARiWb1a2XaSzSaXm2TSAE52ZlWe07OhHCh7EA)
![image](https://user-images.githubusercontent.com/13038071/217612232-3f3981e4-d7c1-4a32-9856-937fecf9523a.png)
--
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] helgasoft commented on issue #17998: [Bug] yAxis.nameTextStyle.width not working
Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #17998:
URL: https://github.com/apache/echarts/issues/17998#issuecomment-1418262854
Aah, this is fun - how to fix one bug with another !
1) yes, [yAxis.nameTextStyle.width](https://echarts.apache.org/en/option.html#yAxis.nameTextStyle.width) does not do anything
2) while trying a workaround with [padding](https://echarts.apache.org/en/option.html#yAxis.nameTextStyle.padding) I realize it has a bug also...
3) then I use the _padding_ bug to make some kind of a _width_. And it works! (but not responsive)
[Demo Code](https://echarts.apache.org/examples/en/editor.html?c=bar-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXLANqrrpgCeIApkQEQDGAhmDQObABOl9ANGnIATVsyLF6AWRj9Y9ACoBXGrPoB1GkNXyAFotUAxLhFUBlVmcXR6AXUEBfGwPSUc-cWXJVaDAG7MAG2V-QXRoZgBbGnkaDDBTKgC6ZFDyAHo0gHcIITAdIgBmAAYivnJ0tNghYBo8WGhgMFhM7gBrVPQM7Nz82AByYqKQDD6y2AyqmrqGppaudvL0DvHKkGYhIQhodlgAM24I1lh8EjBQMuN2HTAygCNGs4iypN2wO0WV2BoAR0VA2Eu11gADJYC8mv4grVYHgdMBFAEhLBGDRoGwuLA2HE7oomtVoTMiLdFOxlhk1hstuxxKUAIz0vh0-lOMmVNQAJQA8gA5ADiMJoYEg20xwGRqPRmNiszaeGWFM22xpfAA7KUmbSWR8dDQIFcwAQAEylZa3ZiMVrsLjw6BCADCwAC3AYXHYZoAFIaAKxesqlWD-ooAOgKAEp6Kl7M5yOEokQ-nhgFF6pEaH0HFqBcZah5Ut5kvQzVwQuURGAxCRaf6vYaysb_QUCgAWMoFACcDeKdeN71gjhQ9iAA)
![image](https://user-images.githubusercontent.com/13038071/216845355-0bc7d0b3-9d9e-451f-b653-c4fd7985325a.png)
--
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] SongJuXin commented on issue #17998: [Bug] yAxis.nameTextStyle.width not working
Posted by "SongJuXin (via GitHub)" <gi...@apache.org>.
SongJuXin commented on issue #17998:
URL: https://github.com/apache/echarts/issues/17998#issuecomment-1423765346
> Hard to do auto-wrap without _width_, but one can use _new line_ "\n" in text to 'manually' wrap the name. [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=bar-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXLANqrrpgCeIApkQEQDGAhmDQObABOl9ANGnIATVsyLF6AWRj9Y9ACoBXGrPoB1GkNXyAFotUAxLhFUBlVmcXR6AXUEBfGwPSUc-cWXLRmAWxryaDDBTKgAbOmRBclgAehiAdwghMB0iAGYABj5o9DjYIWAaPFhoYDBYeO4AayjyOMTk1NgAcgAmDJAMZuzYmPzC4tLyyq4anNgdGgh2HTACABYs2FCIaBoACSmZudh25xyAI2ZGKvYuYCshAGFgUO4GLnYjgApWgFY37KXvgDo0gEp6LV7Pt0N4_ERmnhgH4Sr4aAAdOB4GiMGBCWDneLNBxOQQo4xFDy1Ki0BhHLj8WoiMBiEgARiWb1a2XaSzSaXm2TSAE52ZlWe07OhHCh7EA) ![image](https://user-images.githubusercontent.com/13038071/217612232-3f3981e4-d7c1-4a32-9856-937fecf9523a.png)
It works for me. It can wrap. Thank you!
I have tried to use "\n", but I don't know why it didn't work at that time.I guess I used it as "/n".
--
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] SongJuXin commented on issue #17998: [Bug] yAxis.nameTextStyle.width not working
Posted by "SongJuXin (via GitHub)" <gi...@apache.org>.
SongJuXin commented on issue #17998:
URL: https://github.com/apache/echarts/issues/17998#issuecomment-1423772497
Now the problem in my project has been solved, but the issue has not been solved, so I will close the issue as "Close as not planned"
--
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