如果Y.axis相同,Highchart不显示行

My highchart shows data line only if value are different, if the value are the same like in this example 1100, it shows only the 1465 data like a point. The problem is with Y.axis if the data have the same value in a consecutif way. Thank You. Resulta image of highchart

$( document ).ready(function() {
      var datacharts = ["1100","1100","1100","1100","1100","1100","1100","1100","1100","1100",1465,"1100"];
      Highcharts.chart('container', {
        chart: {
          type: 'line',
          height:500,
          options3d: {
            enabled: true,
            alpha: 15,
            beta: -10,
            viewDistance: 180,
            depth: 100
          }
        },
          title: {
              text: 'Personne 1'
          },

        xAxis: {
          categories: ["mars","avril","mai","juin","juil.","ao\u00fbt","sept.","oct.","nov.","d\u00e9c.","janv.","f\u00e9vr."],
          labels: {
            skew3d: true,
            style: {
              fontSize: '16px'
            }
          }
        },

        yAxis: {
          allowDecimals: false,
          min: 800,
          color:'red',
          title: {
            text: 'Prime Par mois',
            skew3d: true
          }
        },


        plotOptions: {
          column: {
            stacking: 'normal',
            depth: 40
          }
        },

        series: [{
          name: 'Data',
          data: datacharts,
          color: '#0e9bb7'
        }]
      });
});
</script>
评论
  • raut
    raut 回复

    问题是您将数据作为字符串而不是数字进行传递。尝试这个:

    var datacharts = [1100,1100,1100,1100,1100,1100,1100,1100,1100,1100,1465,1100];
    

    In your example 1465 is the only one that isn't a string, for this reason it is being represented on the chart.