@semcore/d3-chart 18.0.0-prerelease.1 → 18.0.0-prerelease.5
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 +52 -1
- package/README.md +0 -1
- package/lib/cjs/Area.js +123 -23
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +109 -97
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +16 -16
- package/lib/cjs/Bubble.js +14 -14
- package/lib/cjs/ChartMetaData.js +44 -0
- package/lib/cjs/ChartMetaData.js.map +1 -0
- package/lib/cjs/CompactHorizontalBar.js +17 -17
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +18 -19
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +67 -13
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +5 -2
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +16 -16
- package/lib/cjs/Hover.js +55 -52
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +82 -17
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Pattern.js +113 -2
- package/lib/cjs/Pattern.js.map +1 -1
- package/lib/cjs/Plot.js +5 -2
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +19 -19
- package/lib/cjs/RadialTree.js +12 -12
- package/lib/cjs/Reference.js +55 -18
- package/lib/cjs/Reference.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +9 -9
- package/lib/cjs/Tooltip.js +16 -14
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +9 -9
- package/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/lib/cjs/component/Chart/AbstractChart.js +29 -23
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.type.js +19 -0
- package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.js +21 -7
- 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 +17 -8
- 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 +4 -0
- 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 +5 -1
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.js +0 -1
- 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 +6 -3
- 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 +16 -6
- 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.type.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/index.js +43 -0
- package/lib/cjs/component/Chart/index.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +0 -4
- package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/lib/cjs/component/ChartLegend/LegendFlex/legend-flex.shadow.css +2 -2
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +19 -17
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/legend-item.shadow.css +11 -11
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +28 -21
- 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/LegendTable/legend-table.shadow.css +31 -15
- package/lib/cjs/component/Cigarette/Cigarette.js +0 -1
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/component/Metric/Metric.js +78 -0
- package/lib/cjs/component/Metric/Metric.js.map +1 -0
- package/lib/cjs/component/Metric/Metric.type.js +2 -0
- package/lib/cjs/component/Metric/Metric.type.js.map +1 -0
- package/lib/cjs/index.js +62 -8
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/abstract-chart.shadow.css +13 -3
- package/lib/cjs/style/area.shadow.css +8 -7
- package/lib/cjs/style/axis.shadow.css +51 -60
- package/lib/cjs/style/bar.shadow.css +7 -9
- package/lib/cjs/style/bubble.shadow.css +4 -6
- package/lib/cjs/style/donut.shadow.css +3 -5
- package/lib/cjs/style/dot.shadow.css +37 -4
- package/lib/cjs/style/hover.shadow.css +30 -13
- package/lib/cjs/style/line.shadow.css +3 -5
- package/lib/cjs/style/pattern.shadow.css +10 -0
- package/lib/cjs/style/plotA11yView.shadow.css +3 -3
- package/lib/cjs/style/radar.shadow.css +7 -7
- package/lib/cjs/style/radial-tree.shadow.css +3 -5
- package/lib/cjs/style/reference.shadow.css +5 -5
- package/lib/cjs/style/scatterplot.shadow.css +2 -4
- package/lib/cjs/style/tooltip.shadow.css +12 -14
- package/lib/cjs/style/venn.shadow.css +0 -2
- package/lib/cjs/types/Axis.d.js.map +1 -1
- package/lib/cjs/types/Donut.d.js.map +1 -1
- package/lib/cjs/types/Hover.d.js.map +1 -1
- package/lib/cjs/types/index.d.js +20 -0
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js +21 -1
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/Area.js +125 -25
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +109 -97
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +16 -16
- package/lib/es6/Bubble.js +14 -14
- package/lib/es6/ChartMetaData.js +36 -0
- package/lib/es6/ChartMetaData.js.map +1 -0
- package/lib/es6/CompactHorizontalBar.js +17 -17
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +18 -19
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +68 -14
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +5 -2
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +16 -16
- package/lib/es6/Hover.js +55 -52
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +84 -19
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Pattern.js +108 -2
- package/lib/es6/Pattern.js.map +1 -1
- package/lib/es6/Plot.js +5 -2
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +19 -19
- package/lib/es6/RadialTree.js +12 -12
- package/lib/es6/Reference.js +55 -18
- package/lib/es6/Reference.js.map +1 -1
- package/lib/es6/ScatterPlot.js +9 -9
- package/lib/es6/Tooltip.js +16 -14
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +9 -9
- package/lib/es6/a11y/PlotA11yView.js +2 -2
- package/lib/es6/component/Chart/AbstractChart.js +29 -23
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.type.js +14 -1
- package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.js +21 -7
- 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 +17 -8
- 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 +4 -0
- 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 +5 -1
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.js +0 -1
- 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 +6 -3
- 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 +14 -4
- 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.type.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
- package/lib/es6/component/Chart/index.js +2 -0
- package/lib/es6/component/Chart/index.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +0 -4
- package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/lib/es6/component/ChartLegend/LegendFlex/legend-flex.shadow.css +2 -2
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +19 -17
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/legend-item.shadow.css +11 -11
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +28 -21
- 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/ChartLegend/LegendTable/legend-table.shadow.css +31 -15
- package/lib/es6/component/Cigarette/Cigarette.js +0 -1
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/component/Metric/Metric.js +72 -0
- package/lib/es6/component/Metric/Metric.js.map +1 -0
- package/lib/es6/component/Metric/Metric.type.js +2 -0
- package/lib/es6/component/Metric/Metric.type.js.map +1 -0
- package/lib/es6/index.js +2 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/abstract-chart.shadow.css +13 -3
- package/lib/es6/style/area.shadow.css +8 -7
- package/lib/es6/style/axis.shadow.css +51 -60
- package/lib/es6/style/bar.shadow.css +7 -9
- package/lib/es6/style/bubble.shadow.css +4 -6
- package/lib/es6/style/donut.shadow.css +3 -5
- package/lib/es6/style/dot.shadow.css +37 -4
- package/lib/es6/style/hover.shadow.css +30 -13
- package/lib/es6/style/line.shadow.css +3 -5
- package/lib/es6/style/pattern.shadow.css +10 -0
- package/lib/es6/style/plotA11yView.shadow.css +3 -3
- package/lib/es6/style/radar.shadow.css +7 -7
- package/lib/es6/style/radial-tree.shadow.css +3 -5
- package/lib/es6/style/reference.shadow.css +5 -5
- package/lib/es6/style/scatterplot.shadow.css +2 -4
- package/lib/es6/style/tooltip.shadow.css +12 -14
- package/lib/es6/style/venn.shadow.css +0 -2
- package/lib/es6/types/Axis.d.js.map +1 -1
- package/lib/es6/types/Donut.d.js.map +1 -1
- package/lib/es6/types/Hover.d.js.map +1 -1
- package/lib/es6/types/index.d.js +5 -7
- package/lib/es6/types/index.d.js.map +1 -1
- package/lib/es6/utils.js +18 -0
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/Area.mjs +127 -26
- package/lib/esm/Axis.mjs +110 -98
- package/lib/esm/Bar.mjs +17 -17
- package/lib/esm/Bubble.mjs +15 -15
- package/lib/esm/ChartMetaData.mjs +38 -0
- package/lib/esm/CompactHorizontalBar.mjs +18 -18
- package/lib/esm/Donut.mjs +19 -20
- package/lib/esm/Dots.mjs +66 -15
- package/lib/esm/GroupBar.mjs +5 -2
- package/lib/esm/HorizontalBar.mjs +17 -17
- package/lib/esm/Hover.mjs +56 -53
- package/lib/esm/Line.mjs +86 -20
- package/lib/esm/Pattern.mjs +119 -0
- package/lib/esm/Plot.mjs +6 -3
- package/lib/esm/Radar.mjs +20 -20
- package/lib/esm/RadialTree.mjs +13 -13
- package/lib/esm/Reference.mjs +56 -19
- package/lib/esm/ScatterPlot.mjs +10 -10
- package/lib/esm/Tooltip.mjs +17 -15
- package/lib/esm/Venn.mjs +10 -10
- package/lib/esm/a11y/PlotA11yView.mjs +3 -3
- package/lib/esm/component/Chart/AbstractChart.mjs +28 -24
- package/lib/esm/component/Chart/AbstractChart.type.mjs +16 -0
- package/lib/esm/component/Chart/AreaChart.mjs +21 -7
- package/lib/esm/component/Chart/BarChart.mjs +17 -8
- package/lib/esm/component/Chart/BubbleChart.mjs +4 -0
- package/lib/esm/component/Chart/CigaretteChart.mjs +5 -1
- package/lib/esm/component/Chart/DonutChart.mjs +0 -1
- package/lib/esm/component/Chart/HistogramChart.mjs +6 -3
- package/lib/esm/component/Chart/LineChart.mjs +14 -4
- package/lib/esm/component/Chart/index.mjs +8 -0
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +0 -4
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +5 -5
- package/lib/esm/component/ChartLegend/LegendFlex/legend-flex.shadow.css +2 -2
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +20 -18
- package/lib/esm/component/ChartLegend/LegendItem/legend-item.shadow.css +11 -11
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +29 -22
- package/lib/esm/component/ChartLegend/LegendTable/legend-table.shadow.css +31 -15
- package/lib/esm/component/Cigarette/Cigarette.mjs +0 -1
- package/lib/esm/component/Metric/Metric.mjs +62 -0
- package/lib/esm/index.mjs +42 -34
- package/lib/esm/style/abstract-chart.shadow.css +13 -3
- package/lib/esm/style/area.shadow.css +8 -7
- package/lib/esm/style/axis.shadow.css +51 -60
- package/lib/esm/style/bar.shadow.css +7 -9
- package/lib/esm/style/bubble.shadow.css +4 -6
- package/lib/esm/style/donut.shadow.css +3 -5
- package/lib/esm/style/dot.shadow.css +37 -4
- package/lib/esm/style/hover.shadow.css +30 -13
- package/lib/esm/style/line.shadow.css +3 -5
- package/lib/esm/style/pattern.shadow.css +10 -0
- package/lib/esm/style/plotA11yView.shadow.css +3 -3
- package/lib/esm/style/radar.shadow.css +7 -7
- package/lib/esm/style/radial-tree.shadow.css +3 -5
- package/lib/esm/style/reference.shadow.css +5 -5
- package/lib/esm/style/scatterplot.shadow.css +2 -4
- package/lib/esm/style/tooltip.shadow.css +12 -14
- package/lib/esm/style/venn.shadow.css +0 -2
- package/lib/esm/utils.mjs +20 -0
- package/lib/types/Axis.d.ts +3 -2
- package/lib/types/ChartMetaData.d.ts +17 -0
- package/lib/types/ChartMetaData.d.ts.map +1 -0
- package/lib/types/Donut.d.ts +1 -1
- package/lib/types/Hover.d.ts +2 -0
- package/lib/types/Pattern.d.ts +18 -0
- package/lib/types/Pattern.d.ts.map +1 -1
- package/lib/types/component/Chart/AbstractChart.d.ts +8 -4
- package/lib/types/component/Chart/AbstractChart.d.ts.map +1 -1
- package/lib/types/component/Chart/AbstractChart.type.d.ts +28 -8
- package/lib/types/component/Chart/AbstractChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/AreaChart.d.ts.map +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +8 -4
- package/lib/types/component/Chart/AreaChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/BarChart.d.ts.map +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +3 -0
- package/lib/types/component/Chart/BarChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/BubbleChart.d.ts.map +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/CigaretteChart.d.ts.map +1 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +1 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/DonutChart.d.ts.map +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +1 -2
- package/lib/types/component/Chart/DonutChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/HistogramChart.d.ts.map +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -0
- package/lib/types/component/Chart/HistogramChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/LineChart.d.ts.map +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +1 -0
- package/lib/types/component/Chart/LineChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/index.d.ts +2 -0
- package/lib/types/component/Chart/index.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +5 -3
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts.map +1 -1
- package/lib/types/component/Metric/Metric.d.ts +9 -0
- package/lib/types/component/Metric/Metric.d.ts.map +1 -0
- package/lib/types/component/Metric/Metric.type.d.ts +33 -0
- package/lib/types/component/Metric/Metric.type.d.ts.map +1 -0
- package/lib/types/index.d.ts +5 -7
- package/lib/types/utils.d.ts +4 -1
- package/lib/types/utils.d.ts.map +1 -1
- package/package.json +16 -15
- package/lib/cjs/color.js +0 -132
- package/lib/cjs/color.js.map +0 -1
- package/lib/cjs/style/var.css +0 -125
- package/lib/es6/color.js +0 -127
- package/lib/es6/color.js.map +0 -1
- package/lib/es6/style/var.css +0 -125
- package/lib/esm/color.mjs +0 -127
- package/lib/esm/utils/TextMeasurer.mjs +0 -27
package/lib/esm/Tooltip.mjs
CHANGED
|
@@ -12,22 +12,22 @@ const style = (
|
|
|
12
12
|
/*__reshadow_css_start__*/
|
|
13
13
|
(sstyled.insert(
|
|
14
14
|
/*__inner_css_start__*/
|
|
15
|
-
'.
|
|
15
|
+
'.___STooltip_1bv2y_gg_{font-size:var(--intergalactic-fs-100,12px);line-height:var(--intergalactic-lh-100,1.3334);font-feature-settings:"tnum";font-variant-numeric:tabular-nums;position:relative;color:var(--intergalactic-text-primary-invert,oklch(.991 .005 232.5/.959));background-color:var(--intergalactic-tooltip-bg-invert,oklch(.23 .009 245));border-radius:var(--intergalactic-popper-rounded,6px);border:1px solid var(--intergalactic-tooltip-border-invert,oklch(.4 .015 245));box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 oklch(.324 .077 242.1/.079));padding:var(--intergalactic-spacing-3x,12px)}.___STitle_1bv2y_gg_{color:var(--intergalactic-text-secondary-invert,#e1f2ffb9);margin-bottom:var(--intergalactic-spacing-2x,8px)}@media (color-gamut:p3){.___STitle_1bv2y_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___SDotGroup_1bv2y_gg_{display:flex;align-items:center}.___SDot_1bv2y_gg_{margin-right:var(--intergalactic-spacing-2x,8px)}.___SDotCircle_1bv2y_gg_.__color_1bv2y_gg_.__lightness_1bv2y_gg_{background-color:var(--color_1bv2y);width:10px;height:10px;border-radius:50%;box-shadow:0 0 0 1px oklch(from var(--color_1bv2y) calc(l + var(--lightness_1bv2y)) c h)}.___SFooter_1bv2y_gg_{background:var(--intergalactic-bg-secondary-invert,oklch(.907 .048 245.2/.129));color:var(--intergalactic-text-secondary-invert,#e1f2ffb9);padding:var(--intergalactic-spacing-1x,4px) var(--intergalactic-spacing-3x,12px);border-radius:0 0 var(--intergalactic-rounded-medium,6px) var(--intergalactic-rounded-medium,6px);margin:var(--intergalactic-spacing-3x,12px) calc(var(--intergalactic-spacing-3x, 12px)*-1) calc(var(--intergalactic-spacing-3x, 12px)*-1)}@media (color-gamut:p3){.___SFooter_1bv2y_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___SDotPattern_1bv2y_gg_{stroke-width:1px;stroke:oklch(from var(--intergalactic-chart-grid-border,#fff) l c h/.5)}',
|
|
16
16
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
17
|
+
"1bv2y_gg_"
|
|
18
18
|
), /*__reshadow_css_end__*/
|
|
19
19
|
{
|
|
20
|
-
"__STooltip": "
|
|
21
|
-
"__STitle": "
|
|
22
|
-
"__SDotGroup": "
|
|
23
|
-
"__SDot": "
|
|
24
|
-
"__SDotCircle": "
|
|
25
|
-
"_color": "
|
|
26
|
-
"_lightness": "
|
|
27
|
-
"--color": "--
|
|
28
|
-
"--lightness": "--
|
|
29
|
-
"__SFooter": "
|
|
30
|
-
"__SDotPattern": "
|
|
20
|
+
"__STooltip": "___STooltip_1bv2y_gg_",
|
|
21
|
+
"__STitle": "___STitle_1bv2y_gg_",
|
|
22
|
+
"__SDotGroup": "___SDotGroup_1bv2y_gg_",
|
|
23
|
+
"__SDot": "___SDot_1bv2y_gg_",
|
|
24
|
+
"__SDotCircle": "___SDotCircle_1bv2y_gg_",
|
|
25
|
+
"_color": "__color_1bv2y_gg_",
|
|
26
|
+
"_lightness": "__lightness_1bv2y_gg_",
|
|
27
|
+
"--color": "--color_1bv2y",
|
|
28
|
+
"--lightness": "--lightness_1bv2y",
|
|
29
|
+
"__SFooter": "___SFooter_1bv2y_gg_",
|
|
30
|
+
"__SDotPattern": "___SDotPattern_1bv2y_gg_"
|
|
31
31
|
})
|
|
32
32
|
);
|
|
33
33
|
const TooltipDotRenderContext = /* @__PURE__ */ React.createContext({
|
|
@@ -69,12 +69,14 @@ class TooltipRoot extends Component {
|
|
|
69
69
|
const {
|
|
70
70
|
x,
|
|
71
71
|
y,
|
|
72
|
-
hideHoverLine
|
|
72
|
+
hideHoverLine,
|
|
73
|
+
hideTickHover
|
|
73
74
|
} = this.asProps;
|
|
74
75
|
return {
|
|
75
76
|
x,
|
|
76
77
|
y,
|
|
77
|
-
hideHoverLine
|
|
78
|
+
hideHoverLine,
|
|
79
|
+
hideTickHover
|
|
78
80
|
};
|
|
79
81
|
}
|
|
80
82
|
getPopperProps() {
|
package/lib/esm/Venn.mjs
CHANGED
|
@@ -16,19 +16,19 @@ const style = (
|
|
|
16
16
|
/*__reshadow_css_start__*/
|
|
17
17
|
(sstyled.insert(
|
|
18
18
|
/*__inner_css_start__*/
|
|
19
|
-
".
|
|
19
|
+
".___SCircle_gifii_gg_{fill:var(--intergalactic-chart-palette-order-2,oklch(.58 .168 278.2));stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_gifii);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_gifii_gg_:hover{fill-opacity:.7}}.___SCircle_gifii_gg_.__color_gifii_gg_{fill:var(--color_gifii)}.___SCircle_gifii_gg_.__pattern_gifii_gg_.__color_gifii_gg_{fill:var(--pattern_gifii);fill-opacity:.7;stroke:var(--color_gifii);stroke-width:1px}@media (hover:hover){.___SCircle_gifii_gg_.__pattern_gifii_gg_.__color_gifii_gg_:hover{fill-opacity:.85}}.___SCircle_gifii_gg_.__transparent_gifii_gg_{opacity:.3}.___SIntersection_gifii_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:0}@media (hover:hover){.___SIntersection_gifii_gg_:hover{fill-opacity:.1}}.___SIntersection_gifii_gg_.__transparent_gifii_gg_{opacity:.3}",
|
|
20
20
|
/*__inner_css_end__*/
|
|
21
|
-
"
|
|
21
|
+
"gifii_gg_"
|
|
22
22
|
), /*__reshadow_css_end__*/
|
|
23
23
|
{
|
|
24
|
-
"__SCircle": "
|
|
25
|
-
"_color": "
|
|
26
|
-
"--color": "--
|
|
27
|
-
"_transparent": "
|
|
28
|
-
"__SIntersection": "
|
|
29
|
-
"--duration": "--
|
|
30
|
-
"_pattern": "
|
|
31
|
-
"--pattern": "--
|
|
24
|
+
"__SCircle": "___SCircle_gifii_gg_",
|
|
25
|
+
"_color": "__color_gifii_gg_",
|
|
26
|
+
"--color": "--color_gifii",
|
|
27
|
+
"_transparent": "__transparent_gifii_gg_",
|
|
28
|
+
"__SIntersection": "___SIntersection_gifii_gg_",
|
|
29
|
+
"--duration": "--duration_gifii",
|
|
30
|
+
"_pattern": "__pattern_gifii_gg_",
|
|
31
|
+
"--pattern": "--pattern_gifii"
|
|
32
32
|
})
|
|
33
33
|
);
|
|
34
34
|
class VennRoot extends Component {
|
|
@@ -13,12 +13,12 @@ const styles = (
|
|
|
13
13
|
/*__reshadow_css_start__*/
|
|
14
14
|
(sstyled.insert(
|
|
15
15
|
/*__inner_css_start__*/
|
|
16
|
-
".
|
|
16
|
+
".___SPlotA11yView_h2yn2_gg_{position:relative;display:block;background-color:var(--intergalactic-bg-primary-neutral,oklch(1 0 0));color:var(--intergalactic-text-primary,oklch(.23 .009 245));border:3px solid var(--intergalactic-border-primary,oklch(.277 .066 242.6/.18));font-size:var(--intergalactic-fs-50,10px);z-index:var(--intergalactic-z-index-overlay,500);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_h2yn2_gg_ a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x,8px);display:block}.___SPlotA11yView_h2yn2_gg_ :is(table,td,th){border:1px solid var(--intergalactic-border-primary,oklch(.277 .066 242.6/.18))}",
|
|
17
17
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
18
|
+
"h2yn2_gg_"
|
|
19
19
|
), /*__reshadow_css_end__*/
|
|
20
20
|
{
|
|
21
|
-
"__SPlotA11yView": "
|
|
21
|
+
"__SPlotA11yView": "___SPlotA11yView_h2yn2_gg_"
|
|
22
22
|
})
|
|
23
23
|
);
|
|
24
24
|
function PlotA11yView({
|
|
@@ -25,28 +25,29 @@ const style = (
|
|
|
25
25
|
/*__reshadow_css_start__*/
|
|
26
26
|
(sstyled.insert(
|
|
27
27
|
/*__inner_css_start__*/
|
|
28
|
-
".
|
|
28
|
+
".___SChart_s53or_gg_{width:100%;height:100%;min-width:0;min-height:0}.___STooltipChildrenWrapper_s53or_gg_{display:grid;grid-gap:var(--intergalactic-spacing-2x,8px);gap:var(--intergalactic-spacing-2x,8px);align-items:center}.___STooltipChildrenWrapper_s53or_gg_._columnsCount_2_s53or_gg_{grid-template-columns:auto minmax(28px,max-content)}.___STooltipChildrenWrapper_s53or_gg_._columnsCount_2_s53or_gg_ .___STooltipDivider_s53or_gg_{grid-column:span 2}.___STooltipChildrenWrapper_s53or_gg_._columnsCount_3_s53or_gg_{grid-template-columns:auto minmax(28px,max-content) minmax(28px,max-content)}.___STooltipChildrenWrapper_s53or_gg_._columnsCount_3_s53or_gg_ .___STooltipDivider_s53or_gg_{grid-column:span 3}.___STooltipDeltaWrapper_s53or_gg_{gap:var(--intergalactic-spacing-05x,2px);justify-content:flex-end}.___STooltipDeltaWrapper_s53or_gg_._trend_upward_s53or_gg_{color:var(--intergalactic-chart-data-success,oklch(.82 .19 143))}.___STooltipDeltaWrapper_s53or_gg_._trend_downward_s53or_gg_{color:var(--intergalactic-chart-data-critical,#ff7d7d)}@media (color-gamut:p3){.___STooltipDeltaWrapper_s53or_gg_._trend_downward_s53or_gg_{color:var(--intergalactic-chart-data-critical,oklch(.74 .19 22))}}.___STooltipDeltaWrapper_s53or_gg_._trend_stable_s53or_gg_{color:var(--intergalactic-text-secondary-invert,#e1f2ffb9)}@media (color-gamut:p3){.___STooltipDeltaWrapper_s53or_gg_._trend_stable_s53or_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___STooltipDeltaWrapper_s53or_gg_._deltaPercentGrowthColor_bad_s53or_gg_._trend_upward_s53or_gg_{color:var(--intergalactic-chart-data-critical,#ff7d7d)}@media (color-gamut:p3){.___STooltipDeltaWrapper_s53or_gg_._deltaPercentGrowthColor_bad_s53or_gg_._trend_upward_s53or_gg_{color:var(--intergalactic-chart-data-critical,oklch(.74 .19 22))}}.___STooltipDeltaWrapper_s53or_gg_._deltaPercentGrowthColor_bad_s53or_gg_._trend_downward_s53or_gg_{color:var(--intergalactic-chart-data-success,oklch(.82 .19 143))}.___STooltipDeltaWrapper_s53or_gg_ .___STooltipDeltaIcon_s53or_gg_{align-self:center}",
|
|
29
29
|
/*__inner_css_end__*/
|
|
30
|
-
"
|
|
30
|
+
"s53or_gg_"
|
|
31
31
|
), /*__reshadow_css_end__*/
|
|
32
32
|
{
|
|
33
|
-
"__SChart": "
|
|
34
|
-
"__STooltipChildrenWrapper": "
|
|
35
|
-
"_columnsCount_2": "
|
|
36
|
-
"__STooltipDivider": "
|
|
37
|
-
"_columnsCount_3": "
|
|
38
|
-
"__STooltipDeltaWrapper": "
|
|
39
|
-
"_trend_upward": "
|
|
40
|
-
"_trend_downward": "
|
|
41
|
-
"_trend_stable": "
|
|
42
|
-
"
|
|
33
|
+
"__SChart": "___SChart_s53or_gg_",
|
|
34
|
+
"__STooltipChildrenWrapper": "___STooltipChildrenWrapper_s53or_gg_",
|
|
35
|
+
"_columnsCount_2": "_columnsCount_2_s53or_gg_",
|
|
36
|
+
"__STooltipDivider": "___STooltipDivider_s53or_gg_",
|
|
37
|
+
"_columnsCount_3": "_columnsCount_3_s53or_gg_",
|
|
38
|
+
"__STooltipDeltaWrapper": "___STooltipDeltaWrapper_s53or_gg_",
|
|
39
|
+
"_trend_upward": "_trend_upward_s53or_gg_",
|
|
40
|
+
"_trend_downward": "_trend_downward_s53or_gg_",
|
|
41
|
+
"_trend_stable": "_trend_stable_s53or_gg_",
|
|
42
|
+
"_deltaPercentGrowthColor_bad": "_deltaPercentGrowthColor_bad_s53or_gg_",
|
|
43
|
+
"__STooltipDeltaIcon": "___STooltipDeltaIcon_s53or_gg_"
|
|
43
44
|
})
|
|
44
45
|
);
|
|
45
46
|
const NOT_A_VALUE = "n/a";
|
|
46
47
|
class AbstractChart extends Component {
|
|
47
48
|
constructor(props) {
|
|
48
49
|
super(props);
|
|
49
|
-
_defineProperty(this, "plotPadding",
|
|
50
|
+
_defineProperty(this, "plotPadding", 10);
|
|
50
51
|
_defineProperty(this, "dataHints", makeDataHintsContainer());
|
|
51
52
|
_defineProperty(this, "chartRef", /* @__PURE__ */ React.createRef());
|
|
52
53
|
_defineProperty(this, "legendRef", /* @__PURE__ */ React.createRef());
|
|
@@ -101,8 +102,7 @@ class AbstractChart extends Component {
|
|
|
101
102
|
label: legendData?.label ?? key,
|
|
102
103
|
icon: legendData?.icon ?? void 0,
|
|
103
104
|
checked: legendData?.defaultChecked ?? true,
|
|
104
|
-
color: this.resolveColor(key, index)
|
|
105
|
-
columns: []
|
|
105
|
+
color: this.resolveColor(key, index)
|
|
106
106
|
};
|
|
107
107
|
if (legendData?.additionalInfo || legendData?.count) {
|
|
108
108
|
dataDefinition.additionalInfo = legendData.additionalInfo ? {
|
|
@@ -111,9 +111,11 @@ class AbstractChart extends Component {
|
|
|
111
111
|
count: legendData.count
|
|
112
112
|
} : void 0;
|
|
113
113
|
}
|
|
114
|
-
if (legendData && "columns" in
|
|
114
|
+
if (legendData && "rows" in legendData && !("columns" in dataDefinition)) {
|
|
115
|
+
dataDefinition.rows = legendData.rows || [];
|
|
116
|
+
} else if (legendData && "columns" in legendData && !("rows" in dataDefinition)) {
|
|
115
117
|
dataDefinition.columns = legendData.columns || [];
|
|
116
|
-
} else if (!Array.isArray(data)) {
|
|
118
|
+
} else if (!Array.isArray(data) && !("rows" in dataDefinition)) {
|
|
117
119
|
let value = void 0;
|
|
118
120
|
let dataValue = data[key];
|
|
119
121
|
if (data instanceof Map) {
|
|
@@ -470,7 +472,8 @@ class AbstractChart extends Component {
|
|
|
470
472
|
const curr = data[index][key];
|
|
471
473
|
if (typeof prev !== "number" || typeof curr !== "number") return null;
|
|
472
474
|
if (prev === 0) return curr === 0 ? 0 : null;
|
|
473
|
-
|
|
475
|
+
const percent = (curr - prev) / Math.abs(prev) * 100;
|
|
476
|
+
return Number(percent.toFixed(1));
|
|
474
477
|
}
|
|
475
478
|
getTooltipChildren(options) {
|
|
476
479
|
var _ref2;
|
|
@@ -526,24 +529,25 @@ class AbstractChart extends Component {
|
|
|
526
529
|
renderTooltipPercentDelta(delta) {
|
|
527
530
|
var _ref3;
|
|
528
531
|
const {
|
|
529
|
-
styles
|
|
532
|
+
styles,
|
|
533
|
+
deltaPercentGrowthColor
|
|
530
534
|
} = this.asProps;
|
|
531
535
|
const trend = this.getTooltipPercentDeltaTrend(delta);
|
|
532
536
|
const STooltipDeltaWrapper = Flex;
|
|
533
537
|
const STooltipDeltaIcon = trend === "upward" ? DiffUp : DiffDown;
|
|
534
|
-
const displayedDelta = delta !== null ? this.defaultTooltipFormatter(Math.abs(delta)) : null;
|
|
535
538
|
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(
|
|
536
539
|
STooltipDeltaWrapper,
|
|
537
540
|
_ref3.cn("STooltipDeltaWrapper", {
|
|
538
|
-
"trend": trend
|
|
541
|
+
"trend": trend,
|
|
542
|
+
"deltaPercentGrowthColor": deltaPercentGrowthColor
|
|
539
543
|
}),
|
|
540
544
|
(trend === "upward" || trend === "downward") && /* @__PURE__ */ React.createElement(STooltipDeltaIcon, _ref3.cn("STooltipDeltaIcon", {
|
|
541
545
|
"width": 8.5,
|
|
542
546
|
"height": 8.5
|
|
543
547
|
})),
|
|
544
|
-
trend !== "unknown" &&
|
|
548
|
+
trend !== "unknown" && /* @__PURE__ */ React.createElement(Text, _ref3.cn("Text", {
|
|
545
549
|
"size": 100
|
|
546
|
-
}),
|
|
550
|
+
}), Math.abs(delta), "%")
|
|
547
551
|
);
|
|
548
552
|
}
|
|
549
553
|
renderTooltipTotalLine(dataItem) {
|
|
@@ -605,7 +609,7 @@ class AbstractChart extends Component {
|
|
|
605
609
|
"eventEmitter": eventEmitter,
|
|
606
610
|
"locale": locale,
|
|
607
611
|
...extractedAriaProps
|
|
608
|
-
}),
|
|
612
|
+
}), !showTooltip ? null : this.renderTooltip(), this.renderAxis(), this.renderChart()));
|
|
609
613
|
}
|
|
610
614
|
handleResize(entities) {
|
|
611
615
|
const {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const GOOD = /* @__PURE__ */ Symbol("GOOD");
|
|
2
|
+
const BAD = /* @__PURE__ */ Symbol("BAD");
|
|
3
|
+
const INSIGHTFUL = /* @__PURE__ */ Symbol("INSIGHTFUL");
|
|
4
|
+
const HIGHLIGHT_DOT = /* @__PURE__ */ Symbol("HIGHLIGHT_DOT");
|
|
5
|
+
const DATA_TYPE = /* @__PURE__ */ Symbol("DATA_TYPE");
|
|
6
|
+
const FORECAST = /* @__PURE__ */ Symbol("FORECAST_DATA");
|
|
7
|
+
const POTENTIAL = /* @__PURE__ */ Symbol("POTENTIAL_DATA");
|
|
8
|
+
export {
|
|
9
|
+
BAD,
|
|
10
|
+
DATA_TYPE,
|
|
11
|
+
FORECAST,
|
|
12
|
+
GOOD,
|
|
13
|
+
HIGHLIGHT_DOT,
|
|
14
|
+
INSIGHTFUL,
|
|
15
|
+
POTENTIAL
|
|
16
|
+
};
|
|
@@ -5,12 +5,19 @@ import { scaleTime, scaleLinear } from "d3-scale";
|
|
|
5
5
|
import React from "react";
|
|
6
6
|
import "../../index.mjs";
|
|
7
7
|
import { AbstractChart } from "./AbstractChart.mjs";
|
|
8
|
+
import { HIGHLIGHT_DOT } from "./AbstractChart.type.mjs";
|
|
8
9
|
import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
|
|
9
10
|
import { minMax } from "../../utils.mjs";
|
|
10
11
|
import StackedArea from "../../StackedArea.mjs";
|
|
11
12
|
import Area from "../../Area.mjs";
|
|
12
13
|
import { HoverLine } from "../../Hover.mjs";
|
|
13
14
|
class AreaChartComponent extends AbstractChart {
|
|
15
|
+
constructor(...args) {
|
|
16
|
+
super(...args);
|
|
17
|
+
_defineProperty(this, "displayDots", (i, isActive, noAround, data) => {
|
|
18
|
+
return isActive || noAround || Boolean(data[HIGHLIGHT_DOT]);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
14
21
|
get xScale() {
|
|
15
22
|
const {
|
|
16
23
|
xScale,
|
|
@@ -72,12 +79,14 @@ class AreaChartComponent extends AbstractChart {
|
|
|
72
79
|
color: item.color,
|
|
73
80
|
transparent: highlightedItem !== -1 && highlightedItem !== index,
|
|
74
81
|
curve,
|
|
75
|
-
onClick: onClickArea
|
|
82
|
+
onClick: onClickArea,
|
|
83
|
+
withGradient: true
|
|
76
84
|
}, /* @__PURE__ */ React.createElement(StackedArea.Area.Dots, {
|
|
77
|
-
display: showDots
|
|
85
|
+
display: showDots ? true : this.displayDots
|
|
78
86
|
}));
|
|
79
87
|
}));
|
|
80
88
|
}
|
|
89
|
+
const withGradient = dataDefinitions.filter((item) => item.checked).length === 1;
|
|
81
90
|
return dataDefinitions.map((item, index) => {
|
|
82
91
|
return item.checked && /* @__PURE__ */ React.createElement(Area, {
|
|
83
92
|
x: groupKey,
|
|
@@ -86,20 +95,23 @@ class AreaChartComponent extends AbstractChart {
|
|
|
86
95
|
color: item.color,
|
|
87
96
|
transparent: highlightedItem !== -1 && highlightedItem !== index,
|
|
88
97
|
curve,
|
|
89
|
-
onClick: onClickArea
|
|
98
|
+
onClick: onClickArea,
|
|
99
|
+
withGradient
|
|
90
100
|
}, /* @__PURE__ */ React.createElement(Area.Dots, {
|
|
91
|
-
display: showDots
|
|
101
|
+
display: showDots ? true : this.displayDots
|
|
92
102
|
}));
|
|
93
103
|
});
|
|
94
104
|
}
|
|
95
105
|
renderTooltip() {
|
|
96
106
|
const {
|
|
97
107
|
data,
|
|
98
|
-
groupKey
|
|
108
|
+
groupKey,
|
|
109
|
+
showXAxis
|
|
99
110
|
} = this.asProps;
|
|
100
111
|
return /* @__PURE__ */ React.createElement(HoverLine.Tooltip, {
|
|
101
112
|
x: groupKey,
|
|
102
|
-
wMin: 100
|
|
113
|
+
wMin: 100,
|
|
114
|
+
hideTickHover: !showXAxis
|
|
103
115
|
}, ({
|
|
104
116
|
xIndex
|
|
105
117
|
}) => {
|
|
@@ -126,7 +138,9 @@ _defineProperty(AreaChartComponent, "defaultProps", {
|
|
|
126
138
|
showXAxis: true,
|
|
127
139
|
showYAxis: true,
|
|
128
140
|
showTooltip: true,
|
|
129
|
-
|
|
141
|
+
stacked: true,
|
|
142
|
+
locale: "en",
|
|
143
|
+
deltaPercentGrowthColor: "good"
|
|
130
144
|
});
|
|
131
145
|
const AreaChart = createComponent(AreaChartComponent);
|
|
132
146
|
export {
|
|
@@ -85,7 +85,8 @@ class BarChartComponent extends AbstractChart {
|
|
|
85
85
|
const {
|
|
86
86
|
groupKey,
|
|
87
87
|
type = "group",
|
|
88
|
-
invertAxis
|
|
88
|
+
invertAxis,
|
|
89
|
+
maxBarSize
|
|
89
90
|
} = this.asProps;
|
|
90
91
|
const {
|
|
91
92
|
dataDefinitions,
|
|
@@ -99,19 +100,22 @@ class BarChartComponent extends AbstractChart {
|
|
|
99
100
|
y: invertAxis ? groupKey : item.id,
|
|
100
101
|
key: item.id,
|
|
101
102
|
color: item.color,
|
|
102
|
-
onClick: this.handleClickBar
|
|
103
|
+
onClick: this.handleClickBar,
|
|
104
|
+
maxBarSize
|
|
103
105
|
}), this.renderTrend(item.id));
|
|
104
106
|
}
|
|
105
107
|
if (type === "group") {
|
|
106
108
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(GroupBar, {
|
|
107
109
|
x: invertAxis ? void 0 : groupKey,
|
|
108
|
-
y: invertAxis ? groupKey : void 0
|
|
110
|
+
y: invertAxis ? groupKey : void 0,
|
|
111
|
+
maxBarSize
|
|
109
112
|
}, dataDefinitions.map((item, index) => {
|
|
110
113
|
const BarComponent = invertAxis ? GroupBar.HorizontalBar : GroupBar.Bar;
|
|
111
114
|
const commonBarComponentProps = {
|
|
112
115
|
color: item.color,
|
|
113
116
|
transparent: highlightedItem !== -1 && highlightedItem !== index,
|
|
114
|
-
onClick: this.handleClickBar
|
|
117
|
+
onClick: this.handleClickBar,
|
|
118
|
+
maxBarSize
|
|
115
119
|
};
|
|
116
120
|
if (invertAxis) {
|
|
117
121
|
commonBarComponentProps.x = item.id;
|
|
@@ -132,7 +136,8 @@ class BarChartComponent extends AbstractChart {
|
|
|
132
136
|
const commonBarComponentProps = {
|
|
133
137
|
color: item.color,
|
|
134
138
|
transparent: highlightedItem !== -1 && highlightedItem !== index,
|
|
135
|
-
onClick: this.handleClickBar
|
|
139
|
+
onClick: this.handleClickBar,
|
|
140
|
+
maxBarSize
|
|
136
141
|
};
|
|
137
142
|
if (invertAxis) {
|
|
138
143
|
commonBarComponentProps.x = item.id;
|
|
@@ -151,13 +156,15 @@ class BarChartComponent extends AbstractChart {
|
|
|
151
156
|
data,
|
|
152
157
|
groupKey,
|
|
153
158
|
invertAxis,
|
|
154
|
-
onClickHoverRect
|
|
159
|
+
onClickHoverRect,
|
|
160
|
+
showXAxis
|
|
155
161
|
} = this.asProps;
|
|
156
162
|
return /* @__PURE__ */ React.createElement(HoverRect.Tooltip, {
|
|
157
163
|
x: invertAxis ? void 0 : groupKey,
|
|
158
164
|
y: invertAxis ? groupKey : void 0,
|
|
159
165
|
wMin: 100,
|
|
160
|
-
onClick: onClickHoverRect
|
|
166
|
+
onClick: onClickHoverRect,
|
|
167
|
+
hideTickHover: !showXAxis
|
|
161
168
|
}, ({
|
|
162
169
|
xIndex,
|
|
163
170
|
yIndex
|
|
@@ -265,7 +272,9 @@ _defineProperty(BarChartComponent, "defaultProps", {
|
|
|
265
272
|
showXAxis: true,
|
|
266
273
|
showYAxis: true,
|
|
267
274
|
showTooltip: true,
|
|
268
|
-
|
|
275
|
+
maxBarSize: 12,
|
|
276
|
+
locale: "en",
|
|
277
|
+
deltaPercentGrowthColor: "good"
|
|
269
278
|
});
|
|
270
279
|
const BarChart = createComponent(BarChartComponent);
|
|
271
280
|
export {
|
|
@@ -11,6 +11,10 @@ import { localizedMessages } from "../../translations/__intergalactic-dynamic-lo
|
|
|
11
11
|
import { calculateBubbleDomain } from "../../utils.mjs";
|
|
12
12
|
import Bubble from "../../Bubble.mjs";
|
|
13
13
|
class BubbleChartComponent extends AbstractChart {
|
|
14
|
+
constructor(...args) {
|
|
15
|
+
super(...args);
|
|
16
|
+
_defineProperty(this, "plotPadding", 8);
|
|
17
|
+
}
|
|
14
18
|
get dataKeys() {
|
|
15
19
|
const {
|
|
16
20
|
data
|
|
@@ -70,7 +70,11 @@ class CigaretteChartComponent extends AbstractChart {
|
|
|
70
70
|
getDefaultDataDefinitions() {
|
|
71
71
|
const dataDefinitions = super.getDefaultDataDefinitions();
|
|
72
72
|
return dataDefinitions.map((dataDef) => {
|
|
73
|
-
|
|
73
|
+
if ("columns" in dataDef) {
|
|
74
|
+
dataDef.columns = dataDef.columns.slice(1);
|
|
75
|
+
} else if ("rows" in dataDef) {
|
|
76
|
+
dataDef.rows = dataDef.rows.slice(1);
|
|
77
|
+
}
|
|
74
78
|
return dataDef;
|
|
75
79
|
});
|
|
76
80
|
}
|
|
@@ -116,12 +116,14 @@ class HistogramChartComponent extends AbstractChart {
|
|
|
116
116
|
const {
|
|
117
117
|
data,
|
|
118
118
|
groupKey,
|
|
119
|
-
invertAxis
|
|
119
|
+
invertAxis,
|
|
120
|
+
showXAxis
|
|
120
121
|
} = this.asProps;
|
|
121
122
|
return /* @__PURE__ */ React.createElement(HoverRect.Tooltip, {
|
|
122
123
|
x: invertAxis ? void 0 : groupKey,
|
|
123
124
|
y: invertAxis ? groupKey : void 0,
|
|
124
|
-
wMin: 100
|
|
125
|
+
wMin: 100,
|
|
126
|
+
hideTickHover: !showXAxis
|
|
125
127
|
}, ({
|
|
126
128
|
xIndex,
|
|
127
129
|
yIndex
|
|
@@ -150,7 +152,8 @@ _defineProperty(HistogramChartComponent, "defaultProps", {
|
|
|
150
152
|
showXAxis: true,
|
|
151
153
|
showYAxis: true,
|
|
152
154
|
showTooltip: true,
|
|
153
|
-
locale: "en"
|
|
155
|
+
locale: "en",
|
|
156
|
+
deltaPercentGrowthColor: "good"
|
|
154
157
|
});
|
|
155
158
|
const HistogramChart = createComponent(HistogramChartComponent);
|
|
156
159
|
export {
|
|
@@ -3,6 +3,7 @@ import { createComponent } from "@semcore/core";
|
|
|
3
3
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
4
4
|
import { scaleTime, scaleLinear } from "d3-scale";
|
|
5
5
|
import React from "react";
|
|
6
|
+
import { HIGHLIGHT_DOT } from "./AbstractChart.type.mjs";
|
|
6
7
|
import "../../index.mjs";
|
|
7
8
|
import { AbstractChart } from "./AbstractChart.mjs";
|
|
8
9
|
import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
|
|
@@ -10,6 +11,12 @@ import { minMax } from "../../utils.mjs";
|
|
|
10
11
|
import Line from "../../Line.mjs";
|
|
11
12
|
import { HoverLine } from "../../Hover.mjs";
|
|
12
13
|
class LineChartComponent extends AbstractChart {
|
|
14
|
+
constructor(...args) {
|
|
15
|
+
super(...args);
|
|
16
|
+
_defineProperty(this, "displayDots", (i, isActive, noAround, data) => {
|
|
17
|
+
return isActive || noAround || Boolean(data[HIGHLIGHT_DOT]);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
13
20
|
get xScale() {
|
|
14
21
|
const {
|
|
15
22
|
xScale,
|
|
@@ -70,7 +77,7 @@ class LineChartComponent extends AbstractChart {
|
|
|
70
77
|
curve,
|
|
71
78
|
onClick: onClickLine
|
|
72
79
|
}, /* @__PURE__ */ React.createElement(Line.Dots, {
|
|
73
|
-
display: showDots
|
|
80
|
+
display: showDots || this.displayDots
|
|
74
81
|
}), area?.[item.id] && /* @__PURE__ */ React.createElement(Line.Area, {
|
|
75
82
|
area: area[item.id],
|
|
76
83
|
y0: "y0",
|
|
@@ -82,11 +89,13 @@ class LineChartComponent extends AbstractChart {
|
|
|
82
89
|
renderTooltip() {
|
|
83
90
|
const {
|
|
84
91
|
data,
|
|
85
|
-
groupKey
|
|
92
|
+
groupKey,
|
|
93
|
+
showXAxis
|
|
86
94
|
} = this.asProps;
|
|
87
95
|
return /* @__PURE__ */ React.createElement(HoverLine.Tooltip, {
|
|
88
96
|
x: groupKey,
|
|
89
|
-
wMin: 100
|
|
97
|
+
wMin: 100,
|
|
98
|
+
hideTickHover: !showXAxis
|
|
90
99
|
}, ({
|
|
91
100
|
xIndex
|
|
92
101
|
}) => {
|
|
@@ -113,7 +122,8 @@ _defineProperty(LineChartComponent, "defaultProps", {
|
|
|
113
122
|
showXAxis: true,
|
|
114
123
|
showYAxis: true,
|
|
115
124
|
showTooltip: true,
|
|
116
|
-
locale: "en"
|
|
125
|
+
locale: "en",
|
|
126
|
+
deltaPercentGrowthColor: "good"
|
|
117
127
|
});
|
|
118
128
|
const LineChart = createComponent(LineChartComponent);
|
|
119
129
|
export {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BAD, DATA_TYPE, FORECAST, GOOD, HIGHLIGHT_DOT, INSIGHTFUL, POTENTIAL } from "./AbstractChart.type.mjs";
|
|
1
2
|
import { AreaChart } from "./AreaChart.mjs";
|
|
2
3
|
import { BarChart } from "./BarChart.mjs";
|
|
3
4
|
import { BubbleChart } from "./BubbleChart.mjs";
|
|
@@ -23,5 +24,12 @@ const index = {
|
|
|
23
24
|
CompactHorizontalBar: CompactHorizontalBarChart
|
|
24
25
|
};
|
|
25
26
|
export {
|
|
27
|
+
BAD,
|
|
28
|
+
DATA_TYPE,
|
|
29
|
+
FORECAST,
|
|
30
|
+
GOOD,
|
|
31
|
+
HIGHLIGHT_DOT,
|
|
32
|
+
INSIGHTFUL,
|
|
33
|
+
POTENTIAL,
|
|
26
34
|
index as default
|
|
27
35
|
};
|
|
@@ -75,10 +75,6 @@ class BaseLegend extends Component {
|
|
|
75
75
|
onChangeLegendItem: this.onChangeLegendItem(shape),
|
|
76
76
|
onMouseEnter: line.checked ? this.bindOnMouseEnterItem(line.id) : void 0,
|
|
77
77
|
onMouseLeave: this.bindOnMouseLeaveItem(line.id),
|
|
78
|
-
style: {
|
|
79
|
-
gridRowStart: `${index + 1}`,
|
|
80
|
-
gridRowEnd: `${index + 2}`
|
|
81
|
-
},
|
|
82
78
|
patterns,
|
|
83
79
|
transparent: highlightedItem !== void 0 && highlightedItem !== -1 && highlightedItem !== index
|
|
84
80
|
};
|
|
@@ -13,14 +13,14 @@ const style = (
|
|
|
13
13
|
/*__reshadow_css_start__*/
|
|
14
14
|
(sstyled.insert(
|
|
15
15
|
/*__inner_css_start__*/
|
|
16
|
-
".
|
|
16
|
+
".___SLegendFlex_8xxmp_gg_._direction_row_8xxmp_gg_{align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:var(--intergalactic-spacing-2x,8px) var(--intergalactic-spacing-4x,16px)}.___SLegendFlex_8xxmp_gg_._direction_column_8xxmp_gg_{align-items:flex-start;flex-wrap:wrap;gap:var(--intergalactic-spacing-2x,8px)}",
|
|
17
17
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
18
|
+
"8xxmp_gg_"
|
|
19
19
|
), /*__reshadow_css_end__*/
|
|
20
20
|
{
|
|
21
|
-
"__SLegendFlex": "
|
|
22
|
-
"_direction_row": "
|
|
23
|
-
"_direction_column": "
|
|
21
|
+
"__SLegendFlex": "___SLegendFlex_8xxmp_gg_",
|
|
22
|
+
"_direction_row": "_direction_row_8xxmp_gg_",
|
|
23
|
+
"_direction_column": "_direction_column_8xxmp_gg_"
|
|
24
24
|
})
|
|
25
25
|
);
|
|
26
26
|
class LegendFlexRoot extends BaseLegend {
|
|
@@ -2,11 +2,11 @@ SLegendFlex[direction='row'] {
|
|
|
2
2
|
align-items: flex-start;
|
|
3
3
|
align-content: flex-start;
|
|
4
4
|
flex-wrap: wrap;
|
|
5
|
-
gap: var(--intergalactic-spacing-
|
|
5
|
+
gap: var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-4x, 16px);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
SLegendFlex[direction='column'] {
|
|
9
9
|
align-items: flex-start;
|
|
10
10
|
flex-wrap: wrap;
|
|
11
|
-
gap: var(--intergalactic-spacing-
|
|
11
|
+
gap: var(--intergalactic-spacing-2x, 8px);
|
|
12
12
|
}
|