title: Highcharts : yAxis, values rounded to a maximum of two decimal places
body: <p>The code of my graph is this (take data from a php page and then adds some series): </p>
  
  <pre><code>$('#grafico_1').highcharts({
  
  chart: {
      type: 'line',
      zoomType: 'xy',
      animation : false,
      events: {
      selection: function(event) {
  
          if(event.resetSelection){
  
              setTimeout(function(e){
  
                  var chart = $('#grafico_1').highcharts();
                  var extreme = chart.yAxis[0].getExtremes();
  
                  var mio_min = parseFloat(proprieta_temperatura_aperto[34]);
                  var mio_max = parseFloat(proprieta_temperatura_aperto[35]);
  
                  if(extreme.dataMin &lt; mio_min){
                      mio_min = extreme.dataMin;
                  }
                  if(extreme.dataMax &gt; mio_max){
                      mio_max = extreme.dataMax;
                  }
  
                  chart.yAxis[0].setExtremes(mio_min,mio_max);
  
                  $("#temperatura_min_max_rilevato").html("Min "+extreme.dataMin+"°C - Max "+extreme.dataMax+"°C");
                  //console.log("zoom - ");
  
              }, 10);
          }else{
  
              setTimeout(function(e){
                  var chart = $('#grafico_1').highcharts();
                  var extreme = chart.yAxis[0].getExtremes();
                  $("#temperatura_min_max_rilevato").html("Min "+extreme.dataMin+"°C - Max "+extreme.dataMax+"°C");
                  //console.log("zoom + "+JSON.stringify(extreme));
              }, 50);
  
          }
  
      }
  },
  },
  
  credits : {
     enabled : false
  },
  
  title: {
      text: 'Grafico di Oggi'
  },
  
  xAxis: {
      type: 'datetime',
      title: {
          text: false
      }
  },
  
  yAxis: [
     {
          title: {
              text: false
          },
          labels: {
          format: '{value}°C',
      },
          //ceiling : parseFloat(proprieta_temperatura_aperto[35]),
          //floor: parseFloat(proprieta_temperatura_aperto[34]),
          max : parseFloat(proprieta_temperatura_aperto[35]),
          min: parseFloat(proprieta_temperatura_aperto[34]),
  
  
      },
      {
          title: {
              text: false
          },
          min: 0,
          max : 1,
          ceiling:1,
          floor : 0,
          //tickLength : 1,
          opposite: true,
          tickInterval: 1,
          labels: {
              formatter: function() {
                  if (this.value == 0 || this.value == 1){
                      return this.value;
                  }else{
                      return null;
                  }
              }
          }
      }
  ],
  
  
  tooltip: {
  
      formatter: function() {
  
          var s = '&lt;b&gt;Data&lt;/b&gt; '+Highcharts.dateFormat('%H:%M:%S', this.x) + '&lt;br&gt;&lt;b&gt;Temperatura&lt;/b&gt; ' + this.y + '°C&lt;br/&gt;';
  
          $.each(this.points, function(i, point) {
  
              if(point.series.name != "Temperatura"){
                  s += '&lt;b&gt;' + point.series.name +'&lt;/b&gt; : '+ point.y + '&lt;br&gt;';
              }
  
          });
  
          return s;
      },
      shared: true,
      backgroundColor: '#FCFFC5'
  },
  
  plotOptions: {
     line : {
         turboThreshold: 0,
      },
      series: {
          animation: false,
          marker: {
             enabled: false
          }
      }
  },
  
  series: []
  
  });
  </code></pre>
  
  <p>the problem occurs when run one (or more) zoom on the graphs , and on the y-axis the values ​​are listed with more than two decimal places. I would like to limit to two the maximum number of decimal places.</p>
  
  <p><img src="https://i.stack.imgur.com/COQ0W.png" alt="enter image description here"></p>
  
  <p>I think i have to change this field (<a href="http://api.highcharts.com/highcharts#xAxis.labels.format" rel="nofollow noreferrer">format</a>)</p>
  
  <pre><code>yAxis: [
      {
      labels: {
         format: '{value}°C',
           },
  </code></pre>
  
  <p>but I do not know how.</p>