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

232
Visualizações
jqPlot LineRenderer plotting against date xaxis over DST change

As the title says, I am plotting data values against a date x-axis. The data spans a DST change in the UK. The x-axis displays as I'd like - in spring 01:00 is missing, in autumn it is duplicated.

However, for reasons around the fact I'm using a customised line renderer and point info, I need the data points to be plotted against the SECOND of the two 01:00 -> 02:00 periods, not the first.

Can I do that?

Here is a cut down sample - it uses the standard LineRenderer, but that exhibits the same behaviour:

http://jsfiddle.net/whelkaholism/yqrLx7z5/


    var arr = [
        [new Date('2021-10-31T00:30:00'), 4, 0.1, {}],
        [new Date('2021-10-31T00:45:00'), 4, 0.1, {}],
        [new Date('2021-10-31T01:00:00'), 4, 0.1, {}],
        [new Date('2021-10-31T01:15:00'), 6, 0.1, {}],
        [new Date('2021-10-31T01:30:00'), 2, 0.1, {}],
        [new Date('2021-10-31T01:45:00'), 5, 0.1, {}],
        [new Date('2021-10-31T02:00:00'), 1, 0.1, {}],
        [new Date('2021-10-31T02:15:00'), 7, 0.1, {}],
        [new Date('2021-10-31T02:30:00'), 3, 0.1, {}],
        [new Date('2021-10-31T02:45:00'), 4, 0.1, {}]
    ]

    plot1 = $.jqplot('chartdiv', [arr], {
        title: 'DST',
        axes: {
            xaxis: {
                renderer: $.jqplot.DateAxisRenderer
            }
        },
        seriesDefaults: {
            renderer: $.jqplot.LineRenderer            
        }
    });
});

This gives the following chart; the red circle shows the points in the first 01:00 period, the green circle shows where I want them.

enter image description here

about 4 years ago · Juan Pablo Isaza
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