khazit opened a new issue, #21478:
URL: https://github.com/apache/echarts/issues/21478

   ### Version
   
   5.6.0
   
   ### Link to Minimal Reproduction
   
   
https://echarts.apache.org/examples/en/editor.html?c=bar-simple&code=yy8oyczPU7BVqOZSUKhwrMgstgIzFRRKKgtSrRTUSzJzU9V1gCK1IKISi4qyxJzSVHWYiuLUosxUoJJosBKIQgWFlMSSRJgYCEQbmptZmBhZmBmAgI6CYSxIL7KcmZkJhhycAbU5KbEI7DQQALLDM1NKMqwUlCwNVJUgwrVAMpar1hoA&enc=deflate
   
   ### Steps to Reproduce
   
   1. Create a bar chart using Apache ECharts with a time-based xAxis.
   2. Use two data points that are only a few hours apart.
   3. Render the chart without barWidth and observe the xAxis padding (minimal, 
a few hours).
   4. Add barWidth: "90%" to the bar series.
   5. Re-render the chart and observe that the xAxis min/max expand by multiple 
days.
   
   ```
   option = {
     xAxis: {
       type: 'time',
     },
     yAxis: {
       type: 'value'
     },
     series: [
       {
         type: 'bar',
         barWidth: '90%',
         data: [
           [1768428600000, 1],
           [1768466400000, 1],
         ],
       }
     ]
   };
   ```
   
   ### Current Behavior
   
   When barWidth is explicitly set on a bar series using a time xAxis, ECharts 
significantly expands the computed xAxis range (min/max), resulting in several 
days of padding before and after the actual data points.
   
   This does not happen when barWidth is omitted.
   
   ### Expected Behavior
   
   Setting barWidth should only affect the visual width of bars and must not 
influence the xAxis min/max calculation.
   
   The xAxis range and padding should remain consistent with the default 
behavior when barWidth is not specified.
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   ### Any additional comments?
   
   _No response_


-- 
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]

Reply via email to