search

Home  >  Q&A  >  body text

How to set echart 3.0 y-axis to a positive integer less than 5? ? ?

echart 3.0 How to set the y-axis to a positive integer less than 5? ? ?

yAxis: {
    type: 'value',
    min:0,
    minInterval:1
},

The above settings set the y coordinate to be displayed as decimals. . .

怪我咯怪我咯2780 days ago611

reply all(1)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-05-19 10:37:54

    It stands to reason that if you set minInterval:1, there will be no decimals in the interval. It may be that the maximum value of the data you want to display is lower than 1, so for the display effect, it is automatically converted into a reasonable split ratio, like splitNumber in echart This type of configuration is an estimated value. The actual scale calculated based on the strategy may not achieve the desired effect. It is recommended that you add max:5 to yAxis. Give it a try. If that still doesn't work, you can use max:5,min:0,interval:5 to force settings. This is doable

    reply
    0
  • Cancelreply