diff --git a/src/components/Charts/LineChart.tsx b/src/components/Charts/LineChart.tsx index e8fd9a5e..5114e033 100644 --- a/src/components/Charts/LineChart.tsx +++ b/src/components/Charts/LineChart.tsx @@ -3,6 +3,7 @@ import { Button } from '@nextui-org/button'; import { useDisclosure } from '@nextui-org/modal'; import Highcharts from 'highcharts'; +import highchartsAccessibility from 'highcharts/modules/accessibility'; import HighchartsReact from 'highcharts-react-official'; import { Maximize4 } from 'iconsax-react'; import { useTheme } from 'next-themes'; @@ -18,6 +19,10 @@ import { LineChartData } from '@/domain/entities/charts/LineChartData'; import LineChartProps from '@/domain/props/LineChartProps'; import LineChartOperations from '@/operations/charts/LineChartOperations'; +if (typeof Highcharts === 'object') { + highchartsAccessibility(Highcharts); +} + /** * The LineChart component is a box that primarily renders a title, description text, and a line chart. * This component has a width of 100%, so it adjusts to the width of its parent element in which it is used. diff --git a/src/components/Charts/LineChartModal.tsx b/src/components/Charts/LineChartModal.tsx index 53412759..9fb58e7d 100644 --- a/src/components/Charts/LineChartModal.tsx +++ b/src/components/Charts/LineChartModal.tsx @@ -1,6 +1,7 @@ import { Button } from '@nextui-org/button'; import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader } from '@nextui-org/modal'; import Highcharts from 'highcharts'; +import highchartsAccessibility from 'highcharts/modules/accessibility'; import HighchartsReact from 'highcharts-react-official'; import { Minus } from 'iconsax-react'; import { useRef } from 'react'; @@ -12,6 +13,10 @@ import LineChartXAxisSlider from '@/components/Charts/helpers/LineChartXAxisSlid import { Tooltip } from '@/components/Tooltip/Tooltip'; import LineChartModalProps from '@/domain/props/LineChartModalProps'; +if (typeof Highcharts === 'object') { + highchartsAccessibility(Highcharts); +} + /** * This component is tied to the `LineChart` component and should not be used independently. * It renders the modal, which can be opened by the user from the `LineChart` to display the chart