Version
5.0.2
Steps to reproduce
1.Set 2 Y axies.
2.Set 2 X axies,second of xAxies set
{ position: 'bottom',
offset: 40
}
Example option code:
option = {
legend: {
data: ['蒸发量', '降水量', '平均温度']
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: ['1月', '2月', '3月', '4月', '5月']
},{
type: 'category',
position: 'bottom',
offset: 40,
show: true,
data: ['31天', '28天', '31天', '30天']
}
],
yAxis: [
{
type: 'value',
name: '蒸发量',
min: 0,
max: 250,
position: 'right',
axisLine: {
show: true,
lineStyle: {
color: colors[0]
}
},
axisLabel: {
formatter: '{value} ml'
}
},
{
type: 'value',
name: '温度',
min: 0,
max: 25,
position: 'left',
axisLine: {
show: true,
lineStyle: {
color: colors[2]
}
},
axisLabel: {
formatter: '{value} °C'
}
}
],
series: [
{
name: '蒸发量',
type: 'line',
data: [2.0, 4.9, 7.0, 23.2, 25.6]
},
{
name: '平均温度',
type: 'line',
yAxisIndex: 1,
data: [2.0, 2.2, 3.3, 4.5, 6.3]
}
]
};
What is expected?
The second xAxis offset 40px.
What is actually happening?
Only the label of the second xAxis offsets. The line of xAxis not offset. The two xAxies coincide.
some background/context of how I ran into this bug:
Statistic gap time between 2 xAxis node.
Version
5.0.2
Steps to reproduce
1.Set 2 Y axies.
2.Set 2 X axies,second of xAxies set
{ position: 'bottom',
offset: 40
}
Example option code:
option = {
legend: {
data: ['蒸发量', '降水量', '平均温度']
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: ['1月', '2月', '3月', '4月', '5月']
},{
type: 'category',
position: 'bottom',
offset: 40,
show: true,
data: ['31天', '28天', '31天', '30天']
}
],
yAxis: [
{
type: 'value',
name: '蒸发量',
min: 0,
max: 250,
position: 'right',
axisLine: {
show: true,
lineStyle: {
color: colors[0]
}
},
axisLabel: {
formatter: '{value} ml'
}
},
{
type: 'value',
name: '温度',
min: 0,
max: 25,
position: 'left',
axisLine: {
show: true,
lineStyle: {
color: colors[2]
}
},
axisLabel: {
formatter: '{value} °C'
}
}
],
series: [
{
name: '蒸发量',
type: 'line',
data: [2.0, 4.9, 7.0, 23.2, 25.6]
},
{
name: '平均温度',
type: 'line',
yAxisIndex: 1,
data: [2.0, 2.2, 3.3, 4.5, 6.3]
}
]
};
What is expected?
The second xAxis offset 40px.
What is actually happening?
Only the label of the second xAxis offsets. The line of xAxis not offset. The two xAxies coincide.
some background/context of how I ran into this bug:
Statistic gap time between 2 xAxis node.