@orbcharts/plugins-basic 3.0.0-beta.8 → 3.0.0-beta.9

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.
Files changed (62) hide show
  1. package/dist/orbcharts-plugins-basic/lib/plugins-basic-types.d.ts +1 -1
  2. package/dist/orbcharts-plugins-basic/src/grid/plugins/Bars.d.ts +1 -1
  3. package/dist/orbcharts-plugins-basic/src/grid/plugins/BarsPN.d.ts +1 -1
  4. package/dist/orbcharts-plugins-basic/src/grid/plugins/BarsTriangle.d.ts +1 -1
  5. package/dist/orbcharts-plugins-basic/src/grid/plugins/Dots.d.ts +1 -1
  6. package/dist/orbcharts-plugins-basic/src/grid/plugins/GridLegend.d.ts +1 -1
  7. package/dist/orbcharts-plugins-basic/src/grid/plugins/GridTooltip.d.ts +1 -1
  8. package/dist/orbcharts-plugins-basic/src/grid/plugins/GridZoom.d.ts +1 -1
  9. package/dist/orbcharts-plugins-basic/src/grid/plugins/GroupAux.d.ts +1 -1
  10. package/dist/orbcharts-plugins-basic/src/grid/plugins/GroupAxis.d.ts +1 -1
  11. package/dist/orbcharts-plugins-basic/src/grid/plugins/LineAreas.d.ts +1 -1
  12. package/dist/orbcharts-plugins-basic/src/grid/plugins/Lines.d.ts +1 -1
  13. package/dist/orbcharts-plugins-basic/src/grid/plugins/StackedBar.d.ts +1 -1
  14. package/dist/orbcharts-plugins-basic/src/grid/plugins/StackedValueAxis.d.ts +1 -1
  15. package/dist/orbcharts-plugins-basic/src/grid/plugins/ValueAxis.d.ts +1 -1
  16. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiBars.d.ts +1 -1
  17. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiBarsTriangle.d.ts +1 -1
  18. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiDots.d.ts +1 -1
  19. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiGridLegend.d.ts +1 -1
  20. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiGridTooltip.d.ts +1 -1
  21. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiGroupAxis.d.ts +1 -1
  22. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiLineAreas.d.ts +1 -1
  23. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiLines.d.ts +1 -1
  24. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiStackedBar.d.ts +1 -1
  25. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiStackedValueAxis.d.ts +1 -1
  26. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiValueAxis.d.ts +1 -1
  27. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/OverlappingStackedValueAxes.d.ts +1 -1
  28. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/OverlappingValueAxes.d.ts +1 -1
  29. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/MultiValueLegend.d.ts +1 -1
  30. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/MultiValueTooltip.d.ts +1 -1
  31. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/Scatter.d.ts +1 -1
  32. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/ScatterBubbles.d.ts +1 -1
  33. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYAux.d.ts +1 -1
  34. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYAxes.d.ts +1 -1
  35. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYZoom.d.ts +1 -1
  36. package/dist/orbcharts-plugins-basic/src/relationship/defaults.d.ts +2 -1
  37. package/dist/orbcharts-plugins-basic/src/relationship/index.d.ts +1 -0
  38. package/dist/orbcharts-plugins-basic/src/relationship/plugins/ForceDirected.d.ts +1 -1
  39. package/dist/orbcharts-plugins-basic/src/relationship/plugins/ForceDirectedBubbles.d.ts +3 -0
  40. package/dist/orbcharts-plugins-basic/src/relationship/plugins/RelationshipLegend.d.ts +1 -1
  41. package/dist/orbcharts-plugins-basic/src/relationship/plugins/RelationshipTooltip.d.ts +1 -1
  42. package/dist/orbcharts-plugins-basic/src/series/plugins/Bubbles.d.ts +1 -1
  43. package/dist/orbcharts-plugins-basic/src/series/plugins/Pie.d.ts +1 -1
  44. package/dist/orbcharts-plugins-basic/src/series/plugins/PieEventTexts.d.ts +1 -1
  45. package/dist/orbcharts-plugins-basic/src/series/plugins/PieLabels.d.ts +1 -1
  46. package/dist/orbcharts-plugins-basic/src/series/plugins/Rose.d.ts +1 -1
  47. package/dist/orbcharts-plugins-basic/src/series/plugins/RoseLabels.d.ts +1 -1
  48. package/dist/orbcharts-plugins-basic/src/series/plugins/SeriesLegend.d.ts +1 -1
  49. package/dist/orbcharts-plugins-basic/src/series/plugins/SeriesTooltip.d.ts +1 -1
  50. package/dist/orbcharts-plugins-basic/src/tree/plugins/TreeLegend.d.ts +1 -1
  51. package/dist/orbcharts-plugins-basic/src/tree/plugins/TreeMap.d.ts +1 -1
  52. package/dist/orbcharts-plugins-basic/src/tree/plugins/TreeTooltip.d.ts +1 -1
  53. package/dist/orbcharts-plugins-basic.es.js +8148 -7484
  54. package/dist/orbcharts-plugins-basic.umd.js +63 -58
  55. package/lib/plugins-basic-types.ts +2 -2
  56. package/package.json +3 -3
  57. package/src/relationship/defaults.ts +101 -18
  58. package/src/relationship/index.ts +1 -0
  59. package/src/relationship/plugins/ForceDirected.ts +87 -68
  60. package/src/relationship/plugins/ForceDirectedBubbles.ts +1391 -0
  61. package/src/series/defaults.ts +1 -1
  62. package/src/series/plugins/Bubbles.ts +4 -2
@@ -19,7 +19,7 @@ export const DEFAULT_BUBBLES_PARAMS: BubblesParams = {
19
19
  },
20
20
  bubbleLabel: {
21
21
  fillRate: 0.6,
22
- lineHeight: 12,
22
+ lineHeight: 1,
23
23
  lineLengthMin: 4
24
24
  },
25
25
  // highlightRIncrease: 0,
@@ -36,6 +36,8 @@ type BubblesSimulationDatum = BubblesDatum & d3.SimulationNodeDatum
36
36
 
37
37
  const pluginName = 'Bubbles'
38
38
 
39
+ const baseLineHeight = 12 // 未變形前的字體大小(代入計算用而已,數字多少都不會有影響)
40
+
39
41
  const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_BUBBLES_PARAMS> = {
40
42
  name: pluginName,
41
43
  defaultParams: DEFAULT_BUBBLES_PARAMS,
@@ -215,7 +217,7 @@ function renderBubbles ({ selection, bubblesData, fullParams, sumSeries }: {
215
217
  const enterSelection = enter
216
218
  .append('g')
217
219
  .attr('cursor', 'pointer')
218
- .attr('font-size', 12)
220
+ .attr('font-size', baseLineHeight)
219
221
  .style('fill', '#ffffff')
220
222
  .attr("text-anchor", "middle")
221
223
 
@@ -266,7 +268,7 @@ function renderBubbles ({ selection, bubblesData, fullParams, sumSeries }: {
266
268
  gSelection.call(renderCircleText, {
267
269
  text: d[textDataColumn],
268
270
  radius: d.r * fullParams.bubbleLabel.fillRate,
269
- lineHeight: fullParams.bubbleLabel.lineHeight,
271
+ lineHeight: baseLineHeight * fullParams.bubbleLabel.lineHeight,
270
272
  isBreakAll: breakAll
271
273
  })
272
274