This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch fix-boxplot in repository https://gitbox.apache.org/repos/asf/echarts.git
commit aecee861a4b3365804e64fce6f914c35d5db692d Author: plainheart <[email protected]> AuthorDate: Fri Jan 14 20:33:50 2022 +0800 fix(boxplot): fix invalid logic that causes incorrect band width when axis type is not `category`. --- src/chart/boxplot/boxplotLayout.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/chart/boxplot/boxplotLayout.ts b/src/chart/boxplot/boxplotLayout.ts index 03d9a49..cf6017b 100644 --- a/src/chart/boxplot/boxplotLayout.ts +++ b/src/chart/boxplot/boxplotLayout.ts @@ -90,7 +90,6 @@ function groupSeriesByAxis(ecModel: GlobalModel) { * Calculate offset and box width for each series. */ function calculateBase(groupItem: GroupItem) { - let extent; const baseAxis = groupItem.axis; const seriesModels = groupItem.seriesModels; const seriesCount = seriesModels.length; @@ -108,8 +107,8 @@ function calculateBase(groupItem: GroupItem) { each(seriesModels, function (seriesModel) { maxDataCount = Math.max(maxDataCount, seriesModel.getData().count()); }); - extent = baseAxis.getExtent(), - Math.abs(extent[1] - extent[0]) / maxDataCount; + const extent = baseAxis.getExtent(); + bandWidth = Math.abs(extent[1] - extent[0]) / maxDataCount; } each(seriesModels, function (seriesModel) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
