Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

135
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda