From 04a82ace7c4a05f1d8ef7213412e7ded3ea113b2 Mon Sep 17 00:00:00 2001 From: "liu.shiyi" Date: Tue, 10 Oct 2023 15:08:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=AF=8D=E4=BA=91=E5=9B=BE=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9C=80=E5=A4=A7=E6=9C=80=E5=B0=8F=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/G2Plots/词云图/词云图.js | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/data-room-ui/packages/G2Plots/词云图/词云图.js b/data-room-ui/packages/G2Plots/词云图/词云图.js index 411e36f2..879f0e8e 100644 --- a/data-room-ui/packages/G2Plots/词云图/词云图.js +++ b/data-room-ui/packages/G2Plots/词云图/词云图.js @@ -1,6 +1,6 @@ // 配置版本号 -const version = '2023092201' +const version = '2023101001' // 分类 const category = 'WordCloud' // 标题 @@ -65,6 +65,24 @@ const setting = [ tabName: 'custom', groupName: 'graph' }, + { + label: '最小字体', + type: 'inputNumber', + field: 'fontSizeMin', + optionField: 'fontSizeMin', + value: 24, + tabName: 'custom', + groupName: 'graph' + }, + { + label: '最大字体', + type: 'inputNumber', + field: 'fontSizeMax', + optionField: 'fontSizeMax', + value: 80, + tabName: 'custom', + groupName: 'graph' + } // 图例 legend // 边距 padding ] @@ -569,7 +587,7 @@ const data = [ ] // 配置处理脚本 -const optionHandler = '' +const optionHandler = 'option.wordStyle.fontSize = [option.fontSizeMin, option.fontSizeMax]' // 数据处理脚本 const dataHandler = 'let wordFieldValue = setting.find(settingItem=>settingItem.field === \'wordField\').value\n' + @@ -590,6 +608,8 @@ const option = { fontFamily: 'Verdana', fontSize: [24, 80] }, + fontSizeMin: 24, + fontSizeMax: 80, imageMask: '', // 设置交互类型 interactions: [{ type: 'element-active' }],