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';
logarithmic along the y axisI'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 };
};