@semcore/d3-chart 17.3.1-prerelease.9 → 18.0.0-prerelease.0
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 +7 -1
- package/lib/cjs/Area.js +11 -11
- package/lib/cjs/Axis.js +55 -58
- 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/CompactHorizontalBar.js +16 -16
- package/lib/cjs/Donut.js +9 -9
- package/lib/cjs/Dots.js +14 -11
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +16 -16
- package/lib/cjs/Hover.js +158 -39
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +9 -9
- package/lib/cjs/Plot.js +6 -4
- 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 +12 -12
- package/lib/cjs/ScatterPlot.js +9 -9
- package/lib/cjs/Tooltip.js +20 -11
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +9 -9
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/lib/cjs/component/Chart/AbstractChart.js +139 -50
- 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 +12 -10
- 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 +9 -7
- 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 +21 -8
- 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 +33 -30
- 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.js +2 -1
- 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 +5 -4
- 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 -4
- 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 +9 -7
- 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 +3 -2
- 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 +19 -7
- 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 +6 -5
- 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/ChartLegend/BaseLegend.js +4 -2
- 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 +4 -4
- package/lib/cjs/component/ChartLegend/LegendFlex/legend-flex.shadow.css +2 -2
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +23 -18
- 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/LegendItem/legend-item.shadow.css +16 -40
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +12 -8
- 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 +6 -2
- package/lib/cjs/style/abstract-chart.shadow.css +31 -1
- package/lib/cjs/style/area.shadow.css +6 -5
- package/lib/cjs/style/axis.shadow.css +2 -2
- package/lib/cjs/style/bar.shadow.css +7 -7
- package/lib/cjs/style/bubble.shadow.css +4 -4
- package/lib/cjs/style/donut.shadow.css +3 -3
- package/lib/cjs/style/dot.shadow.css +9 -3
- package/lib/cjs/style/hover.shadow.css +19 -1
- package/lib/cjs/style/line.shadow.css +4 -4
- package/lib/cjs/style/radar.shadow.css +5 -5
- package/lib/cjs/style/radial-tree.shadow.css +3 -3
- package/lib/cjs/style/reference.shadow.css +1 -1
- package/lib/cjs/style/scatterplot.shadow.css +1 -1
- package/lib/cjs/style/tooltip.shadow.css +23 -14
- package/lib/cjs/style/venn.shadow.css +3 -3
- package/lib/cjs/types/Hover.d.js.map +1 -1
- package/lib/cjs/utils/TextMeasurer.js +33 -0
- package/lib/cjs/utils/TextMeasurer.js.map +1 -0
- package/lib/es6/Area.js +11 -11
- package/lib/es6/Axis.js +55 -57
- 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/CompactHorizontalBar.js +16 -16
- package/lib/es6/Donut.js +9 -9
- package/lib/es6/Dots.js +14 -11
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/HorizontalBar.js +16 -16
- package/lib/es6/Hover.js +158 -39
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +9 -9
- package/lib/es6/Plot.js +6 -4
- 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 +12 -12
- package/lib/es6/ScatterPlot.js +9 -9
- package/lib/es6/Tooltip.js +20 -11
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +9 -9
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +2 -2
- package/lib/es6/component/Chart/AbstractChart.js +136 -48
- 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 +12 -10
- 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 +9 -7
- 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 +22 -9
- 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 +33 -30
- 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.js +2 -1
- 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 +5 -4
- 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 -4
- 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 +9 -7
- 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 +3 -2
- 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 +20 -8
- 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 +6 -5
- 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 +4 -2
- 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 +4 -4
- package/lib/es6/component/ChartLegend/LegendFlex/legend-flex.shadow.css +2 -2
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +23 -18
- 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/LegendItem/legend-item.shadow.css +16 -40
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +12 -8
- 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 +6 -2
- package/lib/es6/style/abstract-chart.shadow.css +31 -1
- package/lib/es6/style/area.shadow.css +6 -5
- package/lib/es6/style/axis.shadow.css +2 -2
- package/lib/es6/style/bar.shadow.css +7 -7
- package/lib/es6/style/bubble.shadow.css +4 -4
- package/lib/es6/style/donut.shadow.css +3 -3
- package/lib/es6/style/dot.shadow.css +9 -3
- package/lib/es6/style/hover.shadow.css +19 -1
- package/lib/es6/style/line.shadow.css +4 -4
- package/lib/es6/style/radar.shadow.css +5 -5
- package/lib/es6/style/radial-tree.shadow.css +3 -3
- package/lib/es6/style/reference.shadow.css +1 -1
- package/lib/es6/style/scatterplot.shadow.css +1 -1
- package/lib/es6/style/tooltip.shadow.css +23 -14
- package/lib/es6/style/venn.shadow.css +3 -3
- package/lib/es6/types/Hover.d.js.map +1 -1
- package/lib/es6/utils/TextMeasurer.js +25 -0
- package/lib/es6/utils/TextMeasurer.js.map +1 -0
- package/lib/esm/Area.mjs +12 -12
- package/lib/esm/Axis.mjs +56 -58
- package/lib/esm/Bar.mjs +17 -17
- package/lib/esm/Bubble.mjs +15 -15
- package/lib/esm/CompactHorizontalBar.mjs +17 -17
- package/lib/esm/Donut.mjs +10 -10
- package/lib/esm/Dots.mjs +15 -12
- package/lib/esm/HorizontalBar.mjs +17 -17
- package/lib/esm/Hover.mjs +157 -40
- package/lib/esm/Line.mjs +10 -10
- package/lib/esm/Plot.mjs +7 -5
- package/lib/esm/Radar.mjs +20 -20
- package/lib/esm/RadialTree.mjs +13 -13
- package/lib/esm/Reference.mjs +13 -13
- package/lib/esm/ScatterPlot.mjs +10 -10
- package/lib/esm/Tooltip.mjs +21 -12
- package/lib/esm/Venn.mjs +10 -10
- package/lib/esm/a11y/PlotA11yModule.mjs +3 -3
- package/lib/esm/a11y/PlotA11yView.mjs +3 -3
- package/lib/esm/component/Chart/AbstractChart.mjs +150 -54
- package/lib/esm/component/Chart/AreaChart.mjs +12 -10
- package/lib/esm/component/Chart/BarChart.mjs +9 -7
- package/lib/esm/component/Chart/BubbleChart.mjs +29 -9
- package/lib/esm/component/Chart/CigaretteChart.mjs +33 -30
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +2 -1
- package/lib/esm/component/Chart/DonutChart.mjs +5 -4
- package/lib/esm/component/Chart/HistogramChart.mjs +6 -4
- package/lib/esm/component/Chart/LineChart.mjs +9 -7
- package/lib/esm/component/Chart/RadarChart.mjs +3 -2
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +25 -8
- package/lib/esm/component/Chart/VennChart.mjs +6 -5
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +4 -2
- 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 +24 -19
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.type.mjs +1 -1
- package/lib/esm/component/ChartLegend/LegendItem/legend-item.shadow.css +16 -40
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +13 -9
- package/lib/esm/component/ChartLegend/LegendTable/legend-table.shadow.css +6 -2
- package/lib/esm/style/abstract-chart.shadow.css +31 -1
- package/lib/esm/style/area.shadow.css +6 -5
- package/lib/esm/style/axis.shadow.css +2 -2
- package/lib/esm/style/bar.shadow.css +7 -7
- package/lib/esm/style/bubble.shadow.css +4 -4
- package/lib/esm/style/donut.shadow.css +3 -3
- package/lib/esm/style/dot.shadow.css +9 -3
- package/lib/esm/style/hover.shadow.css +19 -1
- package/lib/esm/style/line.shadow.css +4 -4
- package/lib/esm/style/radar.shadow.css +5 -5
- package/lib/esm/style/radial-tree.shadow.css +3 -3
- package/lib/esm/style/reference.shadow.css +1 -1
- package/lib/esm/style/scatterplot.shadow.css +1 -1
- package/lib/esm/style/tooltip.shadow.css +23 -14
- package/lib/esm/style/venn.shadow.css +3 -3
- package/lib/esm/utils/TextMeasurer.mjs +27 -0
- package/lib/types/Hover.d.ts +2 -0
- package/lib/types/component/Chart/AbstractChart.d.ts +11 -6
- package/lib/types/component/Chart/AbstractChart.d.ts.map +1 -1
- package/lib/types/component/Chart/AbstractChart.type.d.ts +20 -2
- 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 +1 -0
- 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 +1 -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 +2 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +2 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts.map +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +2 -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 +2 -1
- 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.d.ts.map +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +2 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.d.ts.map +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +2 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/VennChart.d.ts.map +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +2 -1
- package/lib/types/component/Chart/VennChart.type.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +5 -1
- package/lib/types/component/ChartLegend/BaseLegend.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +3 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.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 +2 -0
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts.map +1 -1
- package/lib/types/utils/TextMeasurer.d.ts +5 -0
- package/lib/types/utils/TextMeasurer.d.ts.map +1 -0
- package/package.json +15 -15
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@import './var.css';
|
|
2
2
|
|
|
3
3
|
SCircle {
|
|
4
|
-
fill: var(--intergalactic-chart-palette-order-2, oklch(0.
|
|
5
|
-
stroke: var(--intergalactic-chart-grid-border, #
|
|
4
|
+
fill: var(--intergalactic-chart-palette-order-2, oklch(0.58 0.168 278.2));
|
|
5
|
+
stroke: var(--intergalactic-chart-grid-border, #ffffff);
|
|
6
6
|
stroke-width: 2px;
|
|
7
7
|
fill-opacity: 0.5;
|
|
8
8
|
transition-property: cx, cy;
|
|
@@ -34,7 +34,7 @@ SCircle[transparent] {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
SIntersection {
|
|
37
|
-
stroke: var(--intergalactic-chart-grid-border, #
|
|
37
|
+
stroke: var(--intergalactic-chart-grid-border, #ffffff);
|
|
38
38
|
stroke-width: 2px;
|
|
39
39
|
fill-opacity: 0;
|
|
40
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hover.d.js","names":[],"sources":["../../../src/types/Hover.d.ts"],"sourcesContent":["import type { NSBox } from '@semcore/base-components';\nimport type { UnknownProperties, ReturnEl } from '@semcore/core';\nimport type React from 'react';\n\nimport type { Context } from './context';\nimport type { IntergalacticD3Component } from './Plot';\nimport type { TooltipTypeBase } from './Tooltip';\n\n/** @deprecated */\nexport interface IHoverProps extends HoverProps, UnknownProperties {}\nexport type HoverProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n};\n\ntype HoverTooltip = (<X, Y>(\n props: {\n /** Field name from `data` array item for the XAxis */\n x?: X;\n /** Field name from `data` array item for the YAxis */\n y?: Y;\n /** Handle click by trigger has an index - it is an index of the data array. */\n onClick?: (index: number, e: React.SyntheticEvent) => void;\n children: (props: {\n /** Index in `data` array of the current item */\n xIndex: X extends string ? number : never;\n /** Index in `data` array of the current item */\n yIndex: Y extends string ? number : never;\n }) => { children: ReturnEl };\n /** Flag for hide line on hovered value */\n hideHoverLine?: boolean | ((xIndex: number | null, yIndex: number | null) => boolean);\n } & Omit<NSBox.Props, 'children'>,\n) => ReturnEl) &\nTooltipTypeBase;\n\ntype HoverContext = {\n /** Index in `data` array of the current item */\n index: number;\n};\n\ndeclare const HoverLine: IntergalacticD3Component<'g', HoverProps, HoverContext> & {\n Tooltip: HoverTooltip;\n};\n\ndeclare const HoverRect: IntergalacticD3Component<'g', HoverProps, HoverContext> & {\n Tooltip: HoverTooltip;\n};\nexport { HoverLine, HoverRect };\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Hover.d.js","names":[],"sources":["../../../src/types/Hover.d.ts"],"sourcesContent":["import type { NSBox } from '@semcore/base-components';\nimport type { UnknownProperties, ReturnEl } from '@semcore/core';\nimport type React from 'react';\n\nimport type { Context } from './context';\nimport type { IntergalacticD3Component } from './Plot';\nimport type { TooltipTypeBase } from './Tooltip';\n\n/** @deprecated */\nexport interface IHoverProps extends HoverProps, UnknownProperties {}\nexport type HoverProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Hide tick hover */\n hideTickHover?: boolean;\n};\n\ntype HoverTooltip = (<X, Y>(\n props: {\n /** Field name from `data` array item for the XAxis */\n x?: X;\n /** Field name from `data` array item for the YAxis */\n y?: Y;\n /** Handle click by trigger has an index - it is an index of the data array. */\n onClick?: (index: number, e: React.SyntheticEvent) => void;\n children: (props: {\n /** Index in `data` array of the current item */\n xIndex: X extends string ? number : never;\n /** Index in `data` array of the current item */\n yIndex: Y extends string ? number : never;\n }) => { children: ReturnEl };\n /** Flag for hide line on hovered value */\n hideHoverLine?: boolean | ((xIndex: number | null, yIndex: number | null) => boolean);\n } & Omit<NSBox.Props, 'children'>,\n) => ReturnEl) &\nTooltipTypeBase;\n\ntype HoverContext = {\n /** Index in `data` array of the current item */\n index: number;\n};\n\ndeclare const HoverLine: IntergalacticD3Component<'g', HoverProps, HoverContext> & {\n Tooltip: HoverTooltip;\n};\n\ndeclare const HoverRect: IntergalacticD3Component<'g', HoverProps, HoverContext> & {\n Tooltip: HoverTooltip;\n};\nexport { HoverLine, HoverRect };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
export class TextMeasurer {
|
|
3
|
+
constructor() {
|
|
4
|
+
_defineProperty(this, "store", new Map());
|
|
5
|
+
}
|
|
6
|
+
measure(text, fontSize = 12) {
|
|
7
|
+
const key = `${text};${fontSize}`;
|
|
8
|
+
const storedValue = this.store.get(key);
|
|
9
|
+
if (storedValue !== undefined) return storedValue;
|
|
10
|
+
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
11
|
+
const textEl = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
12
|
+
svg.style.position = 'absolute';
|
|
13
|
+
svg.style.visibility = 'hidden';
|
|
14
|
+
svg.style.pointerEvents = 'none';
|
|
15
|
+
textEl.setAttribute('font-size', String(fontSize));
|
|
16
|
+
textEl.textContent = text;
|
|
17
|
+
svg.appendChild(textEl);
|
|
18
|
+
document.body.appendChild(svg);
|
|
19
|
+
const bbox = textEl.getBBox();
|
|
20
|
+
this.store.set(key, bbox);
|
|
21
|
+
svg.remove();
|
|
22
|
+
return bbox;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=TextMeasurer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextMeasurer.js","names":["TextMeasurer","constructor","_defineProperty","Map","measure","text","fontSize","key","storedValue","store","get","undefined","svg","document","createElementNS","textEl","style","position","visibility","pointerEvents","setAttribute","String","textContent","appendChild","body","bbox","getBBox","set","remove"],"sources":["../../../src/utils/TextMeasurer.ts"],"sourcesContent":["export class TextMeasurer {\n private store = new Map<string, DOMRect>();\n\n measure(text: string, fontSize = 12) {\n const key = `${text};${fontSize}`;\n const storedValue = this.store.get(key);\n\n if (storedValue !== undefined) return storedValue;\n\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n const textEl = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n\n svg.style.position = 'absolute';\n svg.style.visibility = 'hidden';\n svg.style.pointerEvents = 'none';\n\n textEl.setAttribute('font-size', String(fontSize));\n textEl.textContent = text;\n\n svg.appendChild(textEl);\n document.body.appendChild(svg);\n\n const bbox = textEl.getBBox();\n\n this.store.set(key, bbox);\n\n svg.remove();\n\n return bbox;\n }\n}\n"],"mappings":";AAAA,OAAO,MAAMA,YAAY,CAAC;EAAAC,YAAA;IAAAC,eAAA,gBACR,IAAIC,GAAG,CAAkB,CAAC;EAAA;EAE1CC,OAAOA,CAACC,IAAY,EAAEC,QAAQ,GAAG,EAAE,EAAE;IACnC,MAAMC,GAAG,GAAG,GAAGF,IAAI,IAAIC,QAAQ,EAAE;IACjC,MAAME,WAAW,GAAG,IAAI,CAACC,KAAK,CAACC,GAAG,CAACH,GAAG,CAAC;IAEvC,IAAIC,WAAW,KAAKG,SAAS,EAAE,OAAOH,WAAW;IAEjD,MAAMI,GAAG,GAAGC,QAAQ,CAACC,eAAe,CAAC,4BAA4B,EAAE,KAAK,CAAC;IACzE,MAAMC,MAAM,GAAGF,QAAQ,CAACC,eAAe,CAAC,4BAA4B,EAAE,MAAM,CAAC;IAE7EF,GAAG,CAACI,KAAK,CAACC,QAAQ,GAAG,UAAU;IAC/BL,GAAG,CAACI,KAAK,CAACE,UAAU,GAAG,QAAQ;IAC/BN,GAAG,CAACI,KAAK,CAACG,aAAa,GAAG,MAAM;IAEhCJ,MAAM,CAACK,YAAY,CAAC,WAAW,EAAEC,MAAM,CAACf,QAAQ,CAAC,CAAC;IAClDS,MAAM,CAACO,WAAW,GAAGjB,IAAI;IAEzBO,GAAG,CAACW,WAAW,CAACR,MAAM,CAAC;IACvBF,QAAQ,CAACW,IAAI,CAACD,WAAW,CAACX,GAAG,CAAC;IAE9B,MAAMa,IAAI,GAAGV,MAAM,CAACW,OAAO,CAAC,CAAC;IAE7B,IAAI,CAACjB,KAAK,CAACkB,GAAG,CAACpB,GAAG,EAAEkB,IAAI,CAAC;IAEzBb,GAAG,CAACgB,MAAM,CAAC,CAAC;IAEZ,OAAOH,IAAI;EACb;AACF","ignoreList":[]}
|
package/lib/esm/Area.mjs
CHANGED
|
@@ -16,21 +16,21 @@ const style = (
|
|
|
16
16
|
/*__reshadow_css_start__*/
|
|
17
17
|
(sstyled.insert(
|
|
18
18
|
/*__inner_css_start__*/
|
|
19
|
-
".
|
|
19
|
+
".___SArea_12fld_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));fill-opacity:.1;-webkit-mask-image:linear-gradient(180deg,#000 0,#0000007a 60%,#0000);mask-image:linear-gradient(180deg,#000 0,#0000007a 60%,#0000)}.___SArea_12fld_gg_.__color_12fld_gg_{fill:var(--color_12fld)}.___SArea_12fld_gg_.__pattern_12fld_gg_{fill:var(--pattern_12fld);fill-opacity:.7}.___SArea_12fld_gg_.__transparent_12fld_gg_{opacity:.3}.___SAreaLine_12fld_gg_{stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));stroke-width:2;fill:#0000}.___SAreaLine_12fld_gg_.__color_12fld_gg_{stroke:var(--color_12fld)}.___SAreaLine_12fld_gg_.__transparent_12fld_gg_{opacity:.3}.___SAreaLine_12fld_gg_,.___SArea_12fld_gg_{transition-property:d;transition-duration:var(--duration_12fld);transition-timing-function:ease-in-out}.___SNull_12fld_gg_{fill:#0000;stroke:var(--intergalactic-chart-palette-order-null,oklch(.9 .002 177));stroke-dasharray:4}.___SNull_12fld_gg_.__hide_12fld_gg_{display:none}",
|
|
20
20
|
/*__inner_css_end__*/
|
|
21
|
-
"
|
|
21
|
+
"12fld_gg_"
|
|
22
22
|
), /*__reshadow_css_end__*/
|
|
23
23
|
{
|
|
24
|
-
"__SArea": "
|
|
25
|
-
"_color": "
|
|
26
|
-
"--color": "--
|
|
27
|
-
"_pattern": "
|
|
28
|
-
"--pattern": "--
|
|
29
|
-
"_transparent": "
|
|
30
|
-
"__SAreaLine": "
|
|
31
|
-
"--duration": "--
|
|
32
|
-
"__SNull": "
|
|
33
|
-
"_hide": "
|
|
24
|
+
"__SArea": "___SArea_12fld_gg_",
|
|
25
|
+
"_color": "__color_12fld_gg_",
|
|
26
|
+
"--color": "--color_12fld",
|
|
27
|
+
"_pattern": "__pattern_12fld_gg_",
|
|
28
|
+
"--pattern": "--pattern_12fld",
|
|
29
|
+
"_transparent": "__transparent_12fld_gg_",
|
|
30
|
+
"__SAreaLine": "___SAreaLine_12fld_gg_",
|
|
31
|
+
"--duration": "--duration_12fld",
|
|
32
|
+
"__SNull": "___SNull_12fld_gg_",
|
|
33
|
+
"_hide": "__hide_12fld_gg_"
|
|
34
34
|
})
|
|
35
35
|
);
|
|
36
36
|
class AreaRoot extends Component {
|
package/lib/esm/Axis.mjs
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import { sstyled, Component } from "@semcore/core";
|
|
4
|
-
import React
|
|
4
|
+
import React from "react";
|
|
5
5
|
import createElement from "./createElement.mjs";
|
|
6
6
|
import { scaleOfBandwidth } from "./utils.mjs";
|
|
7
|
+
import { TextMeasurer } from "./utils/TextMeasurer.mjs";
|
|
7
8
|
/*!__reshadow-styles__:"./style/axis.shadow.css"*/
|
|
8
9
|
const style = (
|
|
9
10
|
/*__reshadow_css_start__*/
|
|
10
11
|
(sstyled.insert(
|
|
11
12
|
/*__inner_css_start__*/
|
|
12
|
-
".
|
|
13
|
+
".___SAxis_17qfg_gg_{stroke:var(--intergalactic-chart-grid-x-axis,oklch(.88 .002 175.6))}.___SAxis_17qfg_gg_.__hide_17qfg_gg_{display:none}.___STick_17qfg_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-chart-grid-text-label,oklch(.097 .023 156.5/.468))}.___STick_17qfg_gg_.__primaryText_17qfg_gg_{fill:var(--intergalactic-text-primary,oklch(.1 .03 137/.899))}.___STick_17qfg_gg_.__hide_17qfg_gg_{display:none}.___SGrid_17qfg_gg_{fill:#0000;stroke:var(--intergalactic-border-secondary,#00151012)}@media (color-gamut:p3){.___SGrid_17qfg_gg_{stroke:var(--intergalactic-border-secondary,oklch(.176 .033 175.7/.07))}}.___STitle_17qfg_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-text-hint,oklch(.097 .023 156.5/.468));transform-origin:var(--transform-origin_17qfg)}.___STitle_17qfg_gg_._position_top_17qfg_gg_{text-anchor:middle}.___STitle_17qfg_gg_._position_bottom_17qfg_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_17qfg_gg_._position_left_17qfg_gg_,.___STitle_17qfg_gg_._position_right_17qfg_gg_{transform:rotate(-90deg);dominant-baseline:middle;text-anchor:middle}.___STitle_17qfg_gg_._position_left_17qfg_gg_.__verticalWritingMode_17qfg_gg_,.___STitle_17qfg_gg_._position_right_17qfg_gg_.__verticalWritingMode_17qfg_gg_{writing-mode:vertical-rl;transform:none}.___STick_17qfg_gg_._position_top_17qfg_gg_{transform:translateY(-12px);text-anchor:middle}.___STick_17qfg_gg_._position_bottom_17qfg_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_17qfg_gg_._position_bottom_17qfg_gg_ tspan{dominant-baseline:hanging}.___STick_17qfg_gg_._position_right_17qfg_gg_{transform:translateX(16px);dominant-baseline:middle}.___STick_17qfg_gg_._position_right_17qfg_gg_ tspan{dominant-baseline:middle}.___STick_17qfg_gg_._position_right_17qfg_gg_.__multiline_17qfg_gg_,.___STick_17qfg_gg_._position_right_17qfg_gg_.__multiline_17qfg_gg_ tspan{dominant-baseline:auto}.___STick_17qfg_gg_._position_left_17qfg_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}.___STick_17qfg_gg_._position_left_17qfg_gg_ tspan{dominant-baseline:middle}.___STick_17qfg_gg_._position_left_17qfg_gg_.__multiline_17qfg_gg_,.___STick_17qfg_gg_._position_left_17qfg_gg_.__multiline_17qfg_gg_ tspan{dominant-baseline:auto}.___STick_17qfg_gg_._position_custom_0_17qfg_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_17qfg_gg_._position_custom_0_17qfg_gg_ tspan{dominant-baseline:hanging}.___STick_17qfg_gg_._position_custom_1_17qfg_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}.___STick_17qfg_gg_._position_custom_1_17qfg_gg_ tspan{dominant-baseline:middle}",
|
|
13
14
|
/*__inner_css_end__*/
|
|
14
|
-
"
|
|
15
|
+
"17qfg_gg_"
|
|
15
16
|
), /*__reshadow_css_end__*/
|
|
16
17
|
{
|
|
17
|
-
"__SAxis": "
|
|
18
|
-
"_hide": "
|
|
19
|
-
"__STick": "
|
|
20
|
-
"_primaryText": "
|
|
21
|
-
"__SGrid": "
|
|
22
|
-
"__STitle": "
|
|
23
|
-
"--transform-origin": "--transform-
|
|
24
|
-
"_position_top": "
|
|
25
|
-
"_position_bottom": "
|
|
26
|
-
"_position_right": "
|
|
27
|
-
"_position_left": "
|
|
28
|
-
"_verticalWritingMode": "
|
|
29
|
-
"_multiline": "
|
|
30
|
-
"_position_custom_0": "
|
|
31
|
-
"_position_custom_1": "
|
|
18
|
+
"__SAxis": "___SAxis_17qfg_gg_",
|
|
19
|
+
"_hide": "__hide_17qfg_gg_",
|
|
20
|
+
"__STick": "___STick_17qfg_gg_",
|
|
21
|
+
"_primaryText": "__primaryText_17qfg_gg_",
|
|
22
|
+
"__SGrid": "___SGrid_17qfg_gg_",
|
|
23
|
+
"__STitle": "___STitle_17qfg_gg_",
|
|
24
|
+
"--transform-origin": "--transform-origin_17qfg",
|
|
25
|
+
"_position_top": "_position_top_17qfg_gg_",
|
|
26
|
+
"_position_bottom": "_position_bottom_17qfg_gg_",
|
|
27
|
+
"_position_right": "_position_right_17qfg_gg_",
|
|
28
|
+
"_position_left": "_position_left_17qfg_gg_",
|
|
29
|
+
"_verticalWritingMode": "__verticalWritingMode_17qfg_gg_",
|
|
30
|
+
"_multiline": "__multiline_17qfg_gg_",
|
|
31
|
+
"_position_custom_0": "_position_custom_0_17qfg_gg_",
|
|
32
|
+
"_position_custom_1": "_position_custom_1_17qfg_gg_"
|
|
32
33
|
})
|
|
33
34
|
);
|
|
34
35
|
const CUSTOM_0 = /* @__PURE__ */ Symbol("custom_0");
|
|
@@ -204,43 +205,43 @@ function renderValue(value) {
|
|
|
204
205
|
}
|
|
205
206
|
return value;
|
|
206
207
|
}
|
|
207
|
-
function splitTextByWidth(
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
208
|
+
function splitTextByWidth(measurer2) {
|
|
209
|
+
return (text, maxWidth) => {
|
|
210
|
+
{
|
|
211
|
+
if (!text || !maxWidth || maxWidth <= 0) return [];
|
|
212
|
+
const words = text.split(/\s+/).filter((word) => word.length > 0);
|
|
213
|
+
if (words.length === 0) return [];
|
|
214
|
+
const lines = [];
|
|
215
|
+
let currentLine = words[0];
|
|
216
|
+
for (let i = 1; i < words.length; i++) {
|
|
217
|
+
const testLine = `${currentLine} ${words[i]}`.trim();
|
|
218
|
+
const {
|
|
219
|
+
width: testWidth
|
|
220
|
+
} = measurer2.measure(testLine);
|
|
221
|
+
if (testWidth <= maxWidth) {
|
|
222
|
+
currentLine = testLine;
|
|
223
|
+
} else {
|
|
224
|
+
if (currentLine) {
|
|
225
|
+
lines.push(currentLine);
|
|
226
|
+
}
|
|
227
|
+
currentLine = words[i];
|
|
228
|
+
const {
|
|
229
|
+
width: currentLineWidth
|
|
230
|
+
} = measurer2.measure(currentLine);
|
|
231
|
+
if (currentLineWidth > maxWidth) {
|
|
232
|
+
lines.push(currentLine);
|
|
233
|
+
currentLine = "";
|
|
234
|
+
}
|
|
235
|
+
}
|
|
221
236
|
}
|
|
222
|
-
currentLine
|
|
223
|
-
if (measureTextWidth(root, currentLine) > maxWidth) {
|
|
237
|
+
if (currentLine) {
|
|
224
238
|
lines.push(currentLine);
|
|
225
|
-
currentLine = "";
|
|
226
239
|
}
|
|
240
|
+
return lines;
|
|
227
241
|
}
|
|
228
|
-
}
|
|
229
|
-
if (currentLine) {
|
|
230
|
-
lines.push(currentLine);
|
|
231
|
-
}
|
|
232
|
-
return lines;
|
|
233
|
-
}
|
|
234
|
-
function measureTextWidth(rootRef, text, fontSize = 12) {
|
|
235
|
-
const textEl = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
236
|
-
textEl.setAttribute("font-size", fontSize);
|
|
237
|
-
textEl.setAttribute("visibility", "hidden");
|
|
238
|
-
textEl.textContent = text;
|
|
239
|
-
rootRef.appendChild(textEl);
|
|
240
|
-
const width = textEl.getComputedTextLength();
|
|
241
|
-
rootRef.removeChild(textEl);
|
|
242
|
-
return width;
|
|
242
|
+
};
|
|
243
243
|
}
|
|
244
|
+
const measurer = new TextMeasurer();
|
|
244
245
|
class AxisRoot extends Component {
|
|
245
246
|
get ticks() {
|
|
246
247
|
const {
|
|
@@ -269,7 +270,8 @@ class AxisRoot extends Component {
|
|
|
269
270
|
return {
|
|
270
271
|
ticks: this.ticks,
|
|
271
272
|
indexScale,
|
|
272
|
-
position
|
|
273
|
+
position,
|
|
274
|
+
splitTextByWidth: splitTextByWidth(measurer)
|
|
273
275
|
};
|
|
274
276
|
}
|
|
275
277
|
getGridProps() {
|
|
@@ -314,17 +316,13 @@ function Ticks(props) {
|
|
|
314
316
|
dataHintsHandler,
|
|
315
317
|
children,
|
|
316
318
|
childrenPosition = "inside",
|
|
317
|
-
|
|
318
|
-
|
|
319
|
+
multiline,
|
|
320
|
+
splitTextByWidth: splitTextByWidth2
|
|
319
321
|
} = props;
|
|
320
|
-
const [rootRefElement, setRootRefElement] = useState(null);
|
|
321
|
-
useEffect(() => {
|
|
322
|
-
if (rootRef.current) setRootRefElement(rootRef.current);
|
|
323
|
-
}, []);
|
|
324
322
|
const tickBandwidth = scale[indexScale]?.bandwidth?.();
|
|
325
323
|
const ticksWithLines = ticks.map((tick) => ({
|
|
326
324
|
tick,
|
|
327
|
-
lines: typeof tick === "string" && multiline
|
|
325
|
+
lines: typeof tick === "string" && multiline ? splitTextByWidth2(tick, tickBandwidth) : []
|
|
328
326
|
}));
|
|
329
327
|
const pos = MAP_POSITION_TICK[position] ?? MAP_POSITION_TICK[MAP_INDEX_SCALE_SYMBOL[indexScale]];
|
|
330
328
|
const positionClass = MAP_POSITION_TICK[position] ? position : `custom_${indexScale}`;
|
package/lib/esm/Bar.mjs
CHANGED
|
@@ -12,26 +12,26 @@ const style = (
|
|
|
12
12
|
/*__reshadow_css_start__*/
|
|
13
13
|
(sstyled.insert(
|
|
14
14
|
/*__inner_css_start__*/
|
|
15
|
-
".
|
|
15
|
+
".___SBar_1yabt_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));transition-property:height,width,y;transition-duration:var(--duration_1yabt);transition-timing-function:ease-in-out}.___SBar_1yabt_gg_.__color_1yabt_gg_{fill:var(--color_1yabt)}.___SBar_1yabt_gg_.__pattern_1yabt_gg_.__color_1yabt_gg_{fill:var(--pattern_1yabt);stroke:var(--color_1yabt);stroke-width:1px}.___SBar_1yabt_gg_.__hide_1yabt_gg_{display:none}.___SBar_1yabt_gg_.__transparent_1yabt_gg_{opacity:.3}.___SBar_1yabt_gg_.__onClick_1yabt_gg_{cursor:pointer}.___SBackground_1yabt_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg,oklch(.96 .001 180));opacity:.4}.___SBackground_1yabt_gg_.__onClick_1yabt_gg_{cursor:pointer}.___SBarAnnotation_1yabt_gg_{display:flex;justify-content:space-between}.___SBarLabel_1yabt_gg_{color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));margin-right:auto}.___SBarLabel_1yabt_gg_,.___SBarPercent_1yabt_gg_{font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286)}.___SBarPercent_1yabt_gg_{color:var(--intergalactic-text-secondary,oklch(.097 .023 156.5/.468));margin-right:var(--intergalactic-spacing-2x,8px)}.___SBarValue_1yabt_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286);text-align:right}.___SCompactHorizontalBarHoverRect_1yabt_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover,oklch(.177 .033 175.6/.042))}",
|
|
16
16
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
17
|
+
"1yabt_gg_"
|
|
18
18
|
), /*__reshadow_css_end__*/
|
|
19
19
|
{
|
|
20
|
-
"__SBar": "
|
|
21
|
-
"--duration": "--
|
|
22
|
-
"_color": "
|
|
23
|
-
"--color": "--
|
|
24
|
-
"_pattern": "
|
|
25
|
-
"--pattern": "--
|
|
26
|
-
"_hide": "
|
|
27
|
-
"_transparent": "
|
|
28
|
-
"_onClick": "
|
|
29
|
-
"__SBackground": "
|
|
30
|
-
"__SBarAnnotation": "
|
|
31
|
-
"__SBarLabel": "
|
|
32
|
-
"__SBarPercent": "
|
|
33
|
-
"__SBarValue": "
|
|
34
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
20
|
+
"__SBar": "___SBar_1yabt_gg_",
|
|
21
|
+
"--duration": "--duration_1yabt",
|
|
22
|
+
"_color": "__color_1yabt_gg_",
|
|
23
|
+
"--color": "--color_1yabt",
|
|
24
|
+
"_pattern": "__pattern_1yabt_gg_",
|
|
25
|
+
"--pattern": "--pattern_1yabt",
|
|
26
|
+
"_hide": "__hide_1yabt_gg_",
|
|
27
|
+
"_transparent": "__transparent_1yabt_gg_",
|
|
28
|
+
"_onClick": "__onClick_1yabt_gg_",
|
|
29
|
+
"__SBackground": "___SBackground_1yabt_gg_",
|
|
30
|
+
"__SBarAnnotation": "___SBarAnnotation_1yabt_gg_",
|
|
31
|
+
"__SBarLabel": "___SBarLabel_1yabt_gg_",
|
|
32
|
+
"__SBarPercent": "___SBarPercent_1yabt_gg_",
|
|
33
|
+
"__SBarValue": "___SBarValue_1yabt_gg_",
|
|
34
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_1yabt_gg_"
|
|
35
35
|
})
|
|
36
36
|
);
|
|
37
37
|
const MIN_HEIGHT = 2;
|
package/lib/esm/Bubble.mjs
CHANGED
|
@@ -15,24 +15,24 @@ const style = (
|
|
|
15
15
|
/*__reshadow_css_start__*/
|
|
16
16
|
(sstyled.insert(
|
|
17
17
|
/*__inner_css_start__*/
|
|
18
|
-
".
|
|
18
|
+
".___SBubble_7qqxu_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;transition-property:cx,cy;transition-duration:var(--duration_7qqxu);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SBubble_7qqxu_gg_:hover{opacity:.8}}g._visible_false_7qqxu_gg_{display:none}.___SBubble_7qqxu_gg_.__clickable_7qqxu_gg_{cursor:pointer}.___SBubble_7qqxu_gg_.__color_7qqxu_gg_{fill:var(--color_7qqxu)}.___SBubble_7qqxu_gg_.__pattern_7qqxu_gg_.__color_7qqxu_gg_{fill:var(--pattern_7qqxu);stroke:var(--color_7qqxu);stroke-width:1px}.___SBubble_7qqxu_gg_.__transparent_7qqxu_gg_{opacity:.3}.___SCenter_7qqxu_gg_{text-anchor:middle;font-size:calc(var(--intergalactic-fs-100, 12px) - 1px);stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140))}.___SCenter_7qqxu_gg_.__color_7qqxu_gg_{stroke:var(--color_7qqxu)}.___SCenter_7qqxu_gg_.__transparent_7qqxu_gg_{opacity:.3}.___SLabel_7qqxu_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140))}.___SLabel_7qqxu_gg_._position_right_7qqxu_gg_{text-anchor:end}.___SLabel_7qqxu_gg_._position_left_7qqxu_gg_{text-anchor:start}.___SLabel_7qqxu_gg_.__color_7qqxu_gg_{fill:var(--color_7qqxu)}.___SLabel_7qqxu_gg_.__transparent_7qqxu_gg_{opacity:.3}",
|
|
19
19
|
/*__inner_css_end__*/
|
|
20
|
-
"
|
|
20
|
+
"7qqxu_gg_"
|
|
21
21
|
), /*__reshadow_css_end__*/
|
|
22
22
|
{
|
|
23
|
-
"_visible_false": "
|
|
24
|
-
"__SBubble": "
|
|
25
|
-
"_clickable": "
|
|
26
|
-
"_color": "
|
|
27
|
-
"--color": "--
|
|
28
|
-
"_pattern": "
|
|
29
|
-
"--pattern": "--
|
|
30
|
-
"_transparent": "
|
|
31
|
-
"__SCenter": "
|
|
32
|
-
"__SLabel": "
|
|
33
|
-
"_position_right": "
|
|
34
|
-
"_position_left": "
|
|
35
|
-
"--duration": "--
|
|
23
|
+
"_visible_false": "_visible_false_7qqxu_gg_",
|
|
24
|
+
"__SBubble": "___SBubble_7qqxu_gg_",
|
|
25
|
+
"_clickable": "__clickable_7qqxu_gg_",
|
|
26
|
+
"_color": "__color_7qqxu_gg_",
|
|
27
|
+
"--color": "--color_7qqxu",
|
|
28
|
+
"_pattern": "__pattern_7qqxu_gg_",
|
|
29
|
+
"--pattern": "--pattern_7qqxu",
|
|
30
|
+
"_transparent": "__transparent_7qqxu_gg_",
|
|
31
|
+
"__SCenter": "___SCenter_7qqxu_gg_",
|
|
32
|
+
"__SLabel": "___SLabel_7qqxu_gg_",
|
|
33
|
+
"_position_right": "_position_right_7qqxu_gg_",
|
|
34
|
+
"_position_left": "_position_left_7qqxu_gg_",
|
|
35
|
+
"--duration": "--duration_7qqxu"
|
|
36
36
|
})
|
|
37
37
|
);
|
|
38
38
|
class BubbleRoot extends Component {
|
|
@@ -16,26 +16,26 @@ const style = (
|
|
|
16
16
|
/*__reshadow_css_start__*/
|
|
17
17
|
(sstyled.insert(
|
|
18
18
|
/*__inner_css_start__*/
|
|
19
|
-
".
|
|
19
|
+
".___SBar_1yabt_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));transition-property:height,width,y;transition-duration:var(--duration_1yabt);transition-timing-function:ease-in-out}.___SBar_1yabt_gg_.__color_1yabt_gg_{fill:var(--color_1yabt)}.___SBar_1yabt_gg_.__pattern_1yabt_gg_.__color_1yabt_gg_{fill:var(--pattern_1yabt);stroke:var(--color_1yabt);stroke-width:1px}.___SBar_1yabt_gg_.__hide_1yabt_gg_{display:none}.___SBar_1yabt_gg_.__transparent_1yabt_gg_{opacity:.3}.___SBar_1yabt_gg_.__onClick_1yabt_gg_{cursor:pointer}.___SBackground_1yabt_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg,oklch(.96 .001 180));opacity:.4}.___SBackground_1yabt_gg_.__onClick_1yabt_gg_{cursor:pointer}.___SBarAnnotation_1yabt_gg_{display:flex;justify-content:space-between}.___SBarLabel_1yabt_gg_{color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));margin-right:auto}.___SBarLabel_1yabt_gg_,.___SBarPercent_1yabt_gg_{font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286)}.___SBarPercent_1yabt_gg_{color:var(--intergalactic-text-secondary,oklch(.097 .023 156.5/.468));margin-right:var(--intergalactic-spacing-2x,8px)}.___SBarValue_1yabt_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286);text-align:right}.___SCompactHorizontalBarHoverRect_1yabt_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover,oklch(.177 .033 175.6/.042))}",
|
|
20
20
|
/*__inner_css_end__*/
|
|
21
|
-
"
|
|
21
|
+
"1yabt_gg_"
|
|
22
22
|
), /*__reshadow_css_end__*/
|
|
23
23
|
{
|
|
24
|
-
"__SBar": "
|
|
25
|
-
"--duration": "--
|
|
26
|
-
"_color": "
|
|
27
|
-
"--color": "--
|
|
28
|
-
"_pattern": "
|
|
29
|
-
"--pattern": "--
|
|
30
|
-
"_hide": "
|
|
31
|
-
"_transparent": "
|
|
32
|
-
"_onClick": "
|
|
33
|
-
"__SBackground": "
|
|
34
|
-
"__SBarAnnotation": "
|
|
35
|
-
"__SBarLabel": "
|
|
36
|
-
"__SBarPercent": "
|
|
37
|
-
"__SBarValue": "
|
|
38
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
24
|
+
"__SBar": "___SBar_1yabt_gg_",
|
|
25
|
+
"--duration": "--duration_1yabt",
|
|
26
|
+
"_color": "__color_1yabt_gg_",
|
|
27
|
+
"--color": "--color_1yabt",
|
|
28
|
+
"_pattern": "__pattern_1yabt_gg_",
|
|
29
|
+
"--pattern": "--pattern_1yabt",
|
|
30
|
+
"_hide": "__hide_1yabt_gg_",
|
|
31
|
+
"_transparent": "__transparent_1yabt_gg_",
|
|
32
|
+
"_onClick": "__onClick_1yabt_gg_",
|
|
33
|
+
"__SBackground": "___SBackground_1yabt_gg_",
|
|
34
|
+
"__SBarAnnotation": "___SBarAnnotation_1yabt_gg_",
|
|
35
|
+
"__SBarLabel": "___SBarLabel_1yabt_gg_",
|
|
36
|
+
"__SBarPercent": "___SBarPercent_1yabt_gg_",
|
|
37
|
+
"__SBarValue": "___SBarValue_1yabt_gg_",
|
|
38
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_1yabt_gg_"
|
|
39
39
|
})
|
|
40
40
|
);
|
|
41
41
|
const MIN_WIDTH = 4;
|
package/lib/esm/Donut.mjs
CHANGED
|
@@ -17,19 +17,19 @@ const style = (
|
|
|
17
17
|
/*__reshadow_css_start__*/
|
|
18
18
|
(sstyled.insert(
|
|
19
19
|
/*__inner_css_start__*/
|
|
20
|
-
".
|
|
20
|
+
".___SPie_92f82_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140))}.___SPie_92f82_gg_.__color_92f82_gg_{fill:var(--color_92f82)}.___SPie_92f82_gg_.__pattern_92f82_gg_.__color_92f82_gg_{fill:var(--pattern_92f82);stroke:var(--color_92f82);stroke-width:1px}.___SPie_92f82_gg_.__transparent_92f82_gg_{opacity:.3}.___SEmptyData_92f82_gg_{fill:var(--intergalactic-chart-palette-order-null,oklch(.9 .002 177))}.___SEmptyData_92f82_gg_.__color_92f82_gg_{fill:var(--color_92f82)}.___SLabel_92f82_gg_{text-anchor:middle;vertical-anchor:middle;font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286)}",
|
|
21
21
|
/*__inner_css_end__*/
|
|
22
|
-
"
|
|
22
|
+
"92f82_gg_"
|
|
23
23
|
), /*__reshadow_css_end__*/
|
|
24
24
|
{
|
|
25
|
-
"__SPie": "
|
|
26
|
-
"_color": "
|
|
27
|
-
"--color": "--
|
|
28
|
-
"_pattern": "
|
|
29
|
-
"--pattern": "--
|
|
30
|
-
"_transparent": "
|
|
31
|
-
"__SEmptyData": "
|
|
32
|
-
"__SLabel": "
|
|
25
|
+
"__SPie": "___SPie_92f82_gg_",
|
|
26
|
+
"_color": "__color_92f82_gg_",
|
|
27
|
+
"--color": "--color_92f82",
|
|
28
|
+
"_pattern": "__pattern_92f82_gg_",
|
|
29
|
+
"--pattern": "--pattern_92f82",
|
|
30
|
+
"_transparent": "__transparent_92f82_gg_",
|
|
31
|
+
"__SEmptyData": "___SEmptyData_92f82_gg_",
|
|
32
|
+
"__SLabel": "___SLabel_92f82_gg_"
|
|
33
33
|
})
|
|
34
34
|
);
|
|
35
35
|
const DEFAULT_INSTANCE = /* @__PURE__ */ Symbol("DEFAULT_INSTANCE");
|
package/lib/esm/Dots.mjs
CHANGED
|
@@ -10,20 +10,23 @@ const style = (
|
|
|
10
10
|
/*__reshadow_css_start__*/
|
|
11
11
|
(sstyled.insert(
|
|
12
12
|
/*__inner_css_start__*/
|
|
13
|
-
".
|
|
13
|
+
".___SDots_c7lp2_gg_ .___SDot_c7lp2_gg_{transition-duration:var(--duration_c7lp2)}.___SDot_c7lp2_gg_{stroke-width:1px;stroke:var(--intergalactic-chart-grid-border,#fff);fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));transition-property:cx,cy,x,y,filter;transition-timing-function:ease-in-out}.___SDot_c7lp2_gg_.__active_c7lp2_gg_{filter:drop-shadow(0 0 1px rgba(0,12,8,.161)) drop-shadow(0 1px 1px rgba(0,12,8,.161))}@media (color-gamut:p3){.___SDot_c7lp2_gg_.__active_c7lp2_gg_{filter:drop-shadow(0 0 1px oklch(.137 .026 175.7/.161)) drop-shadow(0 1px 1px oklch(.137 .026 175.7/.161))}}.___SDot_c7lp2_gg_.__hide_c7lp2_gg_{display:none}.___SDot_c7lp2_gg_.__color_c7lp2_gg_{fill:var(--color_c7lp2)}.___SDot_c7lp2_gg_.__transparent_c7lp2_gg_{opacity:.3}",
|
|
14
14
|
/*__inner_css_end__*/
|
|
15
|
-
"
|
|
15
|
+
"c7lp2_gg_"
|
|
16
16
|
), /*__reshadow_css_end__*/
|
|
17
17
|
{
|
|
18
|
-
"__SDot": "
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
18
|
+
"__SDot": "___SDot_c7lp2_gg_",
|
|
19
|
+
"_active": "__active_c7lp2_gg_",
|
|
20
|
+
"_hide": "__hide_c7lp2_gg_",
|
|
21
|
+
"_color": "__color_c7lp2_gg_",
|
|
22
|
+
"--color": "--color_c7lp2",
|
|
23
|
+
"_transparent": "__transparent_c7lp2_gg_",
|
|
24
|
+
"__SDots": "___SDots_c7lp2_gg_",
|
|
25
|
+
"--duration": "--duration_c7lp2"
|
|
25
26
|
})
|
|
26
27
|
);
|
|
28
|
+
const BASE_RADIUS = 3.5;
|
|
29
|
+
const ACTIVE_RADIUS = 4.5;
|
|
27
30
|
function Dots(props) {
|
|
28
31
|
var _ref3;
|
|
29
32
|
const {
|
|
@@ -40,7 +43,7 @@ function Dots(props) {
|
|
|
40
43
|
scale,
|
|
41
44
|
duration = 500,
|
|
42
45
|
transparent,
|
|
43
|
-
radius: radiusBase =
|
|
46
|
+
radius: radiusBase = BASE_RADIUS,
|
|
44
47
|
resolveColor,
|
|
45
48
|
patterns,
|
|
46
49
|
onClick
|
|
@@ -88,7 +91,7 @@ function Dots(props) {
|
|
|
88
91
|
const isNext = d3.defined()(data[i + 1] || {});
|
|
89
92
|
const active = i === activeIndex;
|
|
90
93
|
const visible = typeof display === "function" ? display(i, i === activeIndex, !isPrev && !isNext) : display || i === activeIndex || !isPrev && !isNext;
|
|
91
|
-
const radius =
|
|
94
|
+
const radius = active ? ACTIVE_RADIUS : radiusBase;
|
|
92
95
|
if (!d3.defined()(d)) return acc;
|
|
93
96
|
if (!visible) return acc;
|
|
94
97
|
if (!patterns) {
|
|
@@ -132,7 +135,7 @@ function Dots(props) {
|
|
|
132
135
|
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SDots, _ref3.cn("SDots", {
|
|
133
136
|
"duration": `${duration}ms`,
|
|
134
137
|
"onClickCapture": handlerOnClick
|
|
135
|
-
}), /* @__PURE__ */ React.createElement(PatternSymbol, _ref3.cn("PatternSymbol", {
|
|
138
|
+
}), patterns && /* @__PURE__ */ React.createElement(PatternSymbol, _ref3.cn("PatternSymbol", {
|
|
136
139
|
"color": resolveColor(color),
|
|
137
140
|
"patternKey": color,
|
|
138
141
|
"id": svgPatternId,
|
|
@@ -11,26 +11,26 @@ const style = (
|
|
|
11
11
|
/*__reshadow_css_start__*/
|
|
12
12
|
(sstyled.insert(
|
|
13
13
|
/*__inner_css_start__*/
|
|
14
|
-
".
|
|
14
|
+
".___SBar_1yabt_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));transition-property:height,width,y;transition-duration:var(--duration_1yabt);transition-timing-function:ease-in-out}.___SBar_1yabt_gg_.__color_1yabt_gg_{fill:var(--color_1yabt)}.___SBar_1yabt_gg_.__pattern_1yabt_gg_.__color_1yabt_gg_{fill:var(--pattern_1yabt);stroke:var(--color_1yabt);stroke-width:1px}.___SBar_1yabt_gg_.__hide_1yabt_gg_{display:none}.___SBar_1yabt_gg_.__transparent_1yabt_gg_{opacity:.3}.___SBar_1yabt_gg_.__onClick_1yabt_gg_{cursor:pointer}.___SBackground_1yabt_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg,oklch(.96 .001 180));opacity:.4}.___SBackground_1yabt_gg_.__onClick_1yabt_gg_{cursor:pointer}.___SBarAnnotation_1yabt_gg_{display:flex;justify-content:space-between}.___SBarLabel_1yabt_gg_{color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));margin-right:auto}.___SBarLabel_1yabt_gg_,.___SBarPercent_1yabt_gg_{font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286)}.___SBarPercent_1yabt_gg_{color:var(--intergalactic-text-secondary,oklch(.097 .023 156.5/.468));margin-right:var(--intergalactic-spacing-2x,8px)}.___SBarValue_1yabt_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286);text-align:right}.___SCompactHorizontalBarHoverRect_1yabt_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover,oklch(.177 .033 175.6/.042))}",
|
|
15
15
|
/*__inner_css_end__*/
|
|
16
|
-
"
|
|
16
|
+
"1yabt_gg_"
|
|
17
17
|
), /*__reshadow_css_end__*/
|
|
18
18
|
{
|
|
19
|
-
"__SBar": "
|
|
20
|
-
"--duration": "--
|
|
21
|
-
"_color": "
|
|
22
|
-
"--color": "--
|
|
23
|
-
"_pattern": "
|
|
24
|
-
"--pattern": "--
|
|
25
|
-
"_hide": "
|
|
26
|
-
"_transparent": "
|
|
27
|
-
"_onClick": "
|
|
28
|
-
"__SBackground": "
|
|
29
|
-
"__SBarAnnotation": "
|
|
30
|
-
"__SBarLabel": "
|
|
31
|
-
"__SBarPercent": "
|
|
32
|
-
"__SBarValue": "
|
|
33
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
19
|
+
"__SBar": "___SBar_1yabt_gg_",
|
|
20
|
+
"--duration": "--duration_1yabt",
|
|
21
|
+
"_color": "__color_1yabt_gg_",
|
|
22
|
+
"--color": "--color_1yabt",
|
|
23
|
+
"_pattern": "__pattern_1yabt_gg_",
|
|
24
|
+
"--pattern": "--pattern_1yabt",
|
|
25
|
+
"_hide": "__hide_1yabt_gg_",
|
|
26
|
+
"_transparent": "__transparent_1yabt_gg_",
|
|
27
|
+
"_onClick": "__onClick_1yabt_gg_",
|
|
28
|
+
"__SBackground": "___SBackground_1yabt_gg_",
|
|
29
|
+
"__SBarAnnotation": "___SBarAnnotation_1yabt_gg_",
|
|
30
|
+
"__SBarLabel": "___SBarLabel_1yabt_gg_",
|
|
31
|
+
"__SBarPercent": "___SBarPercent_1yabt_gg_",
|
|
32
|
+
"__SBarValue": "___SBarValue_1yabt_gg_",
|
|
33
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_1yabt_gg_"
|
|
34
34
|
})
|
|
35
35
|
);
|
|
36
36
|
const MIN_WIDTH = 2;
|