Add cluster titles for time filter

This commit is contained in:
William Jeynes
2026-04-24 17:57:53 +01:00
parent 9aca9855c0
commit 259f9aee0a
2 changed files with 13 additions and 14 deletions
+2 -2
View File
@@ -134,7 +134,7 @@ function getConnectedComponents(nodes, links) {
export function VizTimeFilter() {
const fgRef = useRef();
const [selectedNode, setSelectedNode] = useState(null);
const [inputDate, setInputDate] = useState(Date.now());
const [inputDate, setInputDate] = useState(1682353753000);
const parsedInputDate = useMemo(() => {
const d = new Date(inputDate);
@@ -242,7 +242,7 @@ export function VizTimeFilter() {
nodeCanvasObject={(node, ctx) => {
const label = node.label;
const fontSize = 16 + 32 * Math.min(node.members.length, 5);
const fontSize = 32 + 64 * Math.min(node.members.length, 5);
ctx.font = `${fontSize}px Sans-Serif`;
const textWidth = ctx.measureText(label).width;