Skip to content

Commit

Permalink
Recording graph optimizations
Browse files Browse the repository at this point in the history
Remove pointless ref
  • Loading branch information
microbit-robert committed Nov 13, 2024
1 parent 0cf8934 commit f8bf297
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/components/RecordingGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ const RecordingGraph = ({ data, children, ...rest }: RecordingGraphProps) => {
};
}, [colors, data]);

const containerRef = useRef<HTMLDivElement>(null);

return (
<Box
ref={containerRef}
borderRadius="md"
borderWidth={1}
borderColor="gray.200"
Expand Down
11 changes: 8 additions & 3 deletions src/recording-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,16 @@ export const getConfig = (
animation: false,
responsive: false,
maintainAspectRatio: false,

interaction: {
intersect: false,
mode: "index",
// @ts-expect-error null disables interaction - the type information is wrong.
mode: null,
},
hover: {
// @ts-expect-error null disables hover - the type information is wrong.
mode: null,
},
normalized: true,
parsing: false,
scales: {
x: {
type: "linear",
Expand Down

0 comments on commit f8bf297

Please sign in to comment.