@orbcharts/plugins-basic 3.0.0-beta.11 → 3.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbcharts/plugins-basic",
3
- "version": "3.0.0-beta.11",
3
+ "version": "3.0.0-beta.12",
4
4
  "description": "plugins for OrbCharts",
5
5
  "author": "Blue Planet Inc.",
6
6
  "license": "Apache-2.0",
@@ -35,7 +35,7 @@
35
35
  "vite-plugin-dts": "^3.7.3"
36
36
  },
37
37
  "dependencies": {
38
- "@orbcharts/core": "^3.0.0-beta.7",
38
+ "@orbcharts/core": "^3.0.0-beta.8",
39
39
  "@orbcharts/core-types": "^3.0.0-beta.5",
40
40
  "@orbcharts/plugins-basic-types": "^3.0.0-beta.10",
41
41
  "d3": "^7.8.5",
@@ -547,7 +547,9 @@ function renderNodeCircle ({ nodeGSelection, fullParams, fullChartParams }: {
547
547
  text: d.label,
548
548
  radius: d.r * fullParams.bubbleLabel.fillRate,
549
549
  lineHeight: baseLineHeight * fullParams.bubbleLabel.lineHeight,
550
- isBreakAll: fullParams.bubbleLabel.wordBreakAll
550
+ isBreakAll: d.label.length <= fullParams.bubbleLabel.maxLineLength
551
+ ? false
552
+ : fullParams.bubbleLabel.wordBreakAll
551
553
  })
552
554
 
553
555
  })
@@ -261,12 +261,15 @@ function renderBubbles ({ selection, bubblesData, fullParams, sumSeries }: {
261
261
  bubblesSelection
262
262
  .each((d,i,g) => {
263
263
  const gSelection = d3.select(g[i])
264
+ const text = d[textDataColumn] ?? ''
264
265
 
265
266
  gSelection.call(renderCircleText, {
266
- text: d[textDataColumn],
267
+ text,
267
268
  radius: d.r * fullParams.bubbleLabel.fillRate,
268
269
  lineHeight: baseLineHeight * fullParams.bubbleLabel.lineHeight,
269
- isBreakAll: fullParams.bubbleLabel.wordBreakAll
270
+ isBreakAll: text.length <= fullParams.bubbleLabel.maxLineLength
271
+ ? false
272
+ : fullParams.bubbleLabel.wordBreakAll
270
273
  })
271
274
 
272
275
  })