-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Open
Labels
bugenThis issue is in EnglishThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.
Description
Version
5.5.1
Link to Minimal Reproduction
https://codesandbox.io/p/sandbox/apache-echarts-demo-forked-4vg9mg
Steps to Reproduce
just open https://codesandbox.io/p/sandbox/apache-echarts-demo-forked-4vg9mg
The bug is reproduced with the xAxis type = time and add any bars.
Current Behavior
Bars offset totally incorrect!
Expected Behavior
The bars should be positioned exactly in their positions.
Environment
- OS: Ubuntu 20.04.6
- Browser: Chrome 139.0.7258.127
- Framework: Vue@2
Any additional comments?
let offset = -widthSum / 2;
each(stacks, function (column, stackId) {
result[coordSysName][stackId] = result[coordSysName][stackId] || {
bandWidth: bandWidth,
offset: offset,
width: column.width
} as BarWidthAndOffset[string][string];
offset += column.width * (1 + barGapPercent);
});
if change it to
each(stacks, function (column, stackId) {
result[coordSysName][stackId] = result[coordSysName][stackId] || {
bandWidth: bandWidth,
offset: -column.width / 2,
width: column.width
} as BarWidthAndOffset[string][string];
});
Everything is working as it should, but it seems that offset is needed for something :)). I have not found a single case where this would be necessary, everything seems to be working well.
If you tell me where this offset curve is needed, I will try to fix it and send you an pull request.
Metadata
Metadata
Assignees
Labels
bugenThis issue is in EnglishThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.