react-jsx-highcharts
Version:
Highcharts charts built using React components
20 lines • 489 B
JavaScript
import * as React from 'react';
import Axis from '../Axis';
import useChart from '../UseChart';
import { jsx as _jsx } from "react/jsx-runtime";
const XAxis = ({
id,
...rest
}) => {
const chart = useChart();
const isStockChart = chart.type === 'stockChart';
const type = isStockChart ? 'datetime' : 'linear';
const axisId = isStockChart ? 'xAxis' : id;
return /*#__PURE__*/_jsx(Axis, {
type: type,
...rest,
id: axisId,
isX: true
});
};
export default XAxis;