Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Infiniflow Ragflow TagWordCloud Component

From Leeroopedia
Knowledge Sources
Domains Frontend, Knowledge_Base
Last Updated 2026-02-12 06:00 GMT

Overview

Word cloud visualization of knowledge base tags using the @antv/g2 charting library.

Description

TagWordCloud fetches tag data via useFetchTagList, sorts tags by frequency descending, takes the top 256, and transforms them into {text, value, name} objects. It renders a Chart instance of type wordCloud into a ref-attached div with autoFit, font size range [10, 50], color encoded by text, and tooltips showing name and value. The chart is created in renderWordCloud (memoized on tagList changes) and destroyed on cleanup via useEffect return. The container has a fixed height of 38vh.

Usage

Displayed in the tag configuration section of dataset settings to visualize the distribution and frequency of tags in the knowledge base.

Code Reference

Source Location

Signature

export function TagWordCloud(): JSX.Element;

Import

import { TagWordCloud } from './tag-word-cloud';

I/O Contract

Inputs

Name Type Required Description
(none) - - Fetches tag data internally via useFetchTagList

Outputs

Name Type Description
JSX.Element React element Word cloud chart container div

Usage Examples

<TagWordCloud />

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment