Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

239
Visualizações
Highcharts js Y axis start from last value

I'm working with highchart and I have the following chart working.

enter image description here

However, I need the next value starts at the point of the previous value.

enter image description here

Can someone help me please?

I use this function to generate chart

function generateChart(chartUrl, id) {
  let options = {};

  $.ajax({
    url: chartUrl,
    data: {name: id},
    success: function (data) {
        options.series[0].data = data;

        // Get categories dynamicaly, not harcoded
        for(let i=0;i<data.length;i++){
          options.xAxis.categories.push(data[i][0]);
        }

      $(`#${id}`).highcharts(options);
    }
  });
}

And this code to Generate Data and Efects on chart

function generateEfectsChart() {
  let options = {
    chart: {
      type: 'column'
    },
    title: {
      text: ''
    },
    exporting: {
      enabled: false
    },
    credits: {
      enabled: false
    },
    xAxis: {
      lineColor: '#FFFFFF',
      lineWidth: 0,
      gridLineColor: '#DADBDF',
      categories: [],
    },
    yAxis: {
      lineColor: '#FFFFFF',
      lineWidth: 0,
      gridLineColor: '#DADBDF',
      plotBands: [{
        color: '#000000', // Color value
        from: 0, // Start of the plot band
        to: 0 // End of the plot band
      }],
      title: {
        text: ''
      },
    legend: {
      enabled: false
    },
    plotOptions: {
      column: {
        dataLabels: {
          enabled: true,
          color: '#000000'
        },
        colorByPoint: true,
        pointWidth: 150
      },
      series: {
        borderWidth: 0,
        dataLabels: {
          enabled: true,
          format: '{point.y}'
        },
        turboThreshold: 0
      }
    },
    series: [{
      negativeColor: '#ED4D5F'
    }]
  };

  return options;
}

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Use the waterfall series type.

Highcharts.chart('container', {
    chart: {
        type: 'waterfall'
    },
    ...,
});

Live demo: https://www.highcharts.com/demo/waterfall

Docs: https://www.highcharts.com/docs/chart-and-series-types/waterfall-series

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda