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

138
Visualizações
react-chartjs-2 plot x axis at 45° angle

I am attempting to generate a skewt with react-chartjs-2 using the Scatter component

a skewt is a vertical weather profile https://www.weather.gov/jetstream/skewt

import { Scatter } from 'react-chartjs-2';

axes

  • isobars: lines of equal pressure plotted logarithmic along the y axis
  • isotherms: lines of equal temperature plotted at a 45° with temperature values that increase from the upper left to the lower right corner of the chart.

I'm stuck on the isotherms how can I change the angle of the my x axis?

The component gets its configuation from a custom hook

export default function Skewt(){
   const { data, options, plugins, onEvent } = useChart();
   return(
            <Scatter //
                data={data}
                options={options}
                plugins={plugins}
                getDatasetAtEvent={onEvent}
                getElementAtEvent={onEvent}
                getElementsAtEvent={onEvent}
            />
   )
}

...the hook

const useChart = () => {
    const data = useMemo(()=>({...}),[])
    const options = useMemo(
        () => ({
            scales: {
                x: {
                    id: 'isoTherm',
                    type: 'linear',
                    grid: {...}
                },
                y: {
                    id: 'isoBar',
                    type: 'logarithmic',
                    grid:{...},
                },
            },
        }),
        []
    );
    ...
    return { data, options, plugins, onEvent  };
};

react-chartjs-2 Scatter

skew-t

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