Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

echarts 同时设置y轴不为小数 不为负数时 minInterval: 1失效 如何解决?

因项目中y轴的数据是车辆台次 不能为小数 所以加了minInterval: 1,但是加了这行代码后y轴出现了负轴,解决此问题添加了min: 0,这样操作后最终效果如下,请问如何解决?

我看到有的答案建议设置max值为5,但是这里的数据是后台动态获取的,不能这样操作,在线等

 yAxis: [
                  {
                      minInterval: 1,
                      min: 0,
                      type: 'value',
                      name: '台次/台',
                      axisLabel: {
                          formatter: '{value}'
                      }
                  },
              ]

image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

已解决 版本问题


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...