This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new e94465208f5 fix(bar-chart): cap bar width so a single data point 
doesn't stretch across the chart (#39588)
e94465208f5 is described below

commit e94465208f504d1b1e2c12651f29b5870647947e
Author: Abdul Rehman <[email protected]>
AuthorDate: Wed May 13 01:24:46 2026 +0500

    fix(bar-chart): cap bar width so a single data point doesn't stretch across 
the chart (#39588)
    
    Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
---
 .../plugins/plugin-chart-echarts/src/Timeseries/transformers.ts        | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts 
b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
index 2a5f937075b..78c1222a1fc 100644
--- 
a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
+++ 
b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
@@ -389,6 +389,9 @@ export function transformSeries(
     ...(colorByPrimaryAxis ? {} : { itemStyle }),
     // @ts-ignore
     type: plotType,
+    // Cap bar width so a single data point doesn't stretch across the
+    // entire chart area. Bars with many categories auto-size below this cap.
+    ...(plotType === 'bar' ? { barMaxWidth: 100 } : {}),
     smooth: seriesType === 'smooth',
     triggerLineEvent: true,
     // @ts-expect-error

Reply via email to