Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

134
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!