mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-13 22:16:14 +08:00
### What problem does this PR solve? Feat: Add tag_kwd parameter to chunk configuration modal #4368 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
3d66d78304
commit
af43cb04e8
@ -26,6 +26,12 @@ export const showRaptorParseConfiguration = (parserId: string) => {
|
|||||||
return !excludedParseMethods.includes(parserId);
|
return !excludedParseMethods.includes(parserId);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const excludedTagParseMethods = ['table', 'knowledge_graph', 'tag'];
|
||||||
|
|
||||||
|
export const showTagItems = (parserId: string) => {
|
||||||
|
return !excludedTagParseMethods.includes(parserId);
|
||||||
|
};
|
||||||
|
|
||||||
// The three types "table", "resume" and "one" do not display this configuration.
|
// The three types "table", "resume" and "one" do not display this configuration.
|
||||||
const ParseConfiguration = () => {
|
const ParseConfiguration = () => {
|
||||||
const form = Form.useFormInstance();
|
const form = Form.useFormInstance();
|
||||||
|
@ -325,6 +325,19 @@ The above is the content you need to summarize.`,
|
|||||||
searchTags: 'Search tags',
|
searchTags: 'Search tags',
|
||||||
tagCloud: 'Cloud',
|
tagCloud: 'Cloud',
|
||||||
tagTable: 'Table',
|
tagTable: 'Table',
|
||||||
|
tagSet: 'Tag set',
|
||||||
|
tagSetTip: `
|
||||||
|
<p> Selecting the 'Tag' knowledge bases helps to tag every chunks. </p>
|
||||||
|
<p>Query to those chunks will also be with tags too.</p>
|
||||||
|
This procedure will improve precision of retrieval by adding more information to the dataset, especially when there's a large set of chunks.
|
||||||
|
<p>Difference between tags and keywords:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Tag is a close set which is defined and manipulated by user while keyword is an open set.</li>
|
||||||
|
<li>You need to upload tag sets with samples prior to use.</li>
|
||||||
|
<li>Keywords are generated by LLM which is expensive and time consuming.</li>
|
||||||
|
</ul>
|
||||||
|
`,
|
||||||
|
topnTags: 'Top-N Tags',
|
||||||
},
|
},
|
||||||
chunk: {
|
chunk: {
|
||||||
chunk: 'Chunk',
|
chunk: 'Chunk',
|
||||||
|
@ -309,6 +309,19 @@ export default {
|
|||||||
searchTags: '搜尋標籤',
|
searchTags: '搜尋標籤',
|
||||||
tagCloud: '雲端',
|
tagCloud: '雲端',
|
||||||
tagTable: '表',
|
tagTable: '表',
|
||||||
|
tagSet: '標籤庫',
|
||||||
|
topnTags: 'Top-N 標籤',
|
||||||
|
tagSetTip: `
|
||||||
|
<p> 選擇「標籤」知識庫有助於標記每個區塊。 </p>
|
||||||
|
<p>對這些區塊的查詢也將帶有標籤。
|
||||||
|
此過程將透過向資料集添加更多資訊來提高檢索精度,特別是當存在大量區塊時。
|
||||||
|
<p>標籤和關鍵字的差異:</p>
|
||||||
|
<ul>
|
||||||
|
<li>標籤是一個閉集,由使用者定義和操作,而關鍵字是一個開集。
|
||||||
|
<li>您需要在使用前上傳包含範例的標籤集。
|
||||||
|
<li>關鍵字由 LLM 生成,既昂貴又耗時。
|
||||||
|
</ul>
|
||||||
|
`,
|
||||||
},
|
},
|
||||||
chunk: {
|
chunk: {
|
||||||
chunk: '解析塊',
|
chunk: '解析塊',
|
||||||
|
@ -326,6 +326,19 @@ export default {
|
|||||||
searchTags: '搜索标签',
|
searchTags: '搜索标签',
|
||||||
tagCloud: '云',
|
tagCloud: '云',
|
||||||
tagTable: '表',
|
tagTable: '表',
|
||||||
|
tagSet: '标签库',
|
||||||
|
topnTags: 'Top-N 标签',
|
||||||
|
tagSetTip: `
|
||||||
|
<p> 选择“标签”知识库有助于标记每个块。 </p>
|
||||||
|
<p>对这些块的查询也将带有标签。 </p>
|
||||||
|
此过程将通过向数据集添加更多信息来提高检索的准确性,尤其是在存在大量块的情况下。
|
||||||
|
<p>标签和关键字之间的区别:</p>
|
||||||
|
<ul>
|
||||||
|
<li>标签是一个由用户定义和操作的封闭集,而关键字是一个开放集。 </li>
|
||||||
|
<li>您需要在使用前上传带有样本的标签集。 </li>
|
||||||
|
<li>关键字由 LLM 生成,这既昂贵又耗时。 </li>
|
||||||
|
</ul>
|
||||||
|
`,
|
||||||
},
|
},
|
||||||
chunk: {
|
chunk: {
|
||||||
chunk: '解析块',
|
chunk: '解析块',
|
||||||
|
@ -13,6 +13,7 @@ type FieldType = {
|
|||||||
interface kFProps {
|
interface kFProps {
|
||||||
doc_id: string;
|
doc_id: string;
|
||||||
chunkId: string | undefined;
|
chunkId: string | undefined;
|
||||||
|
parserId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
||||||
@ -21,15 +22,19 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
|||||||
hideModal,
|
hideModal,
|
||||||
onOk,
|
onOk,
|
||||||
loading,
|
loading,
|
||||||
|
parserId,
|
||||||
}) => {
|
}) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [checked, setChecked] = useState(false);
|
const [checked, setChecked] = useState(false);
|
||||||
const [keywords, setKeywords] = useState<string[]>([]);
|
const [keywords, setKeywords] = useState<string[]>([]);
|
||||||
const [question, setQuestion] = useState<string[]>([]);
|
const [question, setQuestion] = useState<string[]>([]);
|
||||||
|
const [tagKeyWords, setTagKeyWords] = useState<string[]>([]);
|
||||||
const { removeChunk } = useDeleteChunkByIds();
|
const { removeChunk } = useDeleteChunkByIds();
|
||||||
const { data } = useFetchChunk(chunkId);
|
const { data } = useFetchChunk(chunkId);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
const isTagParser = parserId === 'tag';
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (data?.code === 0) {
|
if (data?.code === 0) {
|
||||||
const {
|
const {
|
||||||
@ -37,16 +42,19 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
|||||||
important_kwd = [],
|
important_kwd = [],
|
||||||
available_int,
|
available_int,
|
||||||
question_kwd = [],
|
question_kwd = [],
|
||||||
|
tag_kwd = [],
|
||||||
} = data.data;
|
} = data.data;
|
||||||
form.setFieldsValue({ content: content_with_weight });
|
form.setFieldsValue({ content: content_with_weight });
|
||||||
setKeywords(important_kwd);
|
setKeywords(important_kwd);
|
||||||
setQuestion(question_kwd);
|
setQuestion(question_kwd);
|
||||||
|
setTagKeyWords(tag_kwd);
|
||||||
setChecked(available_int !== 0);
|
setChecked(available_int !== 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!chunkId) {
|
if (!chunkId) {
|
||||||
setKeywords([]);
|
setKeywords([]);
|
||||||
setQuestion([]);
|
setQuestion([]);
|
||||||
|
setTagKeyWords([]);
|
||||||
form.setFieldsValue({ content: undefined });
|
form.setFieldsValue({ content: undefined });
|
||||||
}
|
}
|
||||||
}, [data, form, chunkId]);
|
}, [data, form, chunkId]);
|
||||||
@ -58,6 +66,7 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
|||||||
content: values.content,
|
content: values.content,
|
||||||
keywords, // keywords
|
keywords, // keywords
|
||||||
question_kwd: question,
|
question_kwd: question,
|
||||||
|
tag_kwd: tagKeyWords,
|
||||||
available_int: checked ? 1 : 0, // available_int
|
available_int: checked ? 1 : 0, // available_int
|
||||||
});
|
});
|
||||||
} catch (errorInfo) {
|
} catch (errorInfo) {
|
||||||
@ -105,6 +114,12 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
<EditTag tags={question} setTags={setQuestion} />
|
<EditTag tags={question} setTags={setQuestion} />
|
||||||
</section>
|
</section>
|
||||||
|
{isTagParser && (
|
||||||
|
<section className="mt-4">
|
||||||
|
<p className="mb-2">{t('knowledgeConfiguration.tagName')} </p>
|
||||||
|
<EditTag tags={tagKeyWords} setTags={setTagKeyWords} />
|
||||||
|
</section>
|
||||||
|
)}
|
||||||
{chunkId && (
|
{chunkId && (
|
||||||
<section>
|
<section>
|
||||||
<Divider></Divider>
|
<Divider></Divider>
|
||||||
|
@ -100,11 +100,13 @@ export const useUpdateChunk = () => {
|
|||||||
keywords,
|
keywords,
|
||||||
available_int,
|
available_int,
|
||||||
question_kwd,
|
question_kwd,
|
||||||
|
tag_kwd,
|
||||||
}: {
|
}: {
|
||||||
content: string;
|
content: string;
|
||||||
keywords: string;
|
keywords: string;
|
||||||
available_int: number;
|
available_int: number;
|
||||||
question_kwd: string;
|
question_kwd: string;
|
||||||
|
tag_kwd: string;
|
||||||
}) => {
|
}) => {
|
||||||
const code = await createChunk({
|
const code = await createChunk({
|
||||||
content_with_weight: content,
|
content_with_weight: content,
|
||||||
@ -113,6 +115,7 @@ export const useUpdateChunk = () => {
|
|||||||
important_kwd: keywords, // keywords
|
important_kwd: keywords, // keywords
|
||||||
available_int,
|
available_int,
|
||||||
question_kwd,
|
question_kwd,
|
||||||
|
tag_kwd,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
|
@ -193,6 +193,7 @@ const Chunk = () => {
|
|||||||
visible={chunkUpdatingVisible}
|
visible={chunkUpdatingVisible}
|
||||||
loading={chunkUpdatingLoading}
|
loading={chunkUpdatingLoading}
|
||||||
onOk={onChunkUpdatingOk}
|
onOk={onChunkUpdatingOk}
|
||||||
|
parserId={documentInfo.parser_id}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<KnowledgeGraphModal></KnowledgeGraphModal>
|
<KnowledgeGraphModal></KnowledgeGraphModal>
|
||||||
|
@ -79,7 +79,7 @@ const ParsingActionCell = ({
|
|||||||
<Dropdown
|
<Dropdown
|
||||||
menu={{ items: chunkItems }}
|
menu={{ items: chunkItems }}
|
||||||
trigger={['click']}
|
trigger={['click']}
|
||||||
disabled={isRunning}
|
disabled={isRunning || record.parser_id === 'tag'}
|
||||||
>
|
>
|
||||||
<Button type="text" className={styles.iconButton}>
|
<Button type="text" className={styles.iconButton}>
|
||||||
<ToolOutlined size={20} />
|
<ToolOutlined size={20} />
|
||||||
|
@ -9,7 +9,7 @@ import styles from './index.less';
|
|||||||
import { TagTabs } from './tag-tabs';
|
import { TagTabs } from './tag-tabs';
|
||||||
import { ImageMap } from './utils';
|
import { ImageMap } from './utils';
|
||||||
|
|
||||||
const { Title, Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
||||||
const CategoryPanel = ({ chunkMethod }: { chunkMethod: string }) => {
|
const CategoryPanel = ({ chunkMethod }: { chunkMethod: string }) => {
|
||||||
const parserList = useSelectParserList();
|
const parserList = useSelectParserList();
|
||||||
@ -37,15 +37,15 @@ const CategoryPanel = ({ chunkMethod }: { chunkMethod: string }) => {
|
|||||||
<section className={styles.categoryPanelWrapper}>
|
<section className={styles.categoryPanelWrapper}>
|
||||||
{imageList.length > 0 ? (
|
{imageList.length > 0 ? (
|
||||||
<>
|
<>
|
||||||
<Title level={5} className={styles.topTitle}>
|
<h5 className="font-semibold text-base mt-0 mb-1">
|
||||||
{`"${item.title}" ${t('methodTitle')}`}
|
{`"${item.title}" ${t('methodTitle')}`}
|
||||||
</Title>
|
</h5>
|
||||||
<p
|
<p
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: DOMPurify.sanitize(item.description),
|
__html: DOMPurify.sanitize(item.description),
|
||||||
}}
|
}}
|
||||||
></p>
|
></p>
|
||||||
<Title level={5}>{`"${item.title}" ${t('methodExamples')}`}</Title>
|
<h5 className="font-semibold text-base mt-4 mb-1">{`"${item.title}" ${t('methodExamples')}`}</h5>
|
||||||
<Text>{t('methodExamplesDescription')}</Text>
|
<Text>{t('methodExamplesDescription')}</Text>
|
||||||
<Row gutter={[10, 10]} className={styles.imageRow}>
|
<Row gutter={[10, 10]} className={styles.imageRow}>
|
||||||
{imageList.map((x) => (
|
{imageList.map((x) => (
|
||||||
@ -58,9 +58,9 @@ const CategoryPanel = ({ chunkMethod }: { chunkMethod: string }) => {
|
|||||||
</Col>
|
</Col>
|
||||||
))}
|
))}
|
||||||
</Row>
|
</Row>
|
||||||
<Title level={5}>
|
<h5 className="font-semibold text-base mt-4 mb-1">
|
||||||
{item.title} {t('dialogueExamplesTitle')}
|
{item.title} {t('dialogueExamplesTitle')}
|
||||||
</Title>
|
</h5>
|
||||||
<Divider></Divider>
|
<Divider></Divider>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
@ -11,6 +11,7 @@ import MaxTokenNumber from '@/components/max-token-number';
|
|||||||
import PageRank from '@/components/page-rank';
|
import PageRank from '@/components/page-rank';
|
||||||
import ParseConfiguration, {
|
import ParseConfiguration, {
|
||||||
showRaptorParseConfiguration,
|
showRaptorParseConfiguration,
|
||||||
|
showTagItems,
|
||||||
} from '@/components/parse-configuration';
|
} from '@/components/parse-configuration';
|
||||||
import { useTranslate } from '@/hooks/common-hooks';
|
import { useTranslate } from '@/hooks/common-hooks';
|
||||||
import { useHandleChunkMethodSelectChange } from '@/hooks/logic-hooks';
|
import { useHandleChunkMethodSelectChange } from '@/hooks/logic-hooks';
|
||||||
@ -23,6 +24,7 @@ import {
|
|||||||
useSubmitKnowledgeConfiguration,
|
useSubmitKnowledgeConfiguration,
|
||||||
} from './hooks';
|
} from './hooks';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
import { TagItems } from './tag-item';
|
||||||
|
|
||||||
const { Option } = Select;
|
const { Option } = Select;
|
||||||
|
|
||||||
@ -146,6 +148,8 @@ const ConfigurationForm = ({ form }: { form: FormInstance }) => {
|
|||||||
{showRaptorParseConfiguration(parserId) && (
|
{showRaptorParseConfiguration(parserId) && (
|
||||||
<ParseConfiguration></ParseConfiguration>
|
<ParseConfiguration></ParseConfiguration>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{showTagItems(parserId) && <TagItems></TagItems>}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
@ -0,0 +1,101 @@
|
|||||||
|
import { useFetchKnowledgeList } from '@/hooks/knowledge-hooks';
|
||||||
|
import { UserOutlined } from '@ant-design/icons';
|
||||||
|
import {
|
||||||
|
Avatar,
|
||||||
|
Divider,
|
||||||
|
Flex,
|
||||||
|
Form,
|
||||||
|
InputNumber,
|
||||||
|
Select,
|
||||||
|
Slider,
|
||||||
|
Space,
|
||||||
|
} from 'antd';
|
||||||
|
import DOMPurify from 'dompurify';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
|
export const TagSetItem = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
const { list: knowledgeList } = useFetchKnowledgeList(true);
|
||||||
|
|
||||||
|
const knowledgeOptions = knowledgeList
|
||||||
|
.filter((x) => x.parser_id === 'tag')
|
||||||
|
.map((x) => ({
|
||||||
|
label: (
|
||||||
|
<Space>
|
||||||
|
<Avatar size={20} icon={<UserOutlined />} src={x.avatar} />
|
||||||
|
{x.name}
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
value: x.id,
|
||||||
|
}));
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Form.Item
|
||||||
|
label={t('knowledgeConfiguration.tagSet')}
|
||||||
|
name={['parser_config', 'tag_kb_ids']}
|
||||||
|
tooltip={
|
||||||
|
<div
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: DOMPurify.sanitize(t('knowledgeConfiguration.tagSetTip')),
|
||||||
|
}}
|
||||||
|
></div>
|
||||||
|
}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
message: t('chat.knowledgeBasesMessage'),
|
||||||
|
type: 'array',
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Select
|
||||||
|
mode="multiple"
|
||||||
|
options={knowledgeOptions}
|
||||||
|
placeholder={t('chat.knowledgeBasesMessage')}
|
||||||
|
></Select>
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const TopNTagsItem = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Form.Item label={t('knowledgeConfiguration.topnTags')}>
|
||||||
|
<Flex gap={20} align="center">
|
||||||
|
<Flex flex={1}>
|
||||||
|
<Form.Item
|
||||||
|
name={['parser_config', 'topn_tags']}
|
||||||
|
noStyle
|
||||||
|
initialValue={3}
|
||||||
|
>
|
||||||
|
<Slider max={10} min={1} style={{ width: '100%' }} />
|
||||||
|
</Form.Item>
|
||||||
|
</Flex>
|
||||||
|
<Form.Item name={['parser_config', 'topn_tags']} noStyle>
|
||||||
|
<InputNumber max={10} min={1} />
|
||||||
|
</Form.Item>
|
||||||
|
</Flex>
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export function TagItems() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Divider />
|
||||||
|
<TagSetItem></TagSetItem>
|
||||||
|
<Form.Item noStyle dependencies={[['parser_config', 'tag_kb_ids']]}>
|
||||||
|
{({ getFieldValue }) => {
|
||||||
|
const ids: string[] = getFieldValue(['parser_config', 'tag_kb_ids']);
|
||||||
|
|
||||||
|
return (
|
||||||
|
Array.isArray(ids) &&
|
||||||
|
ids.length > 0 && <TopNTagsItem></TopNTagsItem>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
</Form.Item>
|
||||||
|
<Divider />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
@ -108,7 +108,7 @@ export function TagTable() {
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
|
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
|
||||||
>
|
>
|
||||||
{t('knowledgeConfiguration.tag')}
|
{t('knowledgeConfiguration.tagName')}
|
||||||
<ArrowUpDown />
|
<ArrowUpDown />
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
|
@ -1,12 +1,23 @@
|
|||||||
import { useFetchTagList } from '@/hooks/knowledge-hooks';
|
import { useFetchTagList } from '@/hooks/knowledge-hooks';
|
||||||
import { Chart } from '@antv/g2';
|
import { Chart } from '@antv/g2';
|
||||||
import { useCallback, useEffect, useRef } from 'react';
|
import { sumBy } from 'lodash';
|
||||||
|
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
||||||
|
|
||||||
export function TagWordCloud() {
|
export function TagWordCloud() {
|
||||||
const domRef = useRef<HTMLDivElement>(null);
|
const domRef = useRef<HTMLDivElement>(null);
|
||||||
let chartRef = useRef<Chart>();
|
let chartRef = useRef<Chart>();
|
||||||
const { list } = useFetchTagList();
|
const { list } = useFetchTagList();
|
||||||
|
|
||||||
|
const { list: tagList } = useMemo(() => {
|
||||||
|
const nextList = list.sort((a, b) => b[1] - a[1]).slice(0, 256);
|
||||||
|
|
||||||
|
return {
|
||||||
|
list: nextList.map((x) => ({ text: x[0], value: x[1], name: x[0] })),
|
||||||
|
sumValue: sumBy(nextList, (x: [string, number]) => x[1]),
|
||||||
|
length: nextList.length,
|
||||||
|
};
|
||||||
|
}, [list]);
|
||||||
|
|
||||||
const renderWordCloud = useCallback(() => {
|
const renderWordCloud = useCallback(() => {
|
||||||
if (domRef.current) {
|
if (domRef.current) {
|
||||||
chartRef.current = new Chart({ container: domRef.current });
|
chartRef.current = new Chart({ container: domRef.current });
|
||||||
@ -14,19 +25,30 @@ export function TagWordCloud() {
|
|||||||
chartRef.current.options({
|
chartRef.current.options({
|
||||||
type: 'wordCloud',
|
type: 'wordCloud',
|
||||||
autoFit: true,
|
autoFit: true,
|
||||||
layout: { fontSize: [20, 100] },
|
layout: {
|
||||||
|
fontSize: [20, 100],
|
||||||
|
// fontSize: (d: any) => {
|
||||||
|
// if (d.value) {
|
||||||
|
// return (d.value / sumValue) * 100 * (length / 10);
|
||||||
|
// }
|
||||||
|
// return 0;
|
||||||
|
// },
|
||||||
|
},
|
||||||
data: {
|
data: {
|
||||||
type: 'inline',
|
type: 'inline',
|
||||||
value: list.map((x) => ({ text: x[0], value: x[1], name: x[0] })),
|
value: tagList,
|
||||||
},
|
},
|
||||||
encode: { color: 'text' },
|
encode: { color: 'text' },
|
||||||
legend: false,
|
legend: false,
|
||||||
tooltip: false,
|
tooltip: {
|
||||||
|
title: 'name', // title
|
||||||
|
items: ['value'], // data item
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
chartRef.current.render();
|
chartRef.current.render();
|
||||||
}
|
}
|
||||||
}, [list]);
|
}, [tagList]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
renderWordCloud();
|
renderWordCloud();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user