VChart
VChart copied to clipboard
[Bug] 当有三个系列时,中间一个系列的零值无法对齐
Version
1.13.8
Link to Minimal Reproduction
https://www.visactor.com/vchart/demo/combination/dual-axis?version=2.0.6
Steps to Reproduce
以下代码粘至官网:
const spec = {
type: 'common',
seriesField: 'color',
data: [
{
"id": "marginDollar",
"values": [
{
"x": "2025-08",
"y": -1291.67,
"type": "Margin $"
},
{
"x": "2025-09",
"y": 3095.18,
"type": "Margin $"
},
{
"x": "2025-10",
"y": 1157.68,
"type": "Margin $"
}
]
},
{
"id": "marginRate",
"values": [
{
"x": "2025-08",
"y": -21.14,
"type": "Margin2"
},
{
"x": "2025-09",
"y": 13.02,
"type": "Margin2"
},
{
"x": "2025-10",
"y": 10.75,
"type": "Margin2"
}
]
},
{
"id": "roi",
"values": [
{
"x": "2025-08",
"y": 0.95,
"type": "ROI"
},
{
"x": "2025-09",
"y": 1.51,
"type": "ROI"
},
{
"x": "2025-10",
"y": 1.41,
"type": "ROI"
}
]
}
],
series: [
{
type: 'bar',
id: 'bar',
dataIndex: 0,
label: { visible: true },
seriesField: 'type',
xField: ['x', 'type'],
yField: 'y',
stack: false
},
{
type: 'bar',
id: 'line',
dataIndex: 2,
label: { visible: true },
seriesField: 'type',
xField: ['x', 'type'],
yField: 'y',
stack: false
},
{
type: 'bar',
id: 'bar',
dataIndex: 1,
label: { visible: true },
seriesField: 'type',
xField: ['x', 'type'],
yField: 'y',
stack: false
},
],
axes: [
{
id: "axes1",
type: 'linear',
zero: true,
orient: 'left',
seriesIndex: [0],
sync: {
"axisId": "",
"zeroAlign": true,
"tickAlign": true
}
},
{
id: "axes2",
type: 'linear',
zero: true,
orient: 'left',
seriesIndex: [2],
sync: {
"axisId": "axes1",
"zeroAlign": true,
"tickAlign": true
}
},
{
orient: 'right',
type: 'linear',
zero: true,
seriesId: ['line'],
grid: { visible: false },
sync: {
"axisId": "axes1",
"zeroAlign": true,
"tickAlign": true
}
},
{ orient: 'bottom', label: { visible: true }, type: 'band' }
],
legends: {
visible: true,
orient: 'bottom'
}
}
Current Behavior
3个系列无法零值对齐
Expected Behavior
3个系列的零值对齐
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response