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

149
Visualizações
Plotly Format Axis Date

In the following code, if I choose scatter3d instead of scatter, all parameter tickformat and title inside xaxis are completely ignored, and it is impossible to format anything under any axis.

Any suggetion would be appreciated.

Failing 3D Plot with outrageous date format

enter image description here

Working Plot with proper HH:MM:SS Format

enter image description here

function setup_plot(){
    type='scatter';
    var x=[],x0=new Date();
    for (i=0;i<5;i++){
        x[i]=new Date();
        x[i].setTime(x0.getTime()+i*12*3600000);
    }
    var trace = [
        {
            type: type,
            mode: 'lines',
            x: x,
            y: [1.0,1.0,1.0,1.0,1.0],
            z: [2.6,1.2,6.3,4.8,4.7]
        },
        {
            type: type,
            mode: 'lines',
            x: x,
            y: [2.0,2.0,2.0,2.0,.0],
            z: [3.1,2.6,4.8,3.8,1.7]
        }
    ];
    var layout = {
        title: "Failing Plot",
        xaxis:{
            title:'Dates',
            tickformat: '%H:%M:%S',
            tickformatstops: [
                {
                dtickrange: [1000,60000],
                value: '%H:%M:%S'
                },
                {
                dtickrange: [60000,3600000],
                value: '%H:%M:%S'
                },
                {
                dtickrange: [3600000,86400000],
                value: '%H:%M:%S'
                },
                {
                dtickrange: [86400000,604800000],
                value: '%d'
                }
            ]
        }
    };
    Plotly.newPlot('plot',trace,layout);

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

0

For 3d charts, axis layouts have to be provided within a scene, so

const layout = {
  scene: {
    xaxis: {
      title: 'Dates',
      ...
    }
  }
}

See https://plotly.com/javascript/3d-axes/

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