@semcore/d3-chart 16.5.0 → 17.0.0-prerelease.8
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/CHANGELOG.md +10 -0
- package/lib/cjs/AnimatedClipPath.js +28 -41
- package/lib/cjs/AnimatedClipPath.js.map +1 -1
- package/lib/cjs/Area.js +187 -223
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +248 -327
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +162 -185
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +219 -248
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +448 -482
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +349 -396
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +67 -86
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +78 -93
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +149 -167
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +178 -207
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +182 -222
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Pattern.js +124 -126
- package/lib/cjs/Pattern.js.map +1 -1
- package/lib/cjs/Plot.js +100 -126
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +576 -681
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +518 -571
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/Reference.js +147 -178
- package/lib/cjs/Reference.js.map +1 -1
- package/lib/cjs/ResponsiveContainer.js +64 -82
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +169 -199
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/StackBar.js +135 -177
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +60 -73
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +193 -208
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +182 -217
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/DataAccessibilityTable.js +45 -83
- package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +37 -97
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +97 -91
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/a11y/bezier.js +17 -23
- package/lib/cjs/a11y/bezier.js.map +1 -1
- package/lib/cjs/a11y/focus.js +16 -16
- package/lib/cjs/a11y/focus.js.map +1 -1
- package/lib/cjs/a11y/hints.js +72 -75
- package/lib/cjs/a11y/hints.js.map +1 -1
- package/lib/cjs/a11y/insights.js +354 -525
- package/lib/cjs/a11y/insights.js.map +1 -1
- package/lib/cjs/a11y/intl.js +5 -5
- package/lib/cjs/a11y/intl.js.map +1 -1
- package/lib/cjs/a11y/locale.js +12 -19
- package/lib/cjs/a11y/locale.js.map +1 -1
- package/lib/cjs/a11y/serialize.js +164 -203
- package/lib/cjs/a11y/serialize.js.map +1 -1
- package/lib/cjs/a11y/summarize.js +7 -6
- package/lib/cjs/a11y/summarize.js.map +1 -1
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +16 -16
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/a11y/translations/module/de.json +2 -2
- package/lib/cjs/a11y/translations/module/en.json +2 -2
- package/lib/cjs/a11y/translations/module/es.json +2 -2
- package/lib/cjs/a11y/translations/module/fr.json +2 -2
- package/lib/cjs/a11y/translations/module/it.json +2 -2
- package/lib/cjs/a11y/translations/module/ja.json +2 -2
- package/lib/cjs/a11y/translations/module/ko.json +2 -2
- package/lib/cjs/a11y/translations/module/nl.json +2 -2
- package/lib/cjs/a11y/translations/module/pl.json +2 -2
- package/lib/cjs/a11y/translations/module/pt.json +2 -2
- package/lib/cjs/a11y/translations/module/sv.json +2 -2
- package/lib/cjs/a11y/translations/module/tr.json +2 -2
- package/lib/cjs/a11y/translations/module/vi.json +2 -2
- package/lib/cjs/a11y/translations/module/zh.json +2 -2
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +16 -16
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/color.js +1 -1
- package/lib/cjs/color.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.js +421 -466
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.js +97 -115
- package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.js +229 -216
- package/lib/cjs/component/Chart/BarChart.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.js +114 -136
- package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.js +280 -305
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +76 -108
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.js +80 -95
- package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.js +126 -148
- package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.js +95 -113
- package/lib/cjs/component/Chart/LineChart.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.js +84 -110
- package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.js +119 -143
- package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.js +103 -122
- package/lib/cjs/component/Chart/VennChart.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/index.js +2 -2
- package/lib/cjs/component/Chart/index.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +72 -105
- package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +58 -70
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +208 -221
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +63 -73
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/index.js +4 -4
- package/lib/cjs/component/ChartLegend/index.js.map +1 -1
- package/lib/cjs/component/Cigarette/Cigarette.js +115 -129
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js +107 -137
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/cjs/component/SvgElement.js +7 -7
- package/lib/cjs/component/SvgElement.js.map +1 -1
- package/lib/cjs/createElement.js +66 -65
- package/lib/cjs/createElement.js.map +1 -1
- package/lib/cjs/index.js +62 -62
- package/lib/cjs/style/axis.shadow.css +3 -0
- package/lib/cjs/style/plot.shadow.css +1 -3
- package/lib/cjs/style/plotA11yModule.shadow.css +10 -11
- package/lib/cjs/style/plotA11yView.shadow.css +13 -26
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +15 -15
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/types/Axis.d.js.map +1 -1
- package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Hover.d.js.map +1 -1
- package/lib/cjs/types/Line.d.js.map +1 -1
- package/lib/cjs/types/Plot.d.js.map +1 -1
- package/lib/cjs/types/Radar.d.js.map +1 -1
- package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/cjs/types/Tooltip.d.js.map +1 -1
- package/lib/cjs/types/Venn.d.js.map +1 -1
- package/lib/cjs/types/index.d.js +80 -80
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js +122 -145
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/AnimatedClipPath.js +24 -37
- package/lib/es6/AnimatedClipPath.js.map +1 -1
- package/lib/es6/Area.js +179 -215
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +242 -321
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +154 -177
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +206 -235
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +433 -467
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +337 -384
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +60 -79
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +74 -89
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +141 -159
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +174 -203
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +173 -213
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Pattern.js +68 -74
- package/lib/es6/Pattern.js.map +1 -1
- package/lib/es6/Plot.js +95 -121
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +554 -659
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +500 -553
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/Reference.js +140 -171
- package/lib/es6/Reference.js.map +1 -1
- package/lib/es6/ResponsiveContainer.js +58 -76
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +161 -191
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/StackBar.js +130 -172
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +56 -69
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +183 -198
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +169 -204
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/DataAccessibilityTable.js +41 -80
- package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +35 -95
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +89 -84
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/a11y/bezier.js +16 -23
- package/lib/es6/a11y/bezier.js.map +1 -1
- package/lib/es6/a11y/focus.js +15 -16
- package/lib/es6/a11y/focus.js.map +1 -1
- package/lib/es6/a11y/hints.js +67 -73
- package/lib/es6/a11y/hints.js.map +1 -1
- package/lib/es6/a11y/insights.js +353 -524
- package/lib/es6/a11y/insights.js.map +1 -1
- package/lib/es6/a11y/intl.js +4 -5
- package/lib/es6/a11y/intl.js.map +1 -1
- package/lib/es6/a11y/locale.js +11 -18
- package/lib/es6/a11y/locale.js.map +1 -1
- package/lib/es6/a11y/serialize.js +162 -203
- package/lib/es6/a11y/serialize.js.map +1 -1
- package/lib/es6/a11y/summarize.js +6 -6
- package/lib/es6/a11y/summarize.js.map +1 -1
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +15 -15
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/a11y/translations/module/de.json +2 -2
- package/lib/es6/a11y/translations/module/en.json +2 -2
- package/lib/es6/a11y/translations/module/es.json +2 -2
- package/lib/es6/a11y/translations/module/fr.json +2 -2
- package/lib/es6/a11y/translations/module/it.json +2 -2
- package/lib/es6/a11y/translations/module/ja.json +2 -2
- package/lib/es6/a11y/translations/module/ko.json +2 -2
- package/lib/es6/a11y/translations/module/nl.json +2 -2
- package/lib/es6/a11y/translations/module/pl.json +2 -2
- package/lib/es6/a11y/translations/module/pt.json +2 -2
- package/lib/es6/a11y/translations/module/sv.json +2 -2
- package/lib/es6/a11y/translations/module/tr.json +2 -2
- package/lib/es6/a11y/translations/module/vi.json +2 -2
- package/lib/es6/a11y/translations/module/zh.json +2 -2
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +15 -15
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/color.js +1 -1
- package/lib/es6/color.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.js +416 -462
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.js +92 -111
- package/lib/es6/component/Chart/AreaChart.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.js +225 -213
- package/lib/es6/component/Chart/BarChart.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.js +109 -132
- package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.js +276 -301
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js +70 -103
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.js +74 -90
- package/lib/es6/component/Chart/DonutChart.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.js +121 -144
- package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.js +90 -109
- package/lib/es6/component/Chart/LineChart.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.js +80 -107
- package/lib/es6/component/Chart/RadarChart.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.js +113 -138
- package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.js +97 -117
- package/lib/es6/component/Chart/VennChart.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +70 -104
- package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +53 -65
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +198 -211
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +58 -68
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/es6/component/Cigarette/Cigarette.js +108 -122
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.js +100 -130
- package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/es6/component/SvgElement.js +4 -5
- package/lib/es6/component/SvgElement.js.map +1 -1
- package/lib/es6/createElement.js +55 -54
- package/lib/es6/createElement.js.map +1 -1
- package/lib/es6/style/axis.shadow.css +3 -0
- package/lib/es6/style/plot.shadow.css +1 -3
- package/lib/es6/style/plotA11yModule.shadow.css +10 -11
- package/lib/es6/style/plotA11yView.shadow.css +13 -26
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +14 -14
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/types/Axis.d.js.map +1 -1
- package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Hover.d.js.map +1 -1
- package/lib/es6/types/Line.d.js.map +1 -1
- package/lib/es6/types/Plot.d.js.map +1 -1
- package/lib/es6/types/Radar.d.js.map +1 -1
- package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/es6/types/Tooltip.d.js.map +1 -1
- package/lib/es6/types/Venn.d.js.map +1 -1
- package/lib/es6/utils.js +105 -144
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/AnimatedClipPath.mjs +24 -36
- package/lib/esm/Area.mjs +178 -149
- package/lib/esm/Axis.mjs +241 -242
- package/lib/esm/Bar.mjs +155 -137
- package/lib/esm/Bubble.mjs +205 -171
- package/lib/esm/CompactHorizontalBar.mjs +428 -383
- package/lib/esm/Donut.mjs +315 -266
- package/lib/esm/Dots.mjs +60 -49
- package/lib/esm/GroupBar.mjs +71 -75
- package/lib/esm/HorizontalBar.mjs +142 -120
- package/lib/esm/Hover.mjs +173 -163
- package/lib/esm/Line.mjs +174 -145
- package/lib/esm/Pattern.mjs +67 -63
- package/lib/esm/Plot.mjs +98 -95
- package/lib/esm/Radar.mjs +550 -498
- package/lib/esm/RadialTree.mjs +512 -416
- package/lib/esm/Reference.mjs +137 -122
- package/lib/esm/ResponsiveContainer.mjs +58 -69
- package/lib/esm/ScatterPlot.mjs +163 -162
- package/lib/esm/StackBar.mjs +126 -147
- package/lib/esm/StackedArea.mjs +53 -61
- package/lib/esm/Tooltip.mjs +185 -175
- package/lib/esm/Venn.mjs +170 -170
- package/lib/esm/a11y/DataAccessibilityTable.mjs +46 -73
- package/lib/esm/a11y/PlotA11yModule.mjs +37 -80
- package/lib/esm/a11y/PlotA11yView.mjs +99 -74
- package/lib/esm/a11y/bezier.mjs +16 -23
- package/lib/esm/a11y/focus.mjs +15 -16
- package/lib/esm/a11y/hints.mjs +65 -71
- package/lib/esm/a11y/insights.mjs +347 -495
- package/lib/esm/a11y/intl.mjs +4 -5
- package/lib/esm/a11y/locale.mjs +12 -14
- package/lib/esm/a11y/serialize.mjs +139 -152
- package/lib/esm/a11y/summarize.mjs +3 -3
- package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/a11y/translations/module/de.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/en.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/es.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/fr.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/it.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/ja.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/ko.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/nl.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/pl.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/pt.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/sv.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/tr.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/vi.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/zh.json.mjs +2 -4
- package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/color.mjs +1 -1
- package/lib/esm/component/Chart/AbstractChart.mjs +422 -415
- package/lib/esm/component/Chart/AreaChart.mjs +92 -91
- package/lib/esm/component/Chart/BarChart.mjs +225 -177
- package/lib/esm/component/Chart/BubbleChart.mjs +110 -118
- package/lib/esm/component/Chart/CigaretteChart.mjs +277 -268
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +70 -87
- package/lib/esm/component/Chart/DonutChart.mjs +74 -84
- package/lib/esm/component/Chart/HistogramChart.mjs +121 -117
- package/lib/esm/component/Chart/LineChart.mjs +90 -89
- package/lib/esm/component/Chart/RadarChart.mjs +81 -97
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +113 -111
- package/lib/esm/component/Chart/VennChart.mjs +98 -111
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +75 -97
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +54 -55
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +194 -165
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.type.mjs +1 -1
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +60 -58
- package/lib/esm/component/Cigarette/Cigarette.mjs +109 -99
- package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +97 -111
- package/lib/esm/component/SvgElement.mjs +4 -4
- package/lib/esm/createElement.mjs +54 -37
- package/lib/esm/style/axis.shadow.css +3 -0
- package/lib/esm/style/plot.shadow.css +1 -3
- package/lib/esm/style/plotA11yModule.shadow.css +10 -11
- package/lib/esm/style/plotA11yView.shadow.css +13 -26
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/utils.mjs +103 -138
- package/lib/types/Axis.d.ts +4 -0
- package/lib/types/CompactHorizontalBar.d.ts +1 -1
- package/lib/types/Hover.d.ts +1 -1
- package/lib/types/Line.d.ts +1 -1
- package/lib/types/Plot.d.ts +1 -1
- package/lib/types/Radar.d.ts +1 -1
- package/lib/types/ResponsiveContainer.d.ts +1 -1
- package/lib/types/Tooltip.d.ts +1 -3
- package/lib/types/Venn.d.ts +1 -1
- package/lib/types/a11y/PlotA11yModule.d.ts +4 -11
- package/lib/types/a11y/PlotA11yView.d.ts +12 -1
- package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
- package/lib/types/component/Chart/AbstractChart.d.ts +1 -1
- package/lib/types/component/Chart/AbstractChart.type.d.ts +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -1
- package/lib/types/utils.d.ts +10 -10
- package/package.json +11 -14
package/lib/esm/RadialTree.mjs
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
5
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
6
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
7
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
8
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
9
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
2
|
import { sstyled, Component } from "@semcore/core";
|
|
11
3
|
import assignProps from "@semcore/core/lib/utils/assignProps";
|
|
@@ -17,229 +9,220 @@ import React from "react";
|
|
|
17
9
|
import createElement from "./createElement.mjs";
|
|
18
10
|
import { getPatternSymbolSize, PatternSymbol } from "./Pattern.mjs";
|
|
19
11
|
import { measureText, getChartDefaultColorName } from "./utils.mjs";
|
|
20
|
-
var _excluded = ["data"];
|
|
21
12
|
/*!__reshadow-styles__:"./style/radial-tree.shadow.css"*/
|
|
22
|
-
|
|
13
|
+
const style = (
|
|
23
14
|
/*__reshadow_css_start__*/
|
|
24
15
|
(sstyled.insert(
|
|
25
16
|
/*__inner_css_start__*/
|
|
26
|
-
".
|
|
17
|
+
".___SRadian_56jyw_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info, #008ff8)}.___SLine_56jyw_gg_{stroke:var(--intergalactic-text-large-info, #008ff8)}.___SLine_56jyw_gg_.__stroke_56jyw_gg_{stroke:var(--stroke_56jyw)}.___SLine_56jyw_gg_.__transparent_56jyw_gg_{opacity:.3}.___SCap_56jyw_gg_{transition:r .1s}.___SCap_56jyw_gg_.__pattern_56jyw_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:1px}.___SCap_56jyw_gg_.__transparent_56jyw_gg_,.___SIcon_56jyw_gg_.__transparent_56jyw_gg_,.___SLabel_56jyw_gg_.__transparent_56jyw_gg_{opacity:.3}.___SLabel_56jyw_gg_{fill:var(--color_56jyw)}@media (hover:hover){.___SRadian_56jyw_gg_:hover .___SLabel_56jyw_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_56jyw_gg_{transition:none}}",
|
|
27
18
|
/*__inner_css_end__*/
|
|
28
|
-
"
|
|
19
|
+
"56jyw_gg_"
|
|
29
20
|
), /*__reshadow_css_end__*/
|
|
30
21
|
{
|
|
31
|
-
"__SRadian": "
|
|
32
|
-
"__SLine": "
|
|
33
|
-
"_stroke": "
|
|
34
|
-
"--stroke": "--
|
|
35
|
-
"_transparent": "
|
|
36
|
-
"__SCap": "
|
|
37
|
-
"_pattern": "
|
|
38
|
-
"__SIcon": "
|
|
39
|
-
"__SLabel": "
|
|
40
|
-
"--color": "--
|
|
41
|
-
"__SLineCap": "
|
|
22
|
+
"__SRadian": "___SRadian_56jyw_gg_",
|
|
23
|
+
"__SLine": "___SLine_56jyw_gg_",
|
|
24
|
+
"_stroke": "__stroke_56jyw_gg_",
|
|
25
|
+
"--stroke": "--stroke_56jyw",
|
|
26
|
+
"_transparent": "__transparent_56jyw_gg_",
|
|
27
|
+
"__SCap": "___SCap_56jyw_gg_",
|
|
28
|
+
"_pattern": "__pattern_56jyw_gg_",
|
|
29
|
+
"__SIcon": "___SIcon_56jyw_gg_",
|
|
30
|
+
"__SLabel": "___SLabel_56jyw_gg_",
|
|
31
|
+
"--color": "--color_56jyw",
|
|
32
|
+
"__SLineCap": "___SLineCap_56jyw_gg_"
|
|
42
33
|
})
|
|
43
34
|
);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
_defineProperty(_this, "Element", void 0);
|
|
51
|
-
_this.handleRadianClick = _this.handleRadianClick.bind(_this);
|
|
52
|
-
return _this;
|
|
35
|
+
const baseAngle = -Math.PI / 2;
|
|
36
|
+
class RadialTreeBase extends Component {
|
|
37
|
+
constructor(props) {
|
|
38
|
+
super(props);
|
|
39
|
+
_defineProperty(this, "Element", void 0);
|
|
40
|
+
this.handleRadianClick = this.handleRadianClick.bind(this);
|
|
53
41
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
var _attrs$index$to2;
|
|
106
|
-
return (_attrs$index$to2 = attrs[index].to) === null || _attrs$index$to2 === void 0 ? void 0 : _attrs$index$to2.cy;
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
if (iconsNodes.length > 0) {
|
|
110
|
-
var _attrs = iconsNodes.map(function(node) {
|
|
111
|
-
var _node$width, _node$height, _lineNode$x2, _lineNode$y2;
|
|
112
|
-
var width = (_node$width = node.width) === null || _node$width === void 0 || (_node$width = _node$width.baseVal) === null || _node$width === void 0 ? void 0 : _node$width.value;
|
|
113
|
-
var height = (_node$height = node.height) === null || _node$height === void 0 || (_node$height = _node$height.baseVal) === null || _node$height === void 0 ? void 0 : _node$height.value;
|
|
114
|
-
var radianIndex = Number.parseInt(node.dataset.radianIndex, 10);
|
|
115
|
-
var lineNode = linesNodes[radianIndex];
|
|
116
|
-
return {
|
|
117
|
-
from: {
|
|
118
|
-
x: ((_lineNode$x2 = lineNode.x1) === null || _lineNode$x2 === void 0 || (_lineNode$x2 = _lineNode$x2.baseVal) === null || _lineNode$x2 === void 0 ? void 0 : _lineNode$x2.value) - width / 2,
|
|
119
|
-
y: ((_lineNode$y2 = lineNode.y1) === null || _lineNode$y2 === void 0 || (_lineNode$y2 = _lineNode$y2.baseVal) === null || _lineNode$y2 === void 0 ? void 0 : _lineNode$y2.value) - height / 2
|
|
120
|
-
},
|
|
121
|
-
to: {
|
|
122
|
-
x: node.dataset["x"],
|
|
123
|
-
y: node.dataset["y"]
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
});
|
|
127
|
-
iconsAnimation.attr("opacity", 0).attr("x", function(_, index) {
|
|
128
|
-
var _attrs$index$from3;
|
|
129
|
-
return (_attrs$index$from3 = _attrs[index].from) === null || _attrs$index$from3 === void 0 ? void 0 : _attrs$index$from3.x;
|
|
130
|
-
}).attr("y", function(_, index) {
|
|
131
|
-
var _attrs$index$from4;
|
|
132
|
-
return (_attrs$index$from4 = _attrs[index].from) === null || _attrs$index$from4 === void 0 ? void 0 : _attrs$index$from4.y;
|
|
133
|
-
}).transition().duration(duration).attr("opacity", 1).attr("x", function(_, index) {
|
|
134
|
-
var _attrs$index$to3;
|
|
135
|
-
return (_attrs$index$to3 = _attrs[index].to) === null || _attrs$index$to3 === void 0 ? void 0 : _attrs$index$to3.x;
|
|
136
|
-
}).attr("y", function(_, index) {
|
|
137
|
-
var _attrs$index$to4;
|
|
138
|
-
return (_attrs$index$to4 = _attrs[index].to) === null || _attrs$index$to4 === void 0 ? void 0 : _attrs$index$to4.y;
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
if (linesNodes.length > 0) {
|
|
142
|
-
var _attrs2 = linesNodes.map(function(node) {
|
|
143
|
-
var _node$x, _node$y;
|
|
144
|
-
return {
|
|
145
|
-
from: {
|
|
146
|
-
x2: (_node$x = node.x1) === null || _node$x === void 0 || (_node$x = _node$x.baseVal) === null || _node$x === void 0 ? void 0 : _node$x.value,
|
|
147
|
-
y2: (_node$y = node.y1) === null || _node$y === void 0 || (_node$y = _node$y.baseVal) === null || _node$y === void 0 ? void 0 : _node$y.value
|
|
148
|
-
},
|
|
149
|
-
to: {
|
|
150
|
-
x2: node.dataset["x2"],
|
|
151
|
-
y2: node.dataset["y2"]
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
});
|
|
155
|
-
linesAnimation.attr("opacity", 0).attr("x2", function(_, index) {
|
|
156
|
-
var _attrs2$index$from;
|
|
157
|
-
return (_attrs2$index$from = _attrs2[index].from) === null || _attrs2$index$from === void 0 ? void 0 : _attrs2$index$from.x2;
|
|
158
|
-
}).attr("y2", function(_, index) {
|
|
159
|
-
var _attrs2$index$from2;
|
|
160
|
-
return (_attrs2$index$from2 = _attrs2[index].from) === null || _attrs2$index$from2 === void 0 ? void 0 : _attrs2$index$from2.y2;
|
|
161
|
-
}).transition().duration(duration).attr("opacity", 1).attr("x2", function(_, index) {
|
|
162
|
-
var _attrs2$index$to;
|
|
163
|
-
return (_attrs2$index$to = _attrs2[index].to) === null || _attrs2$index$to === void 0 ? void 0 : _attrs2$index$to.x2;
|
|
164
|
-
}).attr("y2", function(_, index) {
|
|
165
|
-
var _attrs2$index$to2;
|
|
166
|
-
return (_attrs2$index$to2 = _attrs2[index].to) === null || _attrs2$index$to2 === void 0 ? void 0 : _attrs2$index$to2.y2;
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
if (labelsNodes.length > 0) {
|
|
170
|
-
labelsAnimation.attr("opacity", 0);
|
|
171
|
-
labelsAnimation.transition().duration(duration).attr("opacity", 1);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}, {
|
|
175
|
-
key: "componentDidUpdate",
|
|
176
|
-
value: function componentDidUpdate(prevProps) {
|
|
177
|
-
if (prevProps.$rootProps.data !== this.asProps.data) {
|
|
178
|
-
this.runAppearAnimation();
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}, {
|
|
182
|
-
key: "componentDidMount",
|
|
183
|
-
value: function componentDidMount() {
|
|
184
|
-
this.runAppearAnimation();
|
|
185
|
-
}
|
|
186
|
-
}, {
|
|
187
|
-
key: "handleRadianClick",
|
|
188
|
-
value: function handleRadianClick(key) {
|
|
189
|
-
var _this2 = this;
|
|
190
|
-
return function(event) {
|
|
191
|
-
var newKey = key !== _this2.asProps.activeKey ? key : null;
|
|
192
|
-
_this2.handlers.activeKey(newKey, event);
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
}, {
|
|
196
|
-
key: "computeTextWidth",
|
|
197
|
-
value: function computeTextWidth() {
|
|
198
|
-
var _this$asProps2 = this.asProps, data = _this$asProps2.data, textSize = _this$asProps2.textSize;
|
|
199
|
-
var widths = data.map(function(_ref0) {
|
|
200
|
-
var label = _ref0.label;
|
|
201
|
-
return measureText(label, textSize);
|
|
42
|
+
uncontrolledProps() {
|
|
43
|
+
return {
|
|
44
|
+
activeKey: null
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
runAppearAnimation() {
|
|
48
|
+
var _a;
|
|
49
|
+
const {
|
|
50
|
+
duration,
|
|
51
|
+
uid
|
|
52
|
+
} = this.asProps;
|
|
53
|
+
if (!canUseDOM()) return;
|
|
54
|
+
const preferReduceMotion = (_a = window.matchMedia("(prefers-reduced-motion: reduce)")) == null ? void 0 : _a.matches;
|
|
55
|
+
if (!(duration > 0)) return;
|
|
56
|
+
if (preferReduceMotion) return;
|
|
57
|
+
const circlesAnimation = transition().selection().selectAll(`[data-radial-animation=${uid}-cap-circle]`).interrupt();
|
|
58
|
+
const iconsAnimation = transition().selection().selectAll(`[data-radial-animation=${uid}-cap-icon]`).interrupt();
|
|
59
|
+
const linesAnimation = transition().selection().selectAll(`[data-radial-animation=${uid}-line]`).interrupt();
|
|
60
|
+
const labelsAnimation = transition().selection().selectAll(`[data-radial-animation=${uid}-label]`).interrupt();
|
|
61
|
+
const circlesNodes = circlesAnimation.nodes();
|
|
62
|
+
const iconsNodes = iconsAnimation.nodes();
|
|
63
|
+
const linesNodes = linesAnimation.nodes();
|
|
64
|
+
const labelsNodes = linesAnimation.nodes();
|
|
65
|
+
if (circlesNodes.length > 0) {
|
|
66
|
+
const attrs = circlesNodes.map((node) => {
|
|
67
|
+
var _a2, _b, _c, _d;
|
|
68
|
+
const radianIndex = Number.parseInt(node.dataset.radianIndex, 10);
|
|
69
|
+
const lineNode = linesNodes[radianIndex];
|
|
70
|
+
return {
|
|
71
|
+
from: {
|
|
72
|
+
cx: (_b = (_a2 = lineNode.x1) == null ? void 0 : _a2.baseVal) == null ? void 0 : _b.value,
|
|
73
|
+
cy: (_d = (_c = lineNode.y1) == null ? void 0 : _c.baseVal) == null ? void 0 : _d.value
|
|
74
|
+
},
|
|
75
|
+
to: {
|
|
76
|
+
cx: node.dataset["cx"],
|
|
77
|
+
cy: node.dataset["cy"]
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
circlesAnimation.attr("opacity", 0).attr("cx", (_, index) => {
|
|
82
|
+
var _a2;
|
|
83
|
+
return (_a2 = attrs[index].from) == null ? void 0 : _a2.cx;
|
|
84
|
+
}).attr("cy", (_, index) => {
|
|
85
|
+
var _a2;
|
|
86
|
+
return (_a2 = attrs[index].from) == null ? void 0 : _a2.cy;
|
|
87
|
+
}).transition().duration(duration).attr("opacity", 1).attr("cx", (_, index) => {
|
|
88
|
+
var _a2;
|
|
89
|
+
return (_a2 = attrs[index].to) == null ? void 0 : _a2.cx;
|
|
90
|
+
}).attr("cy", (_, index) => {
|
|
91
|
+
var _a2;
|
|
92
|
+
return (_a2 = attrs[index].to) == null ? void 0 : _a2.cy;
|
|
202
93
|
});
|
|
203
|
-
return Math.max.apply(Math, _toConsumableArray(widths));
|
|
204
94
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
95
|
+
if (iconsNodes.length > 0) {
|
|
96
|
+
const attrs = iconsNodes.map((node) => {
|
|
97
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h;
|
|
98
|
+
const width = (_b = (_a2 = node.width) == null ? void 0 : _a2.baseVal) == null ? void 0 : _b.value;
|
|
99
|
+
const height = (_d = (_c = node.height) == null ? void 0 : _c.baseVal) == null ? void 0 : _d.value;
|
|
100
|
+
const radianIndex = Number.parseInt(node.dataset.radianIndex, 10);
|
|
101
|
+
const lineNode = linesNodes[radianIndex];
|
|
102
|
+
return {
|
|
103
|
+
from: {
|
|
104
|
+
x: ((_f = (_e = lineNode.x1) == null ? void 0 : _e.baseVal) == null ? void 0 : _f.value) - width / 2,
|
|
105
|
+
y: ((_h = (_g = lineNode.y1) == null ? void 0 : _g.baseVal) == null ? void 0 : _h.value) - height / 2
|
|
106
|
+
},
|
|
107
|
+
to: {
|
|
108
|
+
x: node.dataset["x"],
|
|
109
|
+
y: node.dataset["y"]
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
});
|
|
113
|
+
iconsAnimation.attr("opacity", 0).attr("x", (_, index) => {
|
|
114
|
+
var _a2;
|
|
115
|
+
return (_a2 = attrs[index].from) == null ? void 0 : _a2.x;
|
|
116
|
+
}).attr("y", (_, index) => {
|
|
117
|
+
var _a2;
|
|
118
|
+
return (_a2 = attrs[index].from) == null ? void 0 : _a2.y;
|
|
119
|
+
}).transition().duration(duration).attr("opacity", 1).attr("x", (_, index) => {
|
|
120
|
+
var _a2;
|
|
121
|
+
return (_a2 = attrs[index].to) == null ? void 0 : _a2.x;
|
|
122
|
+
}).attr("y", (_, index) => {
|
|
123
|
+
var _a2;
|
|
124
|
+
return (_a2 = attrs[index].to) == null ? void 0 : _a2.y;
|
|
125
|
+
});
|
|
217
126
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
127
|
+
if (linesNodes.length > 0) {
|
|
128
|
+
const attrs = linesNodes.map((node) => {
|
|
129
|
+
var _a2, _b, _c, _d;
|
|
130
|
+
return {
|
|
131
|
+
from: {
|
|
132
|
+
x2: (_b = (_a2 = node.x1) == null ? void 0 : _a2.baseVal) == null ? void 0 : _b.value,
|
|
133
|
+
y2: (_d = (_c = node.y1) == null ? void 0 : _c.baseVal) == null ? void 0 : _d.value
|
|
134
|
+
},
|
|
135
|
+
to: {
|
|
136
|
+
x2: node.dataset["x2"],
|
|
137
|
+
y2: node.dataset["y2"]
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
linesAnimation.attr("opacity", 0).attr("x2", (_, index) => {
|
|
142
|
+
var _a2;
|
|
143
|
+
return (_a2 = attrs[index].from) == null ? void 0 : _a2.x2;
|
|
144
|
+
}).attr("y2", (_, index) => {
|
|
145
|
+
var _a2;
|
|
146
|
+
return (_a2 = attrs[index].from) == null ? void 0 : _a2.y2;
|
|
147
|
+
}).transition().duration(duration).attr("opacity", 1).attr("x2", (_, index) => {
|
|
148
|
+
var _a2;
|
|
149
|
+
return (_a2 = attrs[index].to) == null ? void 0 : _a2.x2;
|
|
150
|
+
}).attr("y2", (_, index) => {
|
|
151
|
+
var _a2;
|
|
152
|
+
return (_a2 = attrs[index].to) == null ? void 0 : _a2.y2;
|
|
228
153
|
});
|
|
229
154
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
var _ref;
|
|
234
|
-
var SRadialTree = this.Element;
|
|
235
|
-
var Children = this.asProps.Children;
|
|
236
|
-
this.asProps.dataHintsHandler.establishDataType("values-set");
|
|
237
|
-
return _ref = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SRadialTree, _ref.cn("SRadialTree", {
|
|
238
|
-
"render": "g"
|
|
239
|
-
}), /* @__PURE__ */ React.createElement(Children, _ref.cn("Children", {})));
|
|
155
|
+
if (labelsNodes.length > 0) {
|
|
156
|
+
labelsAnimation.attr("opacity", 0);
|
|
157
|
+
labelsAnimation.transition().duration(duration).attr("opacity", 1);
|
|
240
158
|
}
|
|
241
|
-
}
|
|
242
|
-
|
|
159
|
+
}
|
|
160
|
+
componentDidUpdate(prevProps) {
|
|
161
|
+
if (prevProps.$rootProps.data !== this.asProps.data) {
|
|
162
|
+
this.runAppearAnimation();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
componentDidMount() {
|
|
166
|
+
this.runAppearAnimation();
|
|
167
|
+
}
|
|
168
|
+
handleRadianClick(key) {
|
|
169
|
+
return (event) => {
|
|
170
|
+
const newKey = key !== this.asProps.activeKey ? key : null;
|
|
171
|
+
this.handlers.activeKey(newKey, event);
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
computeTextWidth() {
|
|
175
|
+
const {
|
|
176
|
+
data,
|
|
177
|
+
textSize
|
|
178
|
+
} = this.asProps;
|
|
179
|
+
const widths = data.map(({
|
|
180
|
+
label
|
|
181
|
+
}) => measureText(label, textSize));
|
|
182
|
+
return Math.max(...widths);
|
|
183
|
+
}
|
|
184
|
+
getTitleProps() {
|
|
185
|
+
const {
|
|
186
|
+
uid,
|
|
187
|
+
size,
|
|
188
|
+
textSize
|
|
189
|
+
} = this.asProps;
|
|
190
|
+
const [width, height] = size;
|
|
191
|
+
const center = [width / 2, height / 2];
|
|
192
|
+
const [x, y] = center;
|
|
193
|
+
return {
|
|
194
|
+
x,
|
|
195
|
+
y,
|
|
196
|
+
textSize: textSize * 1.5,
|
|
197
|
+
["data-radial-animation"]: `${uid}-label`
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
getRadianProps() {
|
|
201
|
+
const {
|
|
202
|
+
data,
|
|
203
|
+
...restRootProps
|
|
204
|
+
} = this.asProps;
|
|
205
|
+
const textWidth = this.computeTextWidth();
|
|
206
|
+
return {
|
|
207
|
+
...restRootProps,
|
|
208
|
+
radiansCount: data.length,
|
|
209
|
+
data,
|
|
210
|
+
textWidth,
|
|
211
|
+
onRadianClick: this.handleRadianClick
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
render() {
|
|
215
|
+
var _ref;
|
|
216
|
+
const SRadialTree = this.Element;
|
|
217
|
+
const {
|
|
218
|
+
Children
|
|
219
|
+
} = this.asProps;
|
|
220
|
+
this.asProps.dataHintsHandler.establishDataType("values-set");
|
|
221
|
+
return _ref = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SRadialTree, _ref.cn("SRadialTree", {
|
|
222
|
+
"render": "g"
|
|
223
|
+
}), /* @__PURE__ */ React.createElement(Children, _ref.cn("Children", {})));
|
|
224
|
+
}
|
|
225
|
+
}
|
|
243
226
|
_defineProperty(RadialTreeBase, "displayName", "RadialTree");
|
|
244
227
|
_defineProperty(RadialTreeBase, "style", style);
|
|
245
228
|
_defineProperty(RadialTreeBase, "enhance", [uniqueIDEnhancement()]);
|
|
@@ -254,175 +237,244 @@ _defineProperty(RadialTreeBase, "defaultProps", {
|
|
|
254
237
|
textSize: 14,
|
|
255
238
|
defaultActiveKey: null
|
|
256
239
|
});
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
_defineProperty(_this3, "Element", void 0);
|
|
263
|
-
_this3.renderRadian = _this3.renderRadian.bind(_this3);
|
|
264
|
-
return _this3;
|
|
240
|
+
class RadialTreeRadian extends Component {
|
|
241
|
+
constructor(props) {
|
|
242
|
+
super(props);
|
|
243
|
+
_defineProperty(this, "Element", void 0);
|
|
244
|
+
this.renderRadian = this.renderRadian.bind(this);
|
|
265
245
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
246
|
+
getInteractiveAreaProps({
|
|
247
|
+
$rootProps
|
|
248
|
+
}, index) {
|
|
249
|
+
var _a;
|
|
250
|
+
const data = (_a = $rootProps.data) == null ? void 0 : _a[index];
|
|
251
|
+
const {
|
|
252
|
+
xStart,
|
|
253
|
+
yStart,
|
|
254
|
+
xLabelCenter,
|
|
255
|
+
yLabelCenter,
|
|
256
|
+
capSize
|
|
257
|
+
} = this.computeRadianPosition(data, index);
|
|
258
|
+
return {
|
|
259
|
+
x1: xStart,
|
|
260
|
+
y1: yStart,
|
|
261
|
+
x2: xLabelCenter,
|
|
262
|
+
y2: yLabelCenter,
|
|
263
|
+
strokeWidth: capSize * 3
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
getLineProps({
|
|
267
|
+
$rootProps
|
|
268
|
+
}, index) {
|
|
269
|
+
var _a;
|
|
270
|
+
const data = (_a = $rootProps.data) == null ? void 0 : _a[index];
|
|
271
|
+
const {
|
|
272
|
+
xStart,
|
|
273
|
+
yStart,
|
|
274
|
+
xEnd,
|
|
275
|
+
yEnd
|
|
276
|
+
} = this.computeRadianPosition(data, index);
|
|
277
|
+
const {
|
|
278
|
+
uid,
|
|
279
|
+
transparent,
|
|
280
|
+
resolveColor
|
|
281
|
+
} = this.asProps;
|
|
282
|
+
const color = data.color ?? this.asProps.color;
|
|
283
|
+
return {
|
|
284
|
+
x1: xStart,
|
|
285
|
+
y1: yStart,
|
|
286
|
+
x2: xEnd,
|
|
287
|
+
y2: yEnd,
|
|
288
|
+
stroke: color,
|
|
289
|
+
resolveColor,
|
|
290
|
+
transparent,
|
|
291
|
+
["data-x1"]: xStart,
|
|
292
|
+
["data-y1"]: yStart,
|
|
293
|
+
["data-x2"]: xEnd,
|
|
294
|
+
["data-y2"]: yEnd,
|
|
295
|
+
["data-radial-animation"]: `${uid}-line`,
|
|
296
|
+
["data-radian-index"]: index
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
getCapProps({
|
|
300
|
+
$rootProps
|
|
301
|
+
}, index) {
|
|
302
|
+
var _a;
|
|
303
|
+
const data = (_a = $rootProps.data) == null ? void 0 : _a[index];
|
|
304
|
+
const {
|
|
305
|
+
xEnd,
|
|
306
|
+
yEnd,
|
|
307
|
+
capSize
|
|
308
|
+
} = this.computeRadianPosition(data, index);
|
|
309
|
+
const {
|
|
310
|
+
uid,
|
|
311
|
+
transparent,
|
|
312
|
+
resolveColor,
|
|
313
|
+
patterns
|
|
314
|
+
} = this.asProps;
|
|
315
|
+
const color = data.color ?? this.asProps.color;
|
|
316
|
+
return {
|
|
317
|
+
x: xEnd,
|
|
318
|
+
y: yEnd,
|
|
319
|
+
["data-cx"]: xEnd,
|
|
320
|
+
["data-cy"]: yEnd,
|
|
321
|
+
radius: capSize,
|
|
322
|
+
color,
|
|
323
|
+
resolveColor,
|
|
324
|
+
transparent,
|
|
325
|
+
patterns,
|
|
326
|
+
uid: `${uid}-cap-${index}`,
|
|
327
|
+
["data-radial-animation"]: `${uid}-cap-circle`,
|
|
328
|
+
["data-radian-index"]: index
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
getIconProps({
|
|
332
|
+
$rootProps
|
|
333
|
+
}, index) {
|
|
334
|
+
var _a;
|
|
335
|
+
const data = (_a = $rootProps.data) == null ? void 0 : _a[index];
|
|
336
|
+
const {
|
|
337
|
+
xEnd,
|
|
338
|
+
yEnd,
|
|
339
|
+
isActive
|
|
340
|
+
} = this.computeRadianPosition(data, index);
|
|
341
|
+
const {
|
|
342
|
+
uid,
|
|
343
|
+
resolveColor
|
|
344
|
+
} = this.asProps;
|
|
345
|
+
const iconColor = data.iconColor ?? this.asProps.iconColor;
|
|
346
|
+
const iconSize = data.iconSize ?? this.asProps.iconSize;
|
|
347
|
+
const icon = data.icon ?? this.asProps.icon;
|
|
348
|
+
const x = xEnd - iconSize / 2;
|
|
349
|
+
const y = yEnd - iconSize / 2;
|
|
350
|
+
return {
|
|
351
|
+
x,
|
|
352
|
+
y,
|
|
353
|
+
["data-x"]: x,
|
|
354
|
+
["data-y"]: y,
|
|
355
|
+
iconSize,
|
|
356
|
+
color: iconColor ?? "#fff",
|
|
357
|
+
resolveColor,
|
|
358
|
+
["data-radial-animation"]: `${uid}-cap-icon`,
|
|
359
|
+
["data-radian-index"]: index,
|
|
360
|
+
icon,
|
|
361
|
+
tag: icon,
|
|
362
|
+
isActive
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
getLabelProps({
|
|
366
|
+
$rootProps
|
|
367
|
+
}, index) {
|
|
368
|
+
var _a;
|
|
369
|
+
const data = (_a = $rootProps.data) == null ? void 0 : _a[index];
|
|
370
|
+
const {
|
|
371
|
+
xLabelCenter,
|
|
372
|
+
yLabelCenter,
|
|
373
|
+
labelAngle,
|
|
374
|
+
isHorizontal
|
|
375
|
+
} = this.computeRadianPosition(data, index);
|
|
376
|
+
const {
|
|
377
|
+
uid,
|
|
378
|
+
textSize,
|
|
379
|
+
transparent,
|
|
380
|
+
resolveColor
|
|
381
|
+
} = this.asProps;
|
|
382
|
+
const {
|
|
383
|
+
label
|
|
384
|
+
} = data;
|
|
385
|
+
const color = data.color ?? this.asProps.color;
|
|
386
|
+
return {
|
|
387
|
+
x: xLabelCenter,
|
|
388
|
+
y: yLabelCenter,
|
|
389
|
+
angle: labelAngle,
|
|
390
|
+
["data-radial-animation"]: `${uid}-label`,
|
|
391
|
+
["data-radian-index"]: index,
|
|
392
|
+
label,
|
|
393
|
+
color,
|
|
394
|
+
resolveColor,
|
|
395
|
+
isHorizontal,
|
|
396
|
+
textSize,
|
|
397
|
+
transparent
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
getRadianKey(data, index) {
|
|
401
|
+
return data.key ?? `radian-${index}`;
|
|
402
|
+
}
|
|
403
|
+
computeRadianPosition(data, index) {
|
|
404
|
+
const {
|
|
405
|
+
centralMargin,
|
|
406
|
+
labelMargin,
|
|
407
|
+
angleOffset,
|
|
408
|
+
activeKey,
|
|
409
|
+
size,
|
|
410
|
+
radiansCount,
|
|
411
|
+
textWidth
|
|
412
|
+
} = this.asProps;
|
|
413
|
+
const [width, height] = size;
|
|
414
|
+
const key = this.getRadianKey(data, index);
|
|
415
|
+
const isActive = activeKey === key;
|
|
416
|
+
const baseCapSize = data.capSize ?? this.asProps.capSize;
|
|
417
|
+
const capSize = baseCapSize * (isActive ? 1 : 0.5);
|
|
418
|
+
const minDemSize = Math.min(width, height) / 2;
|
|
419
|
+
const length = Math.max(minDemSize - textWidth - baseCapSize - centralMargin - labelMargin * 2, 10);
|
|
420
|
+
const angle = baseAngle + angleOffset + index / radiansCount * (Math.PI * 2);
|
|
421
|
+
const isHorizontal = angle - baseAngle > 1 / 6 * Math.PI && angle - baseAngle < 5 / 6 * Math.PI || angle - baseAngle > 7 / 6 * Math.PI && angle - baseAngle < 11 / 6 * Math.PI;
|
|
422
|
+
const topAngle = -Math.PI / 2;
|
|
423
|
+
const labelAngle = (angle - topAngle) % Math.PI + topAngle;
|
|
424
|
+
const center = [width / 2, height / 2];
|
|
425
|
+
const [xCenter, yCenter] = center;
|
|
426
|
+
const start = [xCenter + Math.cos(angle) * centralMargin, yCenter + Math.sin(angle) * centralMargin];
|
|
427
|
+
const end = [xCenter + Math.cos(angle) * (centralMargin + length), yCenter + Math.sin(angle) * (centralMargin + length)];
|
|
428
|
+
const [xStart, yStart] = start;
|
|
429
|
+
const [xEnd, yEnd] = end;
|
|
430
|
+
const labelCenter = [xCenter + Math.cos(angle) * (centralMargin + length + baseCapSize + textWidth / 2 + labelMargin), yCenter + Math.sin(angle) * (centralMargin + length + baseCapSize + textWidth / 2 + labelMargin)];
|
|
431
|
+
const [xLabelCenter, yLabelCenter] = labelCenter;
|
|
432
|
+
return {
|
|
433
|
+
xStart,
|
|
434
|
+
yStart,
|
|
435
|
+
xEnd,
|
|
436
|
+
yEnd,
|
|
437
|
+
xLabelCenter,
|
|
438
|
+
yLabelCenter,
|
|
439
|
+
labelAngle,
|
|
440
|
+
isHorizontal,
|
|
441
|
+
capSize,
|
|
442
|
+
isActive
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
renderRadian(data, index) {
|
|
446
|
+
var _ref2;
|
|
447
|
+
const {
|
|
448
|
+
styles,
|
|
449
|
+
Children,
|
|
450
|
+
onRadianClick
|
|
451
|
+
} = this.asProps;
|
|
452
|
+
const key = this.getRadianKey(data, index);
|
|
453
|
+
const SRadian = "g";
|
|
454
|
+
let children = getOriginChildren(Children);
|
|
455
|
+
if (typeof children === "function") {
|
|
456
|
+
const _child = this.asProps.children;
|
|
457
|
+
const mergedProps = assignProps(children(this.asProps), this.asProps);
|
|
458
|
+
children = mergedProps.children;
|
|
459
|
+
mergedProps.children = _child;
|
|
423
460
|
}
|
|
424
|
-
|
|
425
|
-
|
|
461
|
+
this.asProps.dataHintsHandler.describeValueEntity(`${index}.${data.label}`, data.label);
|
|
462
|
+
const InteractiveArea2 = RadialTree.Radian.InteractiveArea;
|
|
463
|
+
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SRadian, _ref2.cn("SRadian", {
|
|
464
|
+
"aria-hidden": true,
|
|
465
|
+
"key": key,
|
|
466
|
+
"onClick": onRadianClick(key)
|
|
467
|
+
}), /* @__PURE__ */ React.createElement(InteractiveArea2, _ref2.cn("InteractiveArea", {})), children);
|
|
468
|
+
}
|
|
469
|
+
render() {
|
|
470
|
+
var _ref3;
|
|
471
|
+
const {
|
|
472
|
+
data
|
|
473
|
+
} = this.asProps;
|
|
474
|
+
const SRadianList = "g";
|
|
475
|
+
return _ref3 = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SRadianList, _ref3.cn("SRadianList", {}), data.map((data2, index) => this.renderRadian(data2, index)));
|
|
476
|
+
}
|
|
477
|
+
}
|
|
426
478
|
_defineProperty(RadialTreeRadian, "displayName", "RadialTreeRadian");
|
|
427
479
|
_defineProperty(RadialTreeRadian, "style", style);
|
|
428
480
|
_defineProperty(RadialTreeRadian, "defaultProps", {
|
|
@@ -433,26 +485,42 @@ _defineProperty(RadialTreeRadian, "defaultProps", {
|
|
|
433
485
|
iconSize: 16,
|
|
434
486
|
textSize: 14
|
|
435
487
|
});
|
|
436
|
-
function InteractiveArea(
|
|
488
|
+
function InteractiveArea({
|
|
489
|
+
Element: SInteractiveArea,
|
|
490
|
+
styles
|
|
491
|
+
}) {
|
|
437
492
|
var _ref4;
|
|
438
|
-
var SInteractiveArea = _ref20.Element, styles = _ref20.styles;
|
|
439
493
|
return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SInteractiveArea, _ref4.cn("SInteractiveArea", {
|
|
440
494
|
"stroke": "transparent",
|
|
441
495
|
"render": "line"
|
|
442
496
|
}));
|
|
443
497
|
}
|
|
444
|
-
function Line(
|
|
498
|
+
function Line({
|
|
499
|
+
Element: SLine,
|
|
500
|
+
styles,
|
|
501
|
+
stroke,
|
|
502
|
+
resolveColor,
|
|
503
|
+
transparent
|
|
504
|
+
}) {
|
|
445
505
|
var _ref5;
|
|
446
|
-
var SLine = _ref21.Element, styles = _ref21.styles, stroke = _ref21.stroke, resolveColor = _ref21.resolveColor, transparent = _ref21.transparent;
|
|
447
506
|
return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SLine, _ref5.cn("SLine", {
|
|
448
507
|
"render": "line",
|
|
449
508
|
"stroke": resolveColor(stroke),
|
|
450
509
|
"transparent": transparent
|
|
451
510
|
}));
|
|
452
511
|
}
|
|
453
|
-
function Cap(
|
|
512
|
+
function Cap({
|
|
513
|
+
Element: SCap,
|
|
514
|
+
styles,
|
|
515
|
+
x = 0,
|
|
516
|
+
y = 0,
|
|
517
|
+
radius,
|
|
518
|
+
color,
|
|
519
|
+
resolveColor,
|
|
520
|
+
transparent,
|
|
521
|
+
patterns
|
|
522
|
+
}) {
|
|
454
523
|
var _ref7;
|
|
455
|
-
var SCap = _ref22.Element, styles = _ref22.styles, _ref22$x = _ref22.x, x = _ref22$x === void 0 ? 0 : _ref22$x, _ref22$y = _ref22.y, y = _ref22$y === void 0 ? 0 : _ref22$y, radius = _ref22.radius, color = _ref22.color, resolveColor = _ref22.resolveColor, transparent = _ref22.transparent, patterns = _ref22.patterns;
|
|
456
524
|
if (!patterns) {
|
|
457
525
|
var _ref6;
|
|
458
526
|
return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SCap, _ref6.cn("SCap", {
|
|
@@ -464,11 +532,11 @@ function Cap(_ref22) {
|
|
|
464
532
|
"transparent": transparent
|
|
465
533
|
}));
|
|
466
534
|
}
|
|
467
|
-
|
|
468
|
-
|
|
535
|
+
const patternKey = color || getChartDefaultColorName(0);
|
|
536
|
+
const [width, height] = getPatternSymbolSize({
|
|
469
537
|
patternKey,
|
|
470
538
|
patterns
|
|
471
|
-
})
|
|
539
|
+
});
|
|
472
540
|
return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(SCap, _ref7.cn("SCap", {
|
|
473
541
|
"render": PatternSymbol,
|
|
474
542
|
"patternKey": color,
|
|
@@ -479,12 +547,20 @@ function Cap(_ref22) {
|
|
|
479
547
|
"pattern": true
|
|
480
548
|
}));
|
|
481
549
|
}
|
|
482
|
-
function Icon(
|
|
550
|
+
function Icon({
|
|
551
|
+
Element: SIcon,
|
|
552
|
+
styles,
|
|
553
|
+
isActive,
|
|
554
|
+
tag,
|
|
555
|
+
x,
|
|
556
|
+
y,
|
|
557
|
+
iconSize,
|
|
558
|
+
transparent
|
|
559
|
+
}) {
|
|
483
560
|
var _ref8;
|
|
484
|
-
var SIcon = _ref23.Element, styles = _ref23.styles, isActive = _ref23.isActive, tag = _ref23.tag, x = _ref23.x, y = _ref23.y, iconSize = _ref23.iconSize, transparent = _ref23.transparent;
|
|
485
561
|
if (!(isActive && tag)) return null;
|
|
486
|
-
|
|
487
|
-
|
|
562
|
+
const width = iconSize;
|
|
563
|
+
const height = iconSize;
|
|
488
564
|
return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(SIcon, _ref8.cn("SIcon", {
|
|
489
565
|
"x": x,
|
|
490
566
|
"y": y,
|
|
@@ -494,16 +570,28 @@ function Icon(_ref23) {
|
|
|
494
570
|
"transparent": transparent
|
|
495
571
|
}));
|
|
496
572
|
}
|
|
497
|
-
function Label(
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
573
|
+
function Label({
|
|
574
|
+
Element: SLabel,
|
|
575
|
+
Children,
|
|
576
|
+
styles,
|
|
577
|
+
label,
|
|
578
|
+
color,
|
|
579
|
+
resolveColor,
|
|
580
|
+
isHorizontal,
|
|
581
|
+
x,
|
|
582
|
+
y,
|
|
583
|
+
textSize,
|
|
584
|
+
angle,
|
|
585
|
+
transparent
|
|
586
|
+
}) {
|
|
587
|
+
const lines = String(label).split("\n");
|
|
588
|
+
const linesCount = lines.length;
|
|
589
|
+
const SLabelLine = "tspan";
|
|
590
|
+
const angleDegs = (angle / Math.PI * 180).toFixed(2);
|
|
591
|
+
const transformOrigin = [x.toFixed(2), y.toFixed(2)];
|
|
592
|
+
const transform = `rotate(${[angleDegs, ...transformOrigin].join(", ")})`;
|
|
593
|
+
const sstyles = sstyled(styles);
|
|
594
|
+
const sLabelStyles = sstyles.cn("SLabel", {
|
|
507
595
|
"color": resolveColor(color),
|
|
508
596
|
"text-cursor": isHorizontal ? "text" : "vertical-text",
|
|
509
597
|
transparent
|
|
@@ -518,24 +606,32 @@ function Label(_ref24) {
|
|
|
518
606
|
x: x.toFixed(2),
|
|
519
607
|
y: y.toFixed(2),
|
|
520
608
|
transform
|
|
521
|
-
}, lines.map(
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
}, lineText);
|
|
527
|
-
}), /* @__PURE__ */ React.createElement(Children, null));
|
|
609
|
+
}, lines.map((lineText, lineIndex) => /* @__PURE__ */ React.createElement(SLabelLine, {
|
|
610
|
+
x,
|
|
611
|
+
y: y + (lineIndex - (linesCount - 1) / 2) * textSize,
|
|
612
|
+
key: `#${lineIndex}-${lineText}`
|
|
613
|
+
}, lineText)), /* @__PURE__ */ React.createElement(Children, null));
|
|
528
614
|
}
|
|
529
|
-
|
|
615
|
+
const Radian = createElement(RadialTreeRadian, {
|
|
530
616
|
InteractiveArea,
|
|
531
617
|
Line,
|
|
532
618
|
Cap,
|
|
533
619
|
Icon,
|
|
534
620
|
Label
|
|
535
621
|
});
|
|
536
|
-
function Title(
|
|
622
|
+
function Title({
|
|
623
|
+
Element: STitle,
|
|
624
|
+
Children,
|
|
625
|
+
children,
|
|
626
|
+
styles,
|
|
627
|
+
textSize,
|
|
628
|
+
color,
|
|
629
|
+
resolveColor,
|
|
630
|
+
x,
|
|
631
|
+
y,
|
|
632
|
+
dataHintsHandler
|
|
633
|
+
}) {
|
|
537
634
|
var _ref9;
|
|
538
|
-
var STitle = _ref25.Element, Children = _ref25.Children, children = _ref25.children, styles = _ref25.styles, textSize = _ref25.textSize, color = _ref25.color, resolveColor = _ref25.resolveColor, x = _ref25.x, y = _ref25.y, dataHintsHandler = _ref25.dataHintsHandler;
|
|
539
635
|
if (typeof children === "string") {
|
|
540
636
|
dataHintsHandler.setTitle("vertical", children);
|
|
541
637
|
}
|
|
@@ -550,7 +646,7 @@ function Title(_ref25) {
|
|
|
550
646
|
"y": y
|
|
551
647
|
}), /* @__PURE__ */ React.createElement(Children, _ref9.cn("Children", {})));
|
|
552
648
|
}
|
|
553
|
-
|
|
649
|
+
const RadialTree = createElement(RadialTreeBase, {
|
|
554
650
|
Title,
|
|
555
651
|
Radian
|
|
556
652
|
});
|