diff --git a/package-lock.json b/package-lock.json index 6ffff8f4..a671b5a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "react-modal": "3.16.1", "react-router-dom": "6.6.1", "react-scripts": "5.0.1", - "react-tooltip": "4.5.1", + "react-tooltip": "5.4.0", "sanitize-html": "2.8.1", "sass": "1.57.1", "typescript": "4.9.4", @@ -2274,6 +2274,19 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "node_modules/@floating-ui/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.1.0.tgz", + "integrity": "sha512-zbsLwtnHo84w1Kc8rScAo5GMk1GdecSlrflIbfnEBJwvTSj1SL6kkOYV+nHraMCPEy+RNZZUaZyL8JosDGCtGQ==" + }, + "node_modules/@floating-ui/dom": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.1.0.tgz", + "integrity": "sha512-TSogMPVxbRe77QCj1dt8NmRiJasPvuc+eT5jnJ6YpLqgOD2zXc5UA3S1qwybN+GVCDNdKfpKy1oj8RpzLJvh6A==", + "dependencies": { + "@floating-ui/core": "^1.0.5" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", @@ -13871,27 +13884,16 @@ } }, "node_modules/react-tooltip": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-4.5.1.tgz", - "integrity": "sha512-Zo+CSFUGXar1uV+bgXFFDe7VeS2iByeIp5rTgTcc2HqtuOS5D76QapejNNfx320MCY91TlhTQat36KGFTqgcvw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-5.4.0.tgz", + "integrity": "sha512-bfUZUQ1im0TrO49yhG4qtYsx4WTPzF4TSELAgQfcOYuUfO7Ho09SdIU9LxzbBwhH55ZWgYhOpeCp9VKH6Cokdw==", "dependencies": { - "prop-types": "^15.8.1", - "uuid": "^7.0.3" - }, - "engines": { - "npm": ">=6.13" + "@floating-ui/dom": "^1.0.4", + "classnames": "^2.3.2" }, "peerDependencies": { - "react": ">=16.0.0", - "react-dom": ">=16.0.0" - } - }, - "node_modules/react-tooltip/node_modules/uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", - "bin": { - "uuid": "dist/bin/uuid" + "react": ">=18.0.0", + "react-dom": ">=18.0.0" } }, "node_modules/readable-stream": { @@ -18059,6 +18061,19 @@ } } }, + "@floating-ui/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.1.0.tgz", + "integrity": "sha512-zbsLwtnHo84w1Kc8rScAo5GMk1GdecSlrflIbfnEBJwvTSj1SL6kkOYV+nHraMCPEy+RNZZUaZyL8JosDGCtGQ==" + }, + "@floating-ui/dom": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.1.0.tgz", + "integrity": "sha512-TSogMPVxbRe77QCj1dt8NmRiJasPvuc+eT5jnJ6YpLqgOD2zXc5UA3S1qwybN+GVCDNdKfpKy1oj8RpzLJvh6A==", + "requires": { + "@floating-ui/core": "^1.0.5" + } + }, "@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", @@ -26437,19 +26452,12 @@ } }, "react-tooltip": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-4.5.1.tgz", - "integrity": "sha512-Zo+CSFUGXar1uV+bgXFFDe7VeS2iByeIp5rTgTcc2HqtuOS5D76QapejNNfx320MCY91TlhTQat36KGFTqgcvw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-5.4.0.tgz", + "integrity": "sha512-bfUZUQ1im0TrO49yhG4qtYsx4WTPzF4TSELAgQfcOYuUfO7Ho09SdIU9LxzbBwhH55ZWgYhOpeCp9VKH6Cokdw==", "requires": { - "prop-types": "^15.8.1", - "uuid": "^7.0.3" - }, - "dependencies": { - "uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==" - } + "@floating-ui/dom": "^1.0.4", + "classnames": "^2.3.2" } }, "readable-stream": { diff --git a/package.json b/package.json index ac28371d..5d531cb2 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "react-modal": "3.16.1", "react-router-dom": "6.6.1", "react-scripts": "5.0.1", - "react-tooltip": "4.5.1", + "react-tooltip": "5.4.0", "sanitize-html": "2.8.1", "sass": "1.57.1", "typescript": "4.9.4", diff --git a/src/components/Chart/BlipPoints.tsx b/src/components/Chart/BlipPoints.tsx index 0797908e..370b235e 100644 --- a/src/components/Chart/BlipPoints.tsx +++ b/src/components/Chart/BlipPoints.tsx @@ -65,7 +65,7 @@ function renderBlip( fill: blip.colour, "data-background-color": blip.colour, "data-text-color": blip.txtColour, - "data-tip": blip.title, + "data-tooltip-content": blip.title, key: index, }; switch (blip.flag) { diff --git a/src/components/Chart/BlipShapes.tsx b/src/components/Chart/BlipShapes.tsx index 29942d87..4b3fc1f0 100644 --- a/src/components/Chart/BlipShapes.tsx +++ b/src/components/Chart/BlipShapes.tsx @@ -8,7 +8,7 @@ type VisualBlipProps = { fill: string; "data-background-color": string; "data-text-color": string; - "data-tip": string; + "data-tooltip-content": string; key: number; }; diff --git a/src/components/Chart/RadarChart.tsx b/src/components/Chart/RadarChart.tsx index 3155e329..55284eac 100644 --- a/src/components/Chart/RadarChart.tsx +++ b/src/components/Chart/RadarChart.tsx @@ -1,6 +1,6 @@ import * as d3 from "d3"; import React from "react"; -import ReactTooltip from "react-tooltip"; +import { Tooltip, TooltipProvider } from "react-tooltip"; import { ConfigData } from "../../config"; import { Item } from "../../model"; @@ -64,6 +64,7 @@ const RadarChart: React.FC<{ .range([config.chartConfig.size, 0]); return ( +
- {Object.values(config.quadrantsMap).map((value, index) => { - console.log(value) - return null - })} {Object.values(config.quadrantsMap).map((value, index) => ( - +
+
); };