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/31 07:19:48 UTC
[GitHub] [echarts] FengTian2 opened a new issue #16783: [Bug] The y-axis is not displayed in the correct position
FengTian2 opened a new issue #16783:
URL: https://github.com/apache/echarts/issues/16783
### Version
5.3.1
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
Like this code ,
I want display the "yAxisName1111" on left ,
but is away in the x-axis (0)
or there have other parameters to configure?
this is my test code:
option = {
legend: {
data:['line11', 'line22']
},
tooltip : {
trigger: 'axis',
axisPointer: {
type: 'cross',
animation: false,
}
},
toolbox: {
show: true,
feature: {
dataZoom: {
// yAxisIndex: 'none'
},
dataView: {readOnly: false},
//magicType: {type: ['line']},
restore: {},
saveAsImage: {}
}
},
grid: {
top: 70,
bottom: 50
},
xAxis: [{
type: 'value',
name:'xAxisName111',
nameTextStyle:{
color:'#333'
},
scale:true
},
{
name:'xAxisName222',
type: 'value',
}
],
yAxis:[{
name:'yAxisName1111',
type: 'value',
position:'left',
nameTextStyle:{
color:'#333'
}
},
{
name:'yAxisName2222',
type: 'value',
position:'right',
nameTextStyle:{
color:'#333'
}
}
],
series: [{
name:'line11',
symbolSize: 5,
data: [
[-10, 4],
[1.1, 9],
[1.21, 18],
[1.32, 40],
[1.53, 71],
[1.74, 88],
[1.85, 55],
[1.96, 32],
[2.07, 9],
[2.38, 0.2]
],
type: 'line',
smooth:true,
showSymbol: false,
yAxisIndex: 0,
xAxisIndex:0,
// barGap: 0
},
{
name:'line22',
symbolSize: 5,
yAxisIndex: 1,
xAxisIndex:1,
data: [
[0.98, 1],
[1.3, 6],
[1.41, 27],
[1.62, 45],
[1.73, 77],
[1.84, 85],
[2.05, 47],
[2.16, 18],
[2.37, 6],
[2.38, 0.2]
],
type: 'line',
smooth:true,
showSymbol:false,
barGap: 0
}
]
};
### Current Behavior
none
### Expected Behavior
none
### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### 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
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] FengTian2 commented on issue #16783: [Bug] The y-axis is not displayed in the correct position
Posted by GitBox <gi...@apache.org>.
FengTian2 commented on issue #16783:
URL: https://github.com/apache/echarts/issues/16783#issuecomment-1085367829
>
好的 ,搞定,非常感谢
that right,thank you !
--
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] jiawulin001 edited a comment on issue #16783: [Bug] The y-axis is not displayed in the correct position
Posted by GitBox <gi...@apache.org>.
jiawulin001 edited a comment on issue #16783:
URL: https://github.com/apache/echarts/issues/16783#issuecomment-1084264977
Both x axis and y axis is by default locked at zero of each other. Only after you set `axis.axisLine.onZero` to `false` can you unlock and move it as you wish.
<details>
<summary>Code Sample</summary>
```
option = {
legend: {
data: ['line11', 'line22']
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
animation: false
}
},
toolbox: {
show: true,
feature: {
dataZoom: {
// yAxisIndex: 'none'
},
dataView: { readOnly: false },
//magicType: {type: ['line']},
restore: {},
saveAsImage: {}
}
},
grid: {
top: 70,
bottom: 50
},
xAxis: [
{
type: 'value',
name: 'xAxisName111',
// scale: true
},
{
name: 'xAxisName222',
type: 'value'
}
],
yAxis: [
{
name: 'yAxisName1111',
type: 'value',
axisLine: {
onZero: false
}
},
{
name: 'yAxisName2222',
type: 'value',
axisLine: {
onZero: false
},
}
],
series: [
{
name: 'line11',
symbolSize: 5,
data: [
[-10, 4],
[1.1, 9],
[1.21, 18],
[1.32, 40],
[1.53, 71],
[1.74, 88],
[1.85, 55],
[1.96, 32],
[2.07, 9],
[2.38, 0.2]
],
type: 'line',
smooth: true,
showSymbol: false,
yAxisIndex: 0,
xAxisIndex: 0
// barGap: 0
},
{
name: 'line22',
symbolSize: 5,
yAxisIndex: 1,
xAxisIndex: 0,
data: [
[0.98, 1],
[1.3, 6],
[1.41, 27],
[1.62, 45],
[1.73, 77],
[1.84, 85],
[2.05, 47],
[2.16, 18],
[2.37, 6],
[2.38, 0.2]
],
type: 'line',
smooth: true,
showSymbol: false,
barGap: 0
}
]
};
```
</details>
@pissang @plainheart I think setting `axisLine.onZero` as true by default would be sometimes very confusing, because it will make `axis.position` and `axis.offset` completely dead before user find out there's a `onZero` locking these options. I would suggest we at least clarify in **documentation** that user should turn off `onZero` before they use `position` and `offset`.
--
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] susiwen8 closed issue #16783: [Bug] The y-axis is not displayed in the correct position
Posted by GitBox <gi...@apache.org>.
susiwen8 closed issue #16783:
URL: https://github.com/apache/echarts/issues/16783
--
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] jiawulin001 commented on issue #16783: [Bug] The y-axis is not displayed in the correct position
Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on issue #16783:
URL: https://github.com/apache/echarts/issues/16783#issuecomment-1084264977
Both x axis and y axis is by default locked at zero of each other. Only after you set `axis.axisLine.onZero` to `false` can you unlock and move it as you wish.
<details>
<summary>Code Sample</summary>
```
option = {
legend: {
data: ['line11', 'line22']
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
animation: false
}
},
toolbox: {
show: true,
feature: {
dataZoom: {
// yAxisIndex: 'none'
},
dataView: { readOnly: false },
//magicType: {type: ['line']},
restore: {},
saveAsImage: {}
}
},
grid: {
top: 70,
bottom: 50
},
xAxis: [
{
type: 'value',
name: 'xAxisName111',
// scale: true
},
{
name: 'xAxisName222',
type: 'value'
}
],
yAxis: [
{
name: 'yAxisName1111',
type: 'value',
axisLine: {
onZero: false
}
},
{
name: 'yAxisName2222',
type: 'value',
axisLine: {
onZero: false
},
}
],
series: [
{
name: 'line11',
symbolSize: 5,
data: [
[-10, 4],
[1.1, 9],
[1.21, 18],
[1.32, 40],
[1.53, 71],
[1.74, 88],
[1.85, 55],
[1.96, 32],
[2.07, 9],
[2.38, 0.2]
],
type: 'line',
smooth: true,
showSymbol: false,
yAxisIndex: 0,
xAxisIndex: 0
// barGap: 0
},
{
name: 'line22',
symbolSize: 5,
yAxisIndex: 1,
xAxisIndex: 0,
data: [
[0.98, 1],
[1.3, 6],
[1.41, 27],
[1.62, 45],
[1.73, 77],
[1.84, 85],
[2.05, 47],
[2.16, 18],
[2.37, 6],
[2.38, 0.2]
],
type: 'line',
smooth: true,
showSymbol: false,
barGap: 0
}
]
};
```
</details>
@pissang @plainheart I think setting `axisLine.onZero` as true by default would be sometimes very confusing, because it will make `axis.position` and `axis.offset` completely dead before user find out there's a `onZero` locking these options. I would suggest we at least clarify that user should turn off `onZero` before they use `position` and `offset`.
--
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] jiawulin001 edited a comment on issue #16783: [Bug] The y-axis is not displayed in the correct position
Posted by GitBox <gi...@apache.org>.
jiawulin001 edited a comment on issue #16783:
URL: https://github.com/apache/echarts/issues/16783#issuecomment-1084264977
Both x axis and y axis is by default locked at zero of each other. Only after you set `axis.axisLine.onZero` to `false` can you unlock and move it as you wish.
<details>
<summary>Code Sample</summary>
```
option = {
legend: {
data: ['line11', 'line22']
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
animation: false
}
},
toolbox: {
show: true,
feature: {
dataZoom: {
// yAxisIndex: 'none'
},
dataView: { readOnly: false },
//magicType: {type: ['line']},
restore: {},
saveAsImage: {}
}
},
grid: {
top: 70,
bottom: 50
},
xAxis: [
{
type: 'value',
name: 'xAxisName111',
// scale: true
},
{
name: 'xAxisName222',
type: 'value'
}
],
yAxis: [
{
name: 'yAxisName1111',
type: 'value',
axisLine: {
onZero: false
}
},
{
name: 'yAxisName2222',
type: 'value',
axisLine: {
onZero: false
},
}
],
series: [
{
name: 'line11',
symbolSize: 5,
data: [
[-10, 4],
[1.1, 9],
[1.21, 18],
[1.32, 40],
[1.53, 71],
[1.74, 88],
[1.85, 55],
[1.96, 32],
[2.07, 9],
[2.38, 0.2]
],
type: 'line',
smooth: true,
showSymbol: false,
yAxisIndex: 0,
xAxisIndex: 0
// barGap: 0
},
{
name: 'line22',
symbolSize: 5,
yAxisIndex: 1,
xAxisIndex: 0,
data: [
[0.98, 1],
[1.3, 6],
[1.41, 27],
[1.62, 45],
[1.73, 77],
[1.84, 85],
[2.05, 47],
[2.16, 18],
[2.37, 6],
[2.38, 0.2]
],
type: 'line',
smooth: true,
showSymbol: false,
barGap: 0
}
]
};
```
</details>
@pissang @plainheart I think setting `axisLine.onZero` as true by default would be sometimes very confusing, because it will make `axis.position` and `axis.offset` completely dead before user find out there's a `onZero` locking these options. I would suggest we at least clarify in documentation that user should turn off `onZero` before they use `position` and `offset`.
--
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