@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.
- package/dist/orbcharts-plugins-basic/lib/plugins-basic-types.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/Bars.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/BarsPN.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/BarsTriangle.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/Dots.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/GridLegend.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/GridTooltip.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/GridZoom.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/GroupAux.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/GroupAxis.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/LineAreas.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/Lines.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/StackedBar.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/StackedValueAxis.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/ValueAxis.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiBars.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiBarsTriangle.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiDots.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiGridLegend.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiGridTooltip.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiGroupAxis.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiLineAreas.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiLines.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiStackedBar.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiStackedValueAxis.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiValueAxis.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/OverlappingStackedValueAxes.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/OverlappingValueAxes.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/MultiValueLegend.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/MultiValueTooltip.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/Scatter.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/ScatterBubbles.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYAux.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYAxes.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYZoom.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/relationship/defaults.d.ts +2 -1
- package/dist/orbcharts-plugins-basic/src/relationship/index.d.ts +1 -0
- package/dist/orbcharts-plugins-basic/src/relationship/plugins/ForceDirected.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/relationship/plugins/ForceDirectedBubbles.d.ts +3 -0
- package/dist/orbcharts-plugins-basic/src/relationship/plugins/RelationshipLegend.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/relationship/plugins/RelationshipTooltip.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/series/plugins/Bubbles.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/series/plugins/Pie.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/series/plugins/PieEventTexts.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/series/plugins/PieLabels.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/series/plugins/Rose.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/series/plugins/RoseLabels.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/series/plugins/SeriesLegend.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/series/plugins/SeriesTooltip.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/tree/plugins/TreeLegend.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/tree/plugins/TreeMap.d.ts +1 -1
- package/dist/orbcharts-plugins-basic/src/tree/plugins/TreeTooltip.d.ts +1 -1
- package/dist/orbcharts-plugins-basic.es.js +8148 -7484
- package/dist/orbcharts-plugins-basic.umd.js +63 -58
- package/lib/plugins-basic-types.ts +2 -2
- package/package.json +3 -3
- package/src/relationship/defaults.ts +101 -18
- package/src/relationship/index.ts +1 -0
- package/src/relationship/plugins/ForceDirected.ts +87 -68
- package/src/relationship/plugins/ForceDirectedBubbles.ts +1391 -0
- package/src/series/defaults.ts +1 -1
- package/src/series/plugins/Bubbles.ts +4 -2
package/src/series/defaults.ts
CHANGED
@@ -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',
|
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
|
|