@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/cjs/Axis.js
CHANGED
|
@@ -1,61 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.YAxis = exports.XAxis = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
11
|
var _core = require("@semcore/core");
|
|
18
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
13
|
var _createElement = _interopRequireDefault(require("./createElement"));
|
|
20
14
|
var _utils = require("./utils");
|
|
21
15
|
/*!__reshadow-styles__:"./style/axis.shadow.css"*/
|
|
22
|
-
|
|
16
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SAxis_yb2p1_gg_{stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SAxis_yb2p1_gg_.__hide_yb2p1_gg_{display:none}.___STick_yb2p1_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79)}.___STick_yb2p1_gg_.__primaryText_yb2p1_gg_{fill:var(--intergalactic-text-primary, #191b23)}.___STick_yb2p1_gg_.__hide_yb2p1_gg_{display:none}.___SGrid_yb2p1_gg_{fill:transparent;stroke:var(--intergalactic-border-secondary, #e0e1e9)}.___STitle_yb2p1_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-text-hint, #6c6e79);transform-origin:var(--transform-origin_yb2p1)}.___STitle_yb2p1_gg_._position_top_yb2p1_gg_{text-anchor:middle}.___STitle_yb2p1_gg_._position_bottom_yb2p1_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_yb2p1_gg_._position_left_yb2p1_gg_,.___STitle_yb2p1_gg_._position_right_yb2p1_gg_{transform:rotate(-90deg);text-anchor:middle;dominant-baseline:middle}.___STitle_yb2p1_gg_._position_left_yb2p1_gg_.__verticalWritingMode_yb2p1_gg_,.___STitle_yb2p1_gg_._position_right_yb2p1_gg_.__verticalWritingMode_yb2p1_gg_{writing-mode:vertical-rl;transform:none}.___STick_yb2p1_gg_._position_top_yb2p1_gg_{transform:translateY(-12px);text-anchor:middle}.___STick_yb2p1_gg_._position_bottom_yb2p1_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_yb2p1_gg_._position_bottom_yb2p1_gg_ tspan{dominant-baseline:hanging}.___STick_yb2p1_gg_._position_right_yb2p1_gg_{transform:translateX(16px);text-anchor:start;dominant-baseline:middle}.___STick_yb2p1_gg_._position_left_yb2p1_gg_ tspan,.___STick_yb2p1_gg_._position_right_yb2p1_gg_ tspan{dominant-baseline:middle}.___STick_yb2p1_gg_._position_left_yb2p1_gg_.__multiline_yb2p1_gg_,.___STick_yb2p1_gg_._position_left_yb2p1_gg_.__multiline_yb2p1_gg_ tspan,.___STick_yb2p1_gg_._position_right_yb2p1_gg_.__multiline_yb2p1_gg_,.___STick_yb2p1_gg_._position_right_yb2p1_gg_.__multiline_yb2p1_gg_ tspan{dominant-baseline:auto}.___STick_yb2p1_gg_._position_left_yb2p1_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}.___STick_yb2p1_gg_._position_custom_0_yb2p1_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_yb2p1_gg_._position_custom_0_yb2p1_gg_ tspan{dominant-baseline:hanging}.___STick_yb2p1_gg_._position_custom_1_yb2p1_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}.___STick_yb2p1_gg_._position_custom_1_yb2p1_gg_ tspan{dominant-baseline:middle}", /*__inner_css_end__*/"yb2p1_gg_"),
|
|
23
17
|
/*__reshadow_css_end__*/
|
|
24
18
|
{
|
|
25
|
-
"__SAxis": "
|
|
26
|
-
"_hide": "
|
|
27
|
-
"__STick": "
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
19
|
+
"__SAxis": "___SAxis_yb2p1_gg_",
|
|
20
|
+
"_hide": "__hide_yb2p1_gg_",
|
|
21
|
+
"__STick": "___STick_yb2p1_gg_",
|
|
22
|
+
"_primaryText": "__primaryText_yb2p1_gg_",
|
|
23
|
+
"__SGrid": "___SGrid_yb2p1_gg_",
|
|
24
|
+
"__STitle": "___STitle_yb2p1_gg_",
|
|
25
|
+
"--transform-origin": "--transform-origin_yb2p1",
|
|
26
|
+
"_position_top": "_position_top_yb2p1_gg_",
|
|
27
|
+
"_position_bottom": "_position_bottom_yb2p1_gg_",
|
|
28
|
+
"_position_right": "_position_right_yb2p1_gg_",
|
|
29
|
+
"_position_left": "_position_left_yb2p1_gg_",
|
|
30
|
+
"_verticalWritingMode": "__verticalWritingMode_yb2p1_gg_",
|
|
31
|
+
"_multiline": "__multiline_yb2p1_gg_",
|
|
32
|
+
"_position_custom_0": "_position_custom_0_yb2p1_gg_",
|
|
33
|
+
"_position_custom_1": "_position_custom_1_yb2p1_gg_"
|
|
39
34
|
});
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
const CUSTOM_0 = Symbol('custom_0');
|
|
36
|
+
const CUSTOM_1 = Symbol('custom_1');
|
|
37
|
+
const MAP_INDEX_SCALE_SYMBOL = {
|
|
43
38
|
0: CUSTOM_0,
|
|
44
39
|
1: CUSTOM_1
|
|
45
40
|
};
|
|
46
|
-
|
|
41
|
+
const MAP_POSITION_REVERT = {
|
|
47
42
|
top: 'bottom',
|
|
48
43
|
right: 'left',
|
|
49
44
|
bottom: 'top',
|
|
50
45
|
left: 'right'
|
|
51
46
|
};
|
|
52
|
-
|
|
53
|
-
top:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
yScale = _ref6[1];
|
|
57
|
-
var xRange = xScale.range();
|
|
58
|
-
var yRange = yScale.range();
|
|
47
|
+
const MAP_POSITION_AXIS = {
|
|
48
|
+
top: ([xScale, yScale]) => {
|
|
49
|
+
const xRange = xScale.range();
|
|
50
|
+
const yRange = yScale.range();
|
|
59
51
|
return {
|
|
60
52
|
x1: xRange[0],
|
|
61
53
|
y1: yRange[1],
|
|
@@ -63,12 +55,9 @@ var MAP_POSITION_AXIS = (0, _defineProperty2["default"])((0, _defineProperty2["d
|
|
|
63
55
|
y2: yRange[1]
|
|
64
56
|
};
|
|
65
57
|
},
|
|
66
|
-
bottom:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
yScale = _ref8[1];
|
|
70
|
-
var xRange = xScale.range();
|
|
71
|
-
var yRange = yScale.range();
|
|
58
|
+
bottom: ([xScale, yScale]) => {
|
|
59
|
+
const xRange = xScale.range();
|
|
60
|
+
const yRange = yScale.range();
|
|
72
61
|
return {
|
|
73
62
|
x1: xRange[0],
|
|
74
63
|
y1: yRange[0],
|
|
@@ -76,12 +65,9 @@ var MAP_POSITION_AXIS = (0, _defineProperty2["default"])((0, _defineProperty2["d
|
|
|
76
65
|
y2: yRange[0]
|
|
77
66
|
};
|
|
78
67
|
},
|
|
79
|
-
right:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
yScale = _ref0[1];
|
|
83
|
-
var xRange = xScale.range();
|
|
84
|
-
var yRange = yScale.range();
|
|
68
|
+
right: ([xScale, yScale]) => {
|
|
69
|
+
const xRange = xScale.range();
|
|
70
|
+
const yRange = yScale.range();
|
|
85
71
|
return {
|
|
86
72
|
x1: xRange[1],
|
|
87
73
|
y1: yRange[0],
|
|
@@ -89,107 +75,81 @@ var MAP_POSITION_AXIS = (0, _defineProperty2["default"])((0, _defineProperty2["d
|
|
|
89
75
|
y2: yRange[1]
|
|
90
76
|
};
|
|
91
77
|
},
|
|
92
|
-
left:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
yScale = _ref10[1];
|
|
96
|
-
var xRange = xScale.range();
|
|
97
|
-
var yRange = yScale.range();
|
|
78
|
+
left: ([xScale, yScale]) => {
|
|
79
|
+
const xRange = xScale.range();
|
|
80
|
+
const yRange = yScale.range();
|
|
98
81
|
return {
|
|
99
82
|
x1: xRange[0],
|
|
100
83
|
y1: yRange[0],
|
|
101
84
|
x2: xRange[0],
|
|
102
85
|
y2: yRange[1]
|
|
103
86
|
};
|
|
87
|
+
},
|
|
88
|
+
[CUSTOM_0]: ([xScale, yScale], pos) => {
|
|
89
|
+
const xRange = xScale.range();
|
|
90
|
+
return {
|
|
91
|
+
x1: xRange[0],
|
|
92
|
+
y1: (0, _utils.scaleOfBandwidth)(yScale, pos),
|
|
93
|
+
x2: xRange[1],
|
|
94
|
+
y2: (0, _utils.scaleOfBandwidth)(yScale, pos)
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
[CUSTOM_1]: ([xScale, yScale], pos) => {
|
|
98
|
+
const yRange = yScale.range();
|
|
99
|
+
return {
|
|
100
|
+
x1: (0, _utils.scaleOfBandwidth)(xScale, pos),
|
|
101
|
+
y1: yRange[0],
|
|
102
|
+
x2: (0, _utils.scaleOfBandwidth)(xScale, pos),
|
|
103
|
+
y2: yRange[1]
|
|
104
|
+
};
|
|
104
105
|
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
var xRange = xScale.range();
|
|
110
|
-
return {
|
|
111
|
-
x1: xRange[0],
|
|
112
|
-
y1: (0, _utils.scaleOfBandwidth)(yScale, pos),
|
|
113
|
-
x2: xRange[1],
|
|
114
|
-
y2: (0, _utils.scaleOfBandwidth)(yScale, pos)
|
|
115
|
-
};
|
|
116
|
-
}), CUSTOM_1, function (_ref13, pos) {
|
|
117
|
-
var _ref14 = (0, _slicedToArray2["default"])(_ref13, 2),
|
|
118
|
-
xScale = _ref14[0],
|
|
119
|
-
yScale = _ref14[1];
|
|
120
|
-
var yRange = yScale.range();
|
|
121
|
-
return {
|
|
122
|
-
x1: (0, _utils.scaleOfBandwidth)(xScale, pos),
|
|
123
|
-
y1: yRange[0],
|
|
124
|
-
x2: (0, _utils.scaleOfBandwidth)(xScale, pos),
|
|
125
|
-
y2: yRange[1]
|
|
126
|
-
};
|
|
127
|
-
});
|
|
128
|
-
var MAP_POSITION_TICK = (0, _defineProperty2["default"])((0, _defineProperty2["default"])({
|
|
129
|
-
top: function top(_ref15, value) {
|
|
130
|
-
var _ref16 = (0, _slicedToArray2["default"])(_ref15, 2),
|
|
131
|
-
xScale = _ref16[0],
|
|
132
|
-
yScale = _ref16[1];
|
|
133
|
-
var yRange = yScale.range();
|
|
106
|
+
};
|
|
107
|
+
const MAP_POSITION_TICK = {
|
|
108
|
+
top: ([xScale, yScale], value) => {
|
|
109
|
+
const yRange = yScale.range();
|
|
134
110
|
return {
|
|
135
111
|
x: (0, _utils.scaleOfBandwidth)(xScale, value),
|
|
136
112
|
y: yRange[1]
|
|
137
113
|
};
|
|
138
114
|
},
|
|
139
|
-
bottom:
|
|
140
|
-
|
|
141
|
-
xScale = _ref18[0],
|
|
142
|
-
yScale = _ref18[1];
|
|
143
|
-
var yRange = yScale.range();
|
|
115
|
+
bottom: ([xScale, yScale], value) => {
|
|
116
|
+
const yRange = yScale.range();
|
|
144
117
|
return {
|
|
145
118
|
x: (0, _utils.scaleOfBandwidth)(xScale, value),
|
|
146
119
|
y: yRange[0]
|
|
147
120
|
};
|
|
148
121
|
},
|
|
149
|
-
right:
|
|
150
|
-
|
|
151
|
-
xScale = _ref20[0],
|
|
152
|
-
yScale = _ref20[1];
|
|
153
|
-
var xRange = xScale.range();
|
|
122
|
+
right: ([xScale, yScale], value) => {
|
|
123
|
+
const xRange = xScale.range();
|
|
154
124
|
return {
|
|
155
125
|
x: xRange[1],
|
|
156
126
|
y: (0, _utils.scaleOfBandwidth)(yScale, value)
|
|
157
127
|
};
|
|
158
128
|
},
|
|
159
|
-
left:
|
|
160
|
-
|
|
161
|
-
xScale = _ref22[0],
|
|
162
|
-
yScale = _ref22[1];
|
|
163
|
-
var xRange = xScale.range();
|
|
129
|
+
left: ([xScale, yScale], value) => {
|
|
130
|
+
const xRange = xScale.range();
|
|
164
131
|
return {
|
|
165
132
|
x: xRange[0],
|
|
166
133
|
y: (0, _utils.scaleOfBandwidth)(yScale, value)
|
|
167
134
|
};
|
|
135
|
+
},
|
|
136
|
+
[CUSTOM_0]: ([xScale, yScale], value, pos) => {
|
|
137
|
+
return {
|
|
138
|
+
x: (0, _utils.scaleOfBandwidth)(xScale, value),
|
|
139
|
+
y: (0, _utils.scaleOfBandwidth)(yScale, pos)
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
[CUSTOM_1]: ([xScale, yScale], value, pos) => {
|
|
143
|
+
return {
|
|
144
|
+
x: (0, _utils.scaleOfBandwidth)(xScale, pos),
|
|
145
|
+
y: (0, _utils.scaleOfBandwidth)(yScale, value)
|
|
146
|
+
};
|
|
168
147
|
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
x: (0, _utils.scaleOfBandwidth)(xScale, value),
|
|
175
|
-
y: (0, _utils.scaleOfBandwidth)(yScale, pos)
|
|
176
|
-
};
|
|
177
|
-
}), CUSTOM_1, function (_ref25, value, pos) {
|
|
178
|
-
var _ref26 = (0, _slicedToArray2["default"])(_ref25, 2),
|
|
179
|
-
xScale = _ref26[0],
|
|
180
|
-
yScale = _ref26[1];
|
|
181
|
-
return {
|
|
182
|
-
x: (0, _utils.scaleOfBandwidth)(xScale, pos),
|
|
183
|
-
y: (0, _utils.scaleOfBandwidth)(yScale, value)
|
|
184
|
-
};
|
|
185
|
-
});
|
|
186
|
-
var MAP_POSITION_GRID = {
|
|
187
|
-
0: function _(_ref27, value) {
|
|
188
|
-
var _ref28 = (0, _slicedToArray2["default"])(_ref27, 2),
|
|
189
|
-
xScale = _ref28[0],
|
|
190
|
-
yScale = _ref28[1];
|
|
191
|
-
var yRange = yScale.range();
|
|
192
|
-
var x = (0, _utils.scaleOfBandwidth)(xScale, value);
|
|
148
|
+
};
|
|
149
|
+
const MAP_POSITION_GRID = {
|
|
150
|
+
0: ([xScale, yScale], value) => {
|
|
151
|
+
const yRange = yScale.range();
|
|
152
|
+
const x = (0, _utils.scaleOfBandwidth)(xScale, value);
|
|
193
153
|
return {
|
|
194
154
|
x1: x,
|
|
195
155
|
y1: yRange[0],
|
|
@@ -197,12 +157,9 @@ var MAP_POSITION_GRID = {
|
|
|
197
157
|
y2: yRange[1]
|
|
198
158
|
};
|
|
199
159
|
},
|
|
200
|
-
1:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
yScale = _ref30[1];
|
|
204
|
-
var xRange = xScale.range();
|
|
205
|
-
var y = (0, _utils.scaleOfBandwidth)(yScale, value);
|
|
160
|
+
1: ([xScale, yScale], value) => {
|
|
161
|
+
const xRange = xScale.range();
|
|
162
|
+
const y = (0, _utils.scaleOfBandwidth)(yScale, value);
|
|
206
163
|
return {
|
|
207
164
|
x1: xRange[0],
|
|
208
165
|
y1: y,
|
|
@@ -211,43 +168,31 @@ var MAP_POSITION_GRID = {
|
|
|
211
168
|
};
|
|
212
169
|
}
|
|
213
170
|
};
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
top:
|
|
217
|
-
|
|
218
|
-
xScale = _ref32[0];
|
|
219
|
-
var xRange = xScale.range();
|
|
171
|
+
const OFFSET_TITLE = 10;
|
|
172
|
+
const MAP_POSITION_TITlE = {
|
|
173
|
+
top: ([xScale]) => {
|
|
174
|
+
const xRange = xScale.range();
|
|
220
175
|
return {
|
|
221
176
|
x: (xRange[1] + xRange[0]) / 2,
|
|
222
177
|
y: OFFSET_TITLE
|
|
223
178
|
};
|
|
224
179
|
},
|
|
225
|
-
bottom:
|
|
226
|
-
|
|
227
|
-
xScale = _ref35[0];
|
|
228
|
-
var _ref36 = (0, _slicedToArray2["default"])(_ref34, 2),
|
|
229
|
-
height = _ref36[1];
|
|
230
|
-
var xRange = xScale.range();
|
|
180
|
+
bottom: ([xScale], [, height]) => {
|
|
181
|
+
const xRange = xScale.range();
|
|
231
182
|
return {
|
|
232
183
|
x: (xRange[1] + xRange[0]) / 2,
|
|
233
184
|
y: height - OFFSET_TITLE
|
|
234
185
|
};
|
|
235
186
|
},
|
|
236
|
-
right:
|
|
237
|
-
|
|
238
|
-
yScale = _ref39[1];
|
|
239
|
-
var _ref40 = (0, _slicedToArray2["default"])(_ref38, 1),
|
|
240
|
-
width = _ref40[0];
|
|
241
|
-
var yRange = yScale.range();
|
|
187
|
+
right: ([, yScale], [width]) => {
|
|
188
|
+
const yRange = yScale.range();
|
|
242
189
|
return {
|
|
243
190
|
x: width - OFFSET_TITLE,
|
|
244
191
|
y: (yRange[0] + yRange[1]) / 2
|
|
245
192
|
};
|
|
246
193
|
},
|
|
247
|
-
left:
|
|
248
|
-
|
|
249
|
-
yScale = _ref42[1];
|
|
250
|
-
var yRange = yScale.range();
|
|
194
|
+
left: ([, yScale]) => {
|
|
195
|
+
const yRange = yScale.range();
|
|
251
196
|
return {
|
|
252
197
|
x: OFFSET_TITLE,
|
|
253
198
|
y: (yRange[0] + yRange[1]) / 2
|
|
@@ -262,15 +207,13 @@ function renderValue(value) {
|
|
|
262
207
|
}
|
|
263
208
|
function splitTextByWidth(root, text, maxWidth) {
|
|
264
209
|
if (!text || !maxWidth || maxWidth <= 0) return [];
|
|
265
|
-
|
|
266
|
-
return word.length > 0;
|
|
267
|
-
});
|
|
210
|
+
const words = text.split(/\s+/).filter(word => word.length > 0);
|
|
268
211
|
if (words.length === 0) return [];
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
for (
|
|
272
|
-
|
|
273
|
-
|
|
212
|
+
const lines = [];
|
|
213
|
+
let currentLine = words[0];
|
|
214
|
+
for (let i = 1; i < words.length; i++) {
|
|
215
|
+
const testLine = `${currentLine} ${words[i]}`.trim();
|
|
216
|
+
const testWidth = measureTextWidth(root, testLine);
|
|
274
217
|
if (testWidth <= maxWidth) {
|
|
275
218
|
currentLine = testLine;
|
|
276
219
|
} else {
|
|
@@ -289,126 +232,109 @@ function splitTextByWidth(root, text, maxWidth) {
|
|
|
289
232
|
}
|
|
290
233
|
return lines;
|
|
291
234
|
}
|
|
292
|
-
function measureTextWidth(rootRef, text) {
|
|
293
|
-
|
|
294
|
-
var textEl = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
235
|
+
function measureTextWidth(rootRef, text, fontSize = 12) {
|
|
236
|
+
const textEl = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
295
237
|
textEl.setAttribute('font-size', fontSize);
|
|
296
238
|
textEl.setAttribute('visibility', 'hidden');
|
|
297
239
|
textEl.textContent = text;
|
|
298
240
|
rootRef.appendChild(textEl);
|
|
299
|
-
|
|
241
|
+
const width = textEl.getComputedTextLength();
|
|
300
242
|
rootRef.removeChild(textEl);
|
|
301
243
|
return width;
|
|
302
244
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
245
|
+
class AxisRoot extends _core.Component {
|
|
246
|
+
get ticks() {
|
|
247
|
+
const {
|
|
248
|
+
ticks,
|
|
249
|
+
indexScale,
|
|
250
|
+
scale
|
|
251
|
+
} = this.asProps;
|
|
252
|
+
const scl = scale[indexScale];
|
|
253
|
+
return ticks || scl.ticks?.() || scl.domain?.() || [];
|
|
307
254
|
}
|
|
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
|
-
position = _this$asProps4.position,
|
|
360
|
-
scale = _this$asProps4.scale,
|
|
361
|
-
hide = _this$asProps4.hide,
|
|
362
|
-
indexScale = _this$asProps4.indexScale;
|
|
363
|
-
var pos = (_MAP_POSITION_AXIS$po = MAP_POSITION_AXIS[position]) !== null && _MAP_POSITION_AXIS$po !== void 0 ? _MAP_POSITION_AXIS$po : MAP_POSITION_AXIS[MAP_INDEX_SCALE_SYMBOL[indexScale]];
|
|
364
|
-
return _ref = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SAxis, _ref.cn("SAxis", (0, _objectSpread2["default"])({
|
|
365
|
-
"render": 'line',
|
|
366
|
-
"hide": hide
|
|
367
|
-
}, pos(scale, position))));
|
|
368
|
-
}
|
|
369
|
-
}]);
|
|
370
|
-
}(_core.Component);
|
|
371
|
-
(0, _defineProperty2["default"])(AxisRoot, "displayName", 'Axis');
|
|
372
|
-
(0, _defineProperty2["default"])(AxisRoot, "style", style);
|
|
373
|
-
(0, _defineProperty2["default"])(AxisRoot, "defaultProps", {});
|
|
255
|
+
getTitleProps() {
|
|
256
|
+
const {
|
|
257
|
+
position,
|
|
258
|
+
locale
|
|
259
|
+
} = this.asProps;
|
|
260
|
+
return {
|
|
261
|
+
position: MAP_POSITION_REVERT[position],
|
|
262
|
+
verticalWritingMode: ['zh', 'ja'].includes(locale)
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
getTicksProps() {
|
|
266
|
+
const {
|
|
267
|
+
position,
|
|
268
|
+
indexScale
|
|
269
|
+
} = this.asProps;
|
|
270
|
+
return {
|
|
271
|
+
ticks: this.ticks,
|
|
272
|
+
indexScale,
|
|
273
|
+
position
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
getGridProps() {
|
|
277
|
+
const {
|
|
278
|
+
indexScale
|
|
279
|
+
} = this.asProps;
|
|
280
|
+
return {
|
|
281
|
+
ticks: this.ticks,
|
|
282
|
+
indexScale
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
render() {
|
|
286
|
+
var _ref;
|
|
287
|
+
const SAxis = this.Element;
|
|
288
|
+
const {
|
|
289
|
+
styles,
|
|
290
|
+
position,
|
|
291
|
+
scale,
|
|
292
|
+
hide,
|
|
293
|
+
indexScale
|
|
294
|
+
} = this.asProps;
|
|
295
|
+
const pos = MAP_POSITION_AXIS[position] ?? MAP_POSITION_AXIS[MAP_INDEX_SCALE_SYMBOL[indexScale]];
|
|
296
|
+
return _ref = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(SAxis, _ref.cn("SAxis", {
|
|
297
|
+
"render": 'line',
|
|
298
|
+
"hide": hide,
|
|
299
|
+
...pos(scale, position)
|
|
300
|
+
}));
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
(0, _defineProperty2.default)(AxisRoot, "displayName", 'Axis');
|
|
304
|
+
(0, _defineProperty2.default)(AxisRoot, "style", style);
|
|
305
|
+
(0, _defineProperty2.default)(AxisRoot, "defaultProps", {});
|
|
374
306
|
function Ticks(props) {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
styles
|
|
378
|
-
scale
|
|
379
|
-
ticks
|
|
380
|
-
position
|
|
381
|
-
hide
|
|
382
|
-
indexScale
|
|
383
|
-
dataHintsHandler
|
|
384
|
-
children
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
rootRefElement = _useState2[0],
|
|
392
|
-
setRootRefElement = _useState2[1];
|
|
393
|
-
(0, _react.useEffect)(function () {
|
|
307
|
+
const {
|
|
308
|
+
Element: STick,
|
|
309
|
+
styles,
|
|
310
|
+
scale,
|
|
311
|
+
ticks,
|
|
312
|
+
position,
|
|
313
|
+
hide,
|
|
314
|
+
indexScale,
|
|
315
|
+
dataHintsHandler,
|
|
316
|
+
children,
|
|
317
|
+
childrenPosition = 'inside',
|
|
318
|
+
rootRef,
|
|
319
|
+
multiline
|
|
320
|
+
} = props;
|
|
321
|
+
const [rootRefElement, setRootRefElement] = (0, _react.useState)(null);
|
|
322
|
+
(0, _react.useEffect)(() => {
|
|
394
323
|
if (rootRef.current) setRootRefElement(rootRef.current);
|
|
395
324
|
}, []);
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
}
|
|
403
|
-
var pos = (_MAP_POSITION_TICK$po = MAP_POSITION_TICK[position]) !== null && _MAP_POSITION_TICK$po !== void 0 ? _MAP_POSITION_TICK$po : MAP_POSITION_TICK[MAP_INDEX_SCALE_SYMBOL[indexScale]];
|
|
404
|
-
var positionClass = MAP_POSITION_TICK[position] ? position : "custom_".concat(indexScale);
|
|
325
|
+
const tickBandwidth = scale[indexScale]?.bandwidth?.();
|
|
326
|
+
const ticksWithLines = ticks.map(tick => ({
|
|
327
|
+
tick,
|
|
328
|
+
lines: typeof tick === 'string' && multiline && rootRefElement ? splitTextByWidth(rootRefElement, tick, tickBandwidth) : []
|
|
329
|
+
}));
|
|
330
|
+
const pos = MAP_POSITION_TICK[position] ?? MAP_POSITION_TICK[MAP_INDEX_SCALE_SYMBOL[indexScale]];
|
|
331
|
+
const positionClass = MAP_POSITION_TICK[position] ? position : `custom_${indexScale}`;
|
|
405
332
|
if (typeof children === 'function') {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
value: value
|
|
333
|
+
const labelGetter = value => {
|
|
334
|
+
const result = children({
|
|
335
|
+
value
|
|
410
336
|
});
|
|
411
|
-
return
|
|
337
|
+
return result.value ?? result.children;
|
|
412
338
|
};
|
|
413
339
|
if (position === 'left' || position === 'right') {
|
|
414
340
|
dataHintsHandler.addKeyLabelGetter('vertical', labelGetter);
|
|
@@ -416,12 +342,13 @@ function Ticks(props) {
|
|
|
416
342
|
dataHintsHandler.addKeyLabelGetter('horizontal', labelGetter);
|
|
417
343
|
}
|
|
418
344
|
}
|
|
419
|
-
return ticksWithLines.map(
|
|
345
|
+
return ticksWithLines.map(({
|
|
346
|
+
tick: value,
|
|
347
|
+
lines
|
|
348
|
+
}, i) => {
|
|
420
349
|
var _ref2;
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
var displayValue = typeof children === 'function' ? undefined : renderValue(value);
|
|
424
|
-
return _ref2 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(STick, _ref2.cn("STick", (0, _objectSpread2["default"])({
|
|
350
|
+
const displayValue = typeof children === 'function' ? undefined : renderValue(value);
|
|
351
|
+
return _ref2 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(STick, _ref2.cn("STick", {
|
|
425
352
|
"aria-hidden": true,
|
|
426
353
|
"key": i,
|
|
427
354
|
"render": 'text',
|
|
@@ -431,22 +358,24 @@ function Ticks(props) {
|
|
|
431
358
|
"index": i,
|
|
432
359
|
"position": positionClass,
|
|
433
360
|
"hide": hide,
|
|
434
|
-
"multiline": multiline
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}) : displayValue);
|
|
361
|
+
"multiline": multiline,
|
|
362
|
+
"primaryText": props.primaryText,
|
|
363
|
+
...pos(scale, value, position)
|
|
364
|
+
}), lines.length > 1 ? lines.map((line, lineIndex) => /*#__PURE__*/_react.default.createElement("tspan", (0, _extends2.default)({
|
|
365
|
+
key: line
|
|
366
|
+
}, pos(scale, value, position), {
|
|
367
|
+
dy: lineIndex * 15
|
|
368
|
+
}), line)) : displayValue);
|
|
442
369
|
});
|
|
443
370
|
}
|
|
444
371
|
function Grid(props) {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
372
|
+
const {
|
|
373
|
+
Element: SGrid,
|
|
374
|
+
styles,
|
|
375
|
+
scale,
|
|
376
|
+
ticks,
|
|
377
|
+
indexScale
|
|
378
|
+
} = props;
|
|
450
379
|
if (ticks.length >= 2) {
|
|
451
380
|
if (indexScale === 1) {
|
|
452
381
|
props.dataHintsHandler.setupGrid('vertical', Math.abs(ticks[1] - ticks[0]));
|
|
@@ -454,36 +383,40 @@ function Grid(props) {
|
|
|
454
383
|
props.dataHintsHandler.setupGrid('horizontal', Math.abs(ticks[1] - ticks[0]));
|
|
455
384
|
}
|
|
456
385
|
}
|
|
457
|
-
return ticks.map(
|
|
386
|
+
return ticks.map((value, i) => {
|
|
458
387
|
var _ref3;
|
|
459
|
-
return _ref3 = (0, _core.sstyled)(styles), /*#__PURE__*/_react
|
|
388
|
+
return _ref3 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(SGrid, _ref3.cn("SGrid", {
|
|
460
389
|
"key": i,
|
|
461
|
-
"render": 'line'
|
|
462
|
-
|
|
390
|
+
"render": 'line',
|
|
391
|
+
...MAP_POSITION_GRID[indexScale](scale, value)
|
|
392
|
+
}));
|
|
463
393
|
});
|
|
464
394
|
}
|
|
465
395
|
function Title(props) {
|
|
466
396
|
var _ref4;
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
397
|
+
const {
|
|
398
|
+
Element: STitle,
|
|
399
|
+
styles,
|
|
400
|
+
scale,
|
|
401
|
+
position,
|
|
402
|
+
size,
|
|
403
|
+
children,
|
|
404
|
+
verticalWritingMode
|
|
405
|
+
} = props;
|
|
406
|
+
const {
|
|
407
|
+
x,
|
|
408
|
+
y
|
|
409
|
+
} = MAP_POSITION_TITlE[position](scale, size);
|
|
477
410
|
if (position === 'left' || position === 'right') {
|
|
478
411
|
props.dataHintsHandler.setTitle('vertical', children);
|
|
479
412
|
} else if (position === 'top' || position === 'bottom') {
|
|
480
413
|
props.dataHintsHandler.setTitle('horizontal', children);
|
|
481
414
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
'transform-origin':
|
|
415
|
+
const sstyles = (0, _core.sstyled)(styles);
|
|
416
|
+
const sTitleStyles = sstyles.cn('STitle', {
|
|
417
|
+
'transform-origin': `${x.toFixed(2)}px ${y.toFixed(2)}px`
|
|
485
418
|
});
|
|
486
|
-
return _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/_react
|
|
419
|
+
return _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(STitle, _ref4.cn("STitle", {
|
|
487
420
|
"aria-hidden": true,
|
|
488
421
|
"render": 'text',
|
|
489
422
|
"childrenPosition": 'inside',
|
|
@@ -495,39 +428,27 @@ function Title(props) {
|
|
|
495
428
|
"y": y
|
|
496
429
|
}));
|
|
497
430
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
return (0, _callSuper2["default"])(this, XAxisRoot, arguments);
|
|
502
|
-
}
|
|
503
|
-
(0, _inherits2["default"])(XAxisRoot, _AxisRoot2);
|
|
504
|
-
return (0, _createClass2["default"])(XAxisRoot);
|
|
505
|
-
}(AxisRoot);
|
|
506
|
-
(0, _defineProperty2["default"])(XAxisRoot, "defaultProps", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, AxisRoot.defaultProps), {}, {
|
|
431
|
+
class XAxisRoot extends AxisRoot {}
|
|
432
|
+
(0, _defineProperty2.default)(XAxisRoot, "defaultProps", {
|
|
433
|
+
...AxisRoot.defaultProps,
|
|
507
434
|
indexScale: 0,
|
|
508
435
|
position: 'bottom'
|
|
509
|
-
}));
|
|
510
|
-
var XAxis = exports.XAxis = (0, _createElement["default"])(XAxisRoot, {
|
|
511
|
-
Ticks: Ticks,
|
|
512
|
-
Grid: Grid,
|
|
513
|
-
Title: Title
|
|
514
436
|
});
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
(0, _defineProperty2["default"])(YAxisRoot, "defaultProps", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, AxisRoot.defaultProps), {}, {
|
|
437
|
+
const XAxis = exports.XAxis = (0, _createElement.default)(XAxisRoot, {
|
|
438
|
+
Ticks,
|
|
439
|
+
Grid,
|
|
440
|
+
Title
|
|
441
|
+
});
|
|
442
|
+
class YAxisRoot extends AxisRoot {}
|
|
443
|
+
(0, _defineProperty2.default)(YAxisRoot, "defaultProps", {
|
|
444
|
+
...AxisRoot.defaultProps,
|
|
524
445
|
indexScale: 1,
|
|
525
446
|
position: 'left',
|
|
526
447
|
hide: true
|
|
527
|
-
})
|
|
528
|
-
|
|
529
|
-
Ticks
|
|
530
|
-
Grid
|
|
531
|
-
Title
|
|
448
|
+
});
|
|
449
|
+
const YAxis = exports.YAxis = (0, _createElement.default)(YAxisRoot, {
|
|
450
|
+
Ticks,
|
|
451
|
+
Grid,
|
|
452
|
+
Title
|
|
532
453
|
});
|
|
533
454
|
//# sourceMappingURL=Axis.js.map
|