You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/02/11 15:49:04 UTC

[GitHub] [echarts] nisori opened a new issue #16497: [Bug] Bar chart yaxis min/max not working with too few series data items

nisori opened a new issue #16497:
URL: https://github.com/apache/echarts/issues/16497


   ### Version
   
   5.3.0
   
   ### Link to Minimal Reproduction
   
   https://jsfiddle.net/3dag9oen/
   
   ### Steps to Reproduce
   
   Using https://echarts.apache.org/examples/en/editor.html?c=bar-simple :
   
   --- bad case ---
   
   option = {
     xAxis: {
       type: 'time',
       min: '2022-01-01',
       max: '2022-12-31'
     },
     yAxis: { type: 'value', },
     series: [ {
         type:'bar',
         data: [
           ['2022-01-15',100.00],
           ['2022-02-15',100.00],
     ] } ]
   };
   
   
   --- good case ---
   
   option = {
     xAxis: {
       type: 'time',
       min: '2022-01-01',
       max: '2022-12-31'
     },
     yAxis: { type: 'value', },
     series: [ {
         type:'bar',
         data: [
           ["2022-01-15","100.00"],
           ["2022-02-15","100.00"],
           ["2022-12-15","100.00"],
     ] } ]
   };
   
   ### Current Behavior
   
   With just one or two items in series.data, the date range on the x-axis is incorrect, the axis should go from 2022-01-01 to 2022-12-31 (but is shown 2021-01-01 to 2024-12-31).
   
   From three items in series.data, the axis range shown is correct.
   
   ### Expected Behavior
   
   x-axis should be plotted according to the min/max definition
   
   ### Environment
   
   ```markdown
   - OS: Windows
   - Browser: Opera
   - Framework: plain PHP, jquery and echarts 5.3.0
   ```
   
   
   ### 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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org