You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "liuqituo (via GitHub)" <gi...@apache.org> on 2023/08/24 07:21:48 UTC
[GitHub] [echarts] liuqituo opened a new issue, #19037: Line chart, bar chart and other histograms: I set multiple Y axes in the same direction (position:left), and set grid, the maximum and minimum axis range of each axis at the same time, a strange phenomenon appears: There's a blank space on the left side of the chart, and every time you add an axis, there's more space, so all the Y-axes should be on top of each other, and then there's no weird blank space on the left[Bug]
liuqituo opened a new issue, #19037:
URL: https://github.com/apache/echarts/issues/19037
### Version
5.4.3
### Link to Minimal Reproduction
https://echarts.apache.org/examples/zh/editor.html?c=line-simple (Official line chart address can be)()
### Steps to Reproduce
1. Open the official website
2, copy the following code into the official website example
3, try to increase the number of Y axes, you can see the effect
code:
const colors = ['#5470C6', '#91CC75', '#EE6666'];
option = {
grid: {
right: 10,
top:10,
bottom:20,
left:10,
containLabel:true
},
legend: {
data: ['Evaporation', 'Precipitation', 'Temperature']
},
xAxis: [
{
type: 'category',
axisTick: {
alignWithLabel: true
},
// prettier-ignore
data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
}
],
yAxis: [
{
type: 'value',
show:false,
name: '温度',
position: 'left',
min:0,
max:5
},
{
type: 'value',
show:true,
name: '温度',
position: 'left',
min:0,
max:5
},{
type: 'value',
show:true,
name: '温度',
position: 'left',
min:0,
max:5
},{
type: 'value',
show:true,
name: '温度',
position: 'left',
min:0,
max:5
},{
type: 'value',
show:true,
name: '温度',
position: 'left',
min:0,
max:5
},{
type: 'value',
show:true,
name: '温度',
position: 'left',
min:0,
max:5
},
],
series: [
{
name: 'Evaporation',
type: 'bar',
data: [
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
]
},
{
name: 'Precipitation',
type: 'bar',
data: [
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
]
},
{
name: 'Temperature',
type: 'line',
data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
}
]
};
### Current Behavior
As described, there is an abnormal margin on the left side of the histogram
### Expected Behavior
I want the left margin removed
### Environment
```markdown
- OS:
- Browser:
- Framework:
The simplest line chart example can be used for the experiment
```
### Any additional comments?
_No response_
--
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] liuqituo commented on issue #19037: [Bug] Line chart, bar chart and other histograms: I set multiple Y axes in the same direction (position:left), and set grid, the maximum and minimum axis range of each axis at the same time, a strange phenomenon appears: There's a blank space on the left side of the chart, and every time you add an axis, there's more space, so all the Y-axes should be on top of each other, and then there's no weird blank space on the left
Posted by "liuqituo (via GitHub)" <gi...@apache.org>.
liuqituo commented on issue #19037:
URL: https://github.com/apache/echarts/issues/19037#issuecomment-1692670727
> Seems like echarts is reserving space for the axis label which is not displayed because the axis is not in use. Adding `axisLabel: {show: false}` to all axes but the first one resolves your issue: [example](https://echarts.apache.org/examples/zh/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsDmAnCATAXMmurDhgBZiECMADADTHpig0NOwBGwYLAtoQBM7ErAA2AUwBmVWHUaiAxjDABDCNAAyqzhLGEwWAK4TiAXwXiJGCdAJFRuVWsIBtAOQBRAG6qQwLGcoaHd6WHcABSwJRQgQCDVIGFDwgBUJPhAJQLAjaPcAXXNLAA8AQRKIAGc3DlRRZgBPLMJ3RWdrAMbQjnRVSqrUiEUAa0J6hr6xCAxoAHUE8m1dfVhDE17YC02Aeh3YEGjeCGyAWhnoANNJpxdYDwApVRCw9wAxCU4U9wBZVSxvmVDt8_t1Xg8jC9whCxICjBhvgBlCQgb4AeUUYG-ADlgN5vgARGKFDhmYgFSyNCrVWqiCaiMDNCStXxiEw9SZVcjAADuBmMEksomgqj4zPCgEo7QBlehyGv4qglgq1JDJZaI-BpCCIGnx-oQAKxCrZG-kkRktcKs9lG9Bc3n8kw22AisWtaVqkjyxUwZXSLFOjXQLUBvWwQ2bfrVZZ6cZ2vmwKSqMRVCTbURpkimpoW9xWiQe23c-PrQWbF3i9zup1epJB8Iq_2bQPBpuh8OTSNVaOrJBxwiJ5Opo0Z9BZtZMllJ62bPtrAVO8tumXV4AK2u-1UBzWwbXqttOzvd2NF_tJlMj411Tbmit5guwWclheiitVzY1pX1v335s7kMlA0DwGI9kFnAdz2HE1rwn
S0p3zJ1H3nMsXyXe8Px9L9NybbddxIXUALDICox0GNQJPBMzyHUlyUsFMcAkGp7ivSZF3CHw_ACIJkidG9Wk4f571uVRaUmWBBAAOgYWAABZxIATjCAB2SSwkEABmcTBFU_VxIANiU3TxMUsJqDUnT9LkXSJK02A1IkizhBU2BDOksINLUzYinTKCWJQ8IohiOIEi4l5oJzfiAUYTYhJEyZ7LCHSFNgOSnMEFzVIADiMpTaGyuRFPMkyMussJpKy4y5CyjKwkMqSJI8yYvJIC8x1Y9x0kybJnDyeCworaZoF6m5nGE-4JLqzS3PEtTSvEw1nOmkzcpsxyZrEjTXPWpzqEM-bqHGmrNKa9AyXQIozAAbiAA)
Thank you very much. After reading your answer, this problem can be solved
--
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] Ovilia closed issue #19037: [Bug] Line chart, bar chart and other histograms: I set multiple Y axes in the same direction (position:left), and set grid, the maximum and minimum axis range of each axis at the same time, a strange phenomenon appears: There's a blank space on the left side of the chart, and every time you add an axis, there's more space, so all the Y-axes should be on top of each other, and then there's no weird blank space on the left
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia closed issue #19037: [Bug] Line chart, bar chart and other histograms: I set multiple Y axes in the same direction (position:left), and set grid, the maximum and minimum axis range of each axis at the same time, a strange phenomenon appears: There's a blank space on the left side of the chart, and every time you add an axis, there's more space, so all the Y-axes should be on top of each other, and then there's no weird blank space on the left
URL: https://github.com/apache/echarts/issues/19037
--
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] MatthiasMert commented on issue #19037: [Bug] Line chart, bar chart and other histograms: I set multiple Y axes in the same direction (position:left), and set grid, the maximum and minimum axis range of each axis at the same time, a strange phenomenon appears: There's a blank space on the left side of the chart, and every time you add an axis, there's more space, so all the Y-axes should be on top of each other, and then there's no weird blank space on the left
Posted by "MatthiasMert (via GitHub)" <gi...@apache.org>.
MatthiasMert commented on issue #19037:
URL: https://github.com/apache/echarts/issues/19037#issuecomment-1691273130
Seems like echarts is reserving space for the axis label which is not displayed because the axis is not in use. Adding `axisLabel: {show: false}` to all axes but the first one resolves your issue: [example}(https://echarts.apache.org/examples/zh/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsDmAnCATAXMmurDhgBZiECMADADTHpig0NOwBGwYLAtoQBM7ErAA2AUwBmVWHUaiAxjDABDCNAAyqzhLGEwWAK4TiAXwXiJGCdAJFRuVWsIBtAOQBRAG6qQwLGcoaHd6WHcABSwJRQgQCDVIGFDwgBUJPhAJQLAjaPcAXXNLAA8AQRKIAGc3DlRRZgBPLMJ3RWdrAMbQjnRVSqrUiEUAa0J6hr6xCAxoAHUE8m1dfVhDE17YC02Aeh3YEGjeCGyAWhnoANNJpxdYDwApVRCw9wAxCU4U9wBZVSxvmVDt8_t1Xg8jC9whCxICjBhvgBlCQgb4AeUUYG-ADlgN5vgARGKFDhmYgFSyNCrVWqiCaiMDNCStXxiEw9SZVcjAADuBmMEksomgqj4zPCgEo7QBlehyGv4qglgq1JDJZaI-BpCCIGnx-oQAKxCrZG-kkRktcKs9lG9Bc3n8kw22AisWtaVqkjyxUwZXSLFOjXQLUBvWwQ2bfrVZZ6cZ2vmwKSqMRVCTbURpkimpoW9xWiQe23c-PrQWbF3i9zup1epJB8Iq_2bQPBpuh8OTSNVaOrJBxwiJ5Opo0Z9BZtZMllJ62bPtrAVO8tumXV4AK2u-1UBzWwbXqttOzvd2NF_tJlMj411Tbmit5guwWclheiitVzY1pX1v335s7kMlA0DwGI9kFnAdz2HE1rwnS0
p3zJ1H3nMsXyXe8Px9L9NybbddxIXUALDICox0GNQJPBMzyHUlyUsFMcAkGp7ivSZF3CHw_ACIJkidG9Wk4f571uVRaUmWBBAAOgYWAABZxIATjCAB2SSwkEABmcTBFU_VxIANiU3TxMUsJqDUnT9LkXSJK02A1IkizhBU2BDOksINLUzYinTKCWJQ8IohiOIEi4l5oJzfiAUYTYhJEyZ7LCHSFNgOSnMEFzVIADiMpTaGyuRFPMkyMussJpKy4y5CyjKwkMqSJI8yYvJIC8x1Y9x0kybJnDyeCworaZoF6m5nGE-4JLqzS3PEtTSvEw1nOmkzcpsxyZrEjTXPWpzqEM-bqHGmrNKa9AyXQIozAAbiAA)
--
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