fix: wordcloud auto-fit all words with shrinkToFit
- 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) <noreply@anthropic.com>
This commit is contained in:
parent
f8ef83506a
commit
2d5dfae835
|
|
@ -230,16 +230,17 @@ export function buildWordcloudOption(
|
||||||
const series: Record<string, any> = {
|
const series: Record<string, any> = {
|
||||||
type: 'wordCloud',
|
type: 'wordCloud',
|
||||||
left: 'center',
|
left: 'center',
|
||||||
top: style.title?.visible ? 40 : 'center',
|
top: style.title?.visible ? 35 : 'center',
|
||||||
width: '85%',
|
width: '95%',
|
||||||
height: style.title?.visible ? '80%' : '90%',
|
height: style.title?.visible ? '85%' : '95%',
|
||||||
sizeRange: [wc.sizeMin, wc.sizeMax],
|
sizeRange: [wc.sizeMin, wc.sizeMax],
|
||||||
rotationRange: [wc.rotationMin, wc.rotationMax],
|
rotationRange: [wc.rotationMin, wc.rotationMax],
|
||||||
rotationStep: wc.rotationStep || 1,
|
rotationStep: wc.rotationStep || 1,
|
||||||
gridSize: wc.gridSize,
|
gridSize: wc.gridSize,
|
||||||
|
shrinkToFit: true,
|
||||||
drawOutOfBound: false,
|
drawOutOfBound: false,
|
||||||
layoutAnimation: true,
|
layoutAnimation: true,
|
||||||
keepAspect: true,
|
keepAspect: false,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontFamily: wc.fontFamily,
|
fontFamily: wc.fontFamily,
|
||||||
fontWeight: wc.fontWeight,
|
fontWeight: wc.fontWeight,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue