Skip to content

Commit

Permalink
消すのではなくHighchartsAccessibilityを読み込むようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
miyabin4113 committed Nov 3, 2023
1 parent ea28ff8 commit b94274a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/components/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { usePopulation } from '@/hooks/api/usePopulation';
import { useHighcharts } from '@/hooks/useHighcharts';
import Highcharts from 'highcharts';
import HighchartsExporting from 'highcharts/modules/exporting';
import HighchartsAccessibility from 'highcharts/modules/accessibility';
import HighchartsReact from 'highcharts-react-official';
import { type Dispatch, type SetStateAction, useEffect } from 'react';
import type {
Expand All @@ -13,6 +14,7 @@ import type { PopulationGraphData } from '@/interfaces/population';

if (typeof Highcharts === 'object') {
HighchartsExporting(Highcharts);
HighchartsAccessibility(Highcharts);
}

interface Props {
Expand Down
3 changes: 0 additions & 3 deletions src/hooks/useHighcharts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ export const useHighcharts = ({ displayCondition, graphData }: Props) => {
text: `${displayCondition}グラフ`,
},
series: [],
accessibility: {
enabled: false,
},
};
}, [displayCondition]);

Expand Down

0 comments on commit b94274a

Please sign in to comment.