ayang88 opened a new issue #8461: 怎样让echarts折线图x轴刻度固定步长
URL: https://github.com/apache/incubator-echarts/issues/8461
 
 
   
   
   ### One-line summary [问题简述]
   
   目前的图标是这种
   http://gallery.echartsjs.com/editor.html?c=xByZCEuzgX&v=1
   我想设置固定步长,即x轴的刻度为0,5,10,15,20。。。。。。
   **前提不能改变数据**
   求大佬。。
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 
option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option = {
      title : {
                text: '合同审批统计图',
               left: 'center'
            },
        tooltip: {
           trigger: 'axis',
           formatter: "{b}天{c}个"
       },
       xAxis: {
        name:'天数',
           type: 'category',
           data : 
[1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,18,20,22,23,25,26,27,29,30,31,32,34,35,36,37,38,42,43,46,47,48,51,53,56,62,63,65,66,67,68,69,70,71,75,77,83,85,86,88,91,96,104,106]
          
       },
       yAxis: {
        name:'个数',
           type: 'value'
       },
       series: [{
        
           data: 
[1,1,4,7,2,2,4,3,1,1,1,1,4,3,1,1,2,2,1,1,1,4,2,1,1,2,2,3,5,3,2,2,1,1,1,3,1,1,1,2,2,3,1,1,2,1,1,1,1,1,1,2,1,1,1,1,1,1],
           type: 'line',
           name:'合同个数'
       }]
   };
   
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to