search

Home  >  Q&A  >  body text

javascript - echart sets ymax:1000. Values ​​greater than 1000 will exceed the hidden display of the image. It is hoped that values ​​exceeding 1000 will be on the y-axis point of 1000.

yAxis: [
            {
               type : 'value',
                position: 'right',
                max: 1000
            }
        ],

I don’t know why I can’t upload the picture, click here

大家讲道理大家讲道理2782 days ago432

reply all(2)I'll reply

  • 漂亮男人

    漂亮男人2017-05-19 10:15:02

    The y setting max of echarts refers to the display value of the y-axis. When you get the data, you can loop and judge if it exceeds 1000, it is equal to 1000, and then draw echart

    reply
    0
  • 怪我咯

    怪我咯2017-05-19 10:15:02

    Your requirement should be controlled in the data instead of setting it in yAxis. You can perform function processing on the y value of the data to be passed into echart. If it is greater than 1000, just set it to 1000. For example, in the array.map(function(e){....}) function, just continue to judge and process the y value of each item.

    reply
    0
  • Cancelreply