From 2d5dfae8356d875ad53dd8a095b1fd9a8b6a4e96 Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 5 Apr 2026 21:35:02 -0700 Subject: [PATCH] fix: wordcloud auto-fit all words with shrinkToFit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - shrinkToFit: true — auto-shrink words that don't fit - width/height: 95% — use nearly full container - keepAspect: false — let shape stretch to fill container - Combined with ellipse mask radii, all words should now display Co-Authored-By: Claude Opus 4.6 (1M context) --- .../EChartsOptionBuilder/wordcloudOptionBuilder.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/adapters/gateways/EChartsOptionBuilder/wordcloudOptionBuilder.ts b/frontend/src/adapters/gateways/EChartsOptionBuilder/wordcloudOptionBuilder.ts index ece00be..34d0b39 100644 --- a/frontend/src/adapters/gateways/EChartsOptionBuilder/wordcloudOptionBuilder.ts +++ b/frontend/src/adapters/gateways/EChartsOptionBuilder/wordcloudOptionBuilder.ts @@ -230,16 +230,17 @@ export function buildWordcloudOption( const series: Record = { type: 'wordCloud', left: 'center', - top: style.title?.visible ? 40 : 'center', - width: '85%', - height: style.title?.visible ? '80%' : '90%', + top: style.title?.visible ? 35 : 'center', + width: '95%', + height: style.title?.visible ? '85%' : '95%', sizeRange: [wc.sizeMin, wc.sizeMax], rotationRange: [wc.rotationMin, wc.rotationMax], rotationStep: wc.rotationStep || 1, gridSize: wc.gridSize, + shrinkToFit: true, drawOutOfBound: false, layoutAnimation: true, - keepAspect: true, + keepAspect: false, textStyle: { fontFamily: wc.fontFamily, fontWeight: wc.fontWeight,