Lys-is opened a new issue, #21269: URL: https://github.com/apache/echarts/issues/21269
### Version 5.5.1 ### Link to Minimal Reproduction https://codesandbox.io/p/sandbox/jjh947 ### Steps to Reproduce just open https://codesandbox.io/p/sandbox/jjh947 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 ```markdown - OS: Ubuntu 20.04.6 - Browser: Chrome 139.0.7258.127 - Framework: Vue@2 ``` ### Any additional comments? [src/layout/barGrid.ts](https://github.com/apache/echarts/blob/513918064ac2a0866433d434dc969220f12b9c1a/src/layout/barGrid.ts#L405-L414) ``` 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. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
