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

397
Visualizações
Highcharts, datetime, xAxis label. How to show all dates on x axis, not only even dates?

I'm new with Highcharts and stuck with a question. I need to display all dates on x axis, but by default, I'm supposing, only even dates are displaying. How can I display all dates? enter image description here

Here my code:

const options: Options = {
        chart: {
            type: 'column',
        },
        title: {
            text: '',
        },
        xAxis: {
            crosshair: false,
            type: 'datetime',
            title: {
                text: 'Days',
            },
            labels: {
                format: LABEL_FORMAT[period],
                rotation: 90,
                align: 'left',
            },
        },
        legend: {
            enabled: true,
        },
        credits: {
            enabled: false,
        },
        yAxis: {
            title: {
                text: 'Values',
            },
        },
        series: [
            {
                name: 'test',
                type: 'column',
                data: [
                    [1651363200000, 10],
                    [1651449600000, 15],
                    [1651536000000, 5],
                    ...
                ],
            },
            {
                name: 'test 2',
                type: 'column',
                data: [
                    [1651363200000, 10],
                    [1651449600000, 20],
                    [1651536000000, 30],
                    ...
                ],
            },
        ],
       },
    };

This chart is not only used for to display day, but also for months and years. Please, answer my question

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

0

Use the xAxis.tickInterval option. In this case:

  xAxis: {
    tickInterval: 24 * 3600 * 1000,
    type: 'datetime',
    labels: {
      format: '{value:%Y-%m-%d}',
      rotation: 90,
      align: 'left'
    },
  }

Demo: https://jsfiddle.net/BlackLabel/t0Lohusx/

API Reference: https://api.highcharts.com/highcharts/xAxis.tickInterval

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