Skip to content

Commit

Permalink
feat: readd hc a11y correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Tschonti committed Dec 13, 2024
1 parent af8674b commit 5561389
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/Charts/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions src/components/Charts/LineChartModal.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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
Expand Down

0 comments on commit 5561389

Please sign in to comment.