@semcore/d3-chart 18.0.0-prerelease.1 → 18.0.0-prerelease.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -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 +16 -16
- 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/HorizontalBar.js +16 -16
- package/lib/cjs/Hover.js +66 -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/a11y/PlotA11yView.js +2 -2
- package/lib/cjs/component/Chart/AbstractChart.js +21 -18
- 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 +6 -3
- 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.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/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 +16 -16
- package/lib/cjs/component/ChartLegend/LegendItem/legend-item.shadow.css +11 -11
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +7 -7
- package/lib/cjs/component/ChartLegend/LegendTable/legend-table.shadow.css +2 -2
- package/lib/cjs/index.js +55 -1
- 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 -5
- package/lib/cjs/style/axis.shadow.css +51 -60
- package/lib/cjs/style/bar.shadow.css +6 -6
- package/lib/cjs/style/bubble.shadow.css +3 -3
- package/lib/cjs/style/donut.shadow.css +2 -2
- package/lib/cjs/style/dot.shadow.css +37 -2
- package/lib/cjs/style/hover.shadow.css +30 -13
- package/lib/cjs/style/line.shadow.css +3 -3
- 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 +2 -2
- package/lib/cjs/style/reference.shadow.css +4 -4
- package/lib/cjs/style/scatterplot.shadow.css +1 -1
- package/lib/cjs/style/tooltip.shadow.css +12 -12
- 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/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 +16 -16
- 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/HorizontalBar.js +16 -16
- package/lib/es6/Hover.js +66 -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/a11y/PlotA11yView.js +2 -2
- package/lib/es6/component/Chart/AbstractChart.js +21 -18
- 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 +6 -3
- 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.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/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 +16 -16
- package/lib/es6/component/ChartLegend/LegendItem/legend-item.shadow.css +11 -11
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +7 -7
- package/lib/es6/component/ChartLegend/LegendTable/legend-table.shadow.css +2 -2
- package/lib/es6/index.js +1 -0
- 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 -5
- package/lib/es6/style/axis.shadow.css +51 -60
- package/lib/es6/style/bar.shadow.css +6 -6
- package/lib/es6/style/bubble.shadow.css +3 -3
- package/lib/es6/style/donut.shadow.css +2 -2
- package/lib/es6/style/dot.shadow.css +37 -2
- package/lib/es6/style/hover.shadow.css +30 -13
- package/lib/es6/style/line.shadow.css +3 -3
- 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 +2 -2
- package/lib/es6/style/reference.shadow.css +4 -4
- package/lib/es6/style/scatterplot.shadow.css +1 -1
- package/lib/es6/style/tooltip.shadow.css +12 -12
- 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/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 +17 -17
- package/lib/esm/Donut.mjs +19 -20
- package/lib/esm/Dots.mjs +66 -15
- package/lib/esm/HorizontalBar.mjs +17 -17
- package/lib/esm/Hover.mjs +67 -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/a11y/PlotA11yView.mjs +3 -3
- package/lib/esm/component/Chart/AbstractChart.mjs +22 -19
- 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 +6 -3
- package/lib/esm/component/Chart/BubbleChart.mjs +4 -0
- 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/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 +17 -17
- package/lib/esm/component/ChartLegend/LegendItem/legend-item.shadow.css +11 -11
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +8 -8
- package/lib/esm/component/ChartLegend/LegendTable/legend-table.shadow.css +2 -2
- package/lib/esm/index.mjs +8 -0
- package/lib/esm/style/abstract-chart.shadow.css +13 -3
- package/lib/esm/style/area.shadow.css +8 -5
- package/lib/esm/style/axis.shadow.css +51 -60
- package/lib/esm/style/bar.shadow.css +6 -6
- package/lib/esm/style/bubble.shadow.css +3 -3
- package/lib/esm/style/donut.shadow.css +2 -2
- package/lib/esm/style/dot.shadow.css +37 -2
- package/lib/esm/style/hover.shadow.css +30 -13
- package/lib/esm/style/line.shadow.css +3 -3
- 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 +2 -2
- package/lib/esm/style/reference.shadow.css +4 -4
- package/lib/esm/style/scatterplot.shadow.css +1 -1
- package/lib/esm/style/tooltip.shadow.css +12 -12
- 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.map +1 -1
- package/lib/types/component/Chart/AbstractChart.type.d.ts +22 -4
- 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 +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 +1 -1
- package/lib/types/component/Chart/BubbleChart.type.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/utils.d.ts +4 -1
- package/lib/types/utils.d.ts.map +1 -1
- package/package.json +15 -15
- package/lib/esm/utils/TextMeasurer.mjs +0 -27
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
SAxis {
|
|
2
|
-
stroke: var(--intergalactic-chart-grid-x-axis, oklch(0.88 0.
|
|
2
|
+
stroke: var(--intergalactic-chart-grid-x-axis, oklch(0.88 0.011 234.9));
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
SAxis[hide] {
|
|
@@ -7,25 +7,66 @@ SAxis[hide] {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
STick {
|
|
10
|
+
display: block;
|
|
10
11
|
font-size: var(--intergalactic-fs-100, 12px);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
font-variant-numeric: tabular-nums;
|
|
13
|
+
line-height: var(--intergalactic-lh-100, 1.3334);
|
|
14
|
+
color: var(--intergalactic-chart-grid-text-label, oklch(from oklch(0.182 0.045 244.8 / 0.593) l c h / 0.4));
|
|
15
|
+
overflow: visible;
|
|
16
|
+
|
|
17
|
+
/* FF fix */
|
|
18
|
+
[data-tick-content] {
|
|
19
|
+
height: 100%;
|
|
20
|
+
}
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
&[position='bottom'] {
|
|
23
|
+
text-align: center;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&[position='left'] {
|
|
27
|
+
text-align: end;
|
|
28
|
+
dominant-baseline: central;
|
|
29
|
+
|
|
30
|
+
[data-tick-content] {
|
|
31
|
+
align-content: center;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&[position='top'] {
|
|
36
|
+
text-align: center;
|
|
37
|
+
|
|
38
|
+
[data-tick-content] {
|
|
39
|
+
align-content: end;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&[position='right'] {
|
|
44
|
+
dominant-baseline: central;
|
|
45
|
+
|
|
46
|
+
[data-tick-content] {
|
|
47
|
+
align-content: center;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&[hide] {
|
|
52
|
+
display: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&[primaryText] {
|
|
56
|
+
color: var(--intergalactic-text-primary, oklch(0.23 0.009 245));
|
|
57
|
+
}
|
|
19
58
|
}
|
|
20
59
|
|
|
21
60
|
SGrid {
|
|
22
61
|
fill: transparent;
|
|
23
|
-
stroke: var(--intergalactic-
|
|
62
|
+
stroke: var(--intergalactic-chart-grid-line, oklch(0.7 0.021 242));
|
|
63
|
+
stroke-dasharray: 0 6;
|
|
64
|
+
stroke-linecap: round;
|
|
24
65
|
}
|
|
25
66
|
|
|
26
67
|
STitle {
|
|
27
68
|
font-size: var(--intergalactic-fs-100, 12px);
|
|
28
|
-
fill: var(--intergalactic-text-
|
|
69
|
+
fill: var(--intergalactic-chart-grid-text-label, oklch(from oklch(0.182 0.045 244.8 / 0.593) l c h / 0.4));
|
|
29
70
|
transform-origin: var(--transform-origin);
|
|
30
71
|
}
|
|
31
72
|
|
|
@@ -55,56 +96,6 @@ STitle[position='left'][verticalWritingMode] {
|
|
|
55
96
|
transform: none;
|
|
56
97
|
}
|
|
57
98
|
|
|
58
|
-
STick[position='top'] {
|
|
59
|
-
transform: translateY(-12px);
|
|
60
|
-
text-anchor: middle;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
STick[position='bottom'] {
|
|
64
|
-
transform: translateY(12px);
|
|
65
|
-
text-anchor: middle;
|
|
66
|
-
dominant-baseline: hanging;
|
|
67
|
-
|
|
68
|
-
tspan {
|
|
69
|
-
dominant-baseline: hanging;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
STick[position='right'] {
|
|
74
|
-
transform: translateX(16px);
|
|
75
|
-
dominant-baseline: middle;
|
|
76
|
-
|
|
77
|
-
tspan {
|
|
78
|
-
dominant-baseline: middle;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&[multiline] {
|
|
82
|
-
dominant-baseline: auto;
|
|
83
|
-
|
|
84
|
-
tspan {
|
|
85
|
-
dominant-baseline: auto;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
STick[position='left'] {
|
|
91
|
-
transform: translateX(-16px);
|
|
92
|
-
text-anchor: end;
|
|
93
|
-
dominant-baseline: middle;
|
|
94
|
-
|
|
95
|
-
tspan {
|
|
96
|
-
dominant-baseline: middle;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
&[multiline] {
|
|
100
|
-
dominant-baseline: auto;
|
|
101
|
-
|
|
102
|
-
tspan {
|
|
103
|
-
dominant-baseline: auto;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
99
|
STick[position='custom_0'] {
|
|
109
100
|
transform: translateY(12px);
|
|
110
101
|
text-anchor: middle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import './var.css';
|
|
2
2
|
|
|
3
3
|
SBar {
|
|
4
|
-
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.
|
|
4
|
+
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
5
5
|
transition-property: height, width, y;
|
|
6
6
|
transition-duration: var(--duration);
|
|
7
7
|
transition-timing-function: ease-in-out;
|
|
@@ -30,7 +30,7 @@ SBar[onClick] {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
SBackground {
|
|
33
|
-
fill: var(--intergalactic-chart-grid-bar-
|
|
33
|
+
fill: var(--intergalactic-chart-grid-bar-base-bg, oklch(0.92 0.008 233.5));
|
|
34
34
|
opacity: 0.4;
|
|
35
35
|
}
|
|
36
36
|
SBackground[onClick] {
|
|
@@ -42,13 +42,13 @@ SBarAnnotation {
|
|
|
42
42
|
justify-content: space-between;
|
|
43
43
|
}
|
|
44
44
|
SBarLabel {
|
|
45
|
-
color: var(--intergalactic-text-primary, oklch(0.
|
|
45
|
+
color: var(--intergalactic-text-primary, oklch(0.23 0.009 245));
|
|
46
46
|
margin-right: auto;
|
|
47
47
|
font-size: var(--intergalactic-fs-200, 14px);
|
|
48
48
|
line-height: var(--intergalactic-lh-200, 1.4286);
|
|
49
49
|
}
|
|
50
50
|
SBarPercent {
|
|
51
|
-
color: var(--intergalactic-text-secondary, oklch(0.
|
|
51
|
+
color: var(--intergalactic-text-secondary, oklch(0.182 0.045 244.8 / 0.593));
|
|
52
52
|
margin-right: var(--intergalactic-spacing-2x, 8px);
|
|
53
53
|
font-size: var(--intergalactic-fs-200, 14px);
|
|
54
54
|
line-height: var(--intergalactic-lh-200, 1.4286);
|
|
@@ -57,11 +57,11 @@ SBarValue {
|
|
|
57
57
|
min-width: 52px;
|
|
58
58
|
display: flex;
|
|
59
59
|
justify-content: flex-end;
|
|
60
|
-
color: var(--intergalactic-text-primary, oklch(0.
|
|
60
|
+
color: var(--intergalactic-text-primary, oklch(0.23 0.009 245));
|
|
61
61
|
font-size: var(--intergalactic-fs-200, 14px);
|
|
62
62
|
line-height: var(--intergalactic-lh-200, 1.4286);
|
|
63
63
|
text-align: right;
|
|
64
64
|
}
|
|
65
65
|
SCompactHorizontalBarHoverRect {
|
|
66
|
-
fill: var(--intergalactic-chart-grid-bar-
|
|
66
|
+
fill: var(--intergalactic-chart-grid-bar-hover, oklch(0.375 0.09 242.7 / 0.05));
|
|
67
67
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import './var.css';
|
|
2
2
|
|
|
3
3
|
SBubble {
|
|
4
|
-
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.
|
|
4
|
+
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
5
5
|
stroke: var(--intergalactic-chart-grid-border, #ffffff);
|
|
6
6
|
stroke-width: 2px;
|
|
7
7
|
transition-property: cx, cy;
|
|
@@ -40,7 +40,7 @@ SCenter {
|
|
|
40
40
|
text-anchor: middle;
|
|
41
41
|
/* disable-tokens-validator */
|
|
42
42
|
font-size: calc(var(--intergalactic-fs-100, 12px) - 1px);
|
|
43
|
-
stroke: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.
|
|
43
|
+
stroke: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
SCenter[color] {
|
|
@@ -52,7 +52,7 @@ SCenter[transparent] {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
SLabel {
|
|
55
|
-
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.
|
|
55
|
+
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
SLabel[position='right'] {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
SPie {
|
|
4
4
|
stroke: var(--intergalactic-chart-grid-border, #ffffff);
|
|
5
|
-
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.
|
|
5
|
+
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
SPie[color] {
|
|
@@ -20,7 +20,7 @@ SPie[transparent] {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
SEmptyData {
|
|
23
|
-
fill: var(--intergalactic-chart-palette-order-null, oklch(0.9 0.
|
|
23
|
+
fill: var(--intergalactic-chart-palette-order-null, oklch(0.9 0.009 234));
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
SEmptyData[color] {
|
|
@@ -9,7 +9,7 @@ SDots {
|
|
|
9
9
|
SDot {
|
|
10
10
|
stroke-width: 1px;
|
|
11
11
|
stroke: var(--intergalactic-chart-grid-border, #ffffff);
|
|
12
|
-
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.
|
|
12
|
+
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
13
13
|
transition-property: cx, cy, x, y, filter;
|
|
14
14
|
transition-timing-function: ease-in-out;
|
|
15
15
|
}
|
|
@@ -28,6 +28,41 @@ SDot[color] {
|
|
|
28
28
|
fill: var(--color);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
SDotHighlight {
|
|
32
|
+
&[color] {
|
|
33
|
+
opacity: 0.4;
|
|
34
|
+
fill: var(--color);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&[transparent] {
|
|
38
|
+
opacity: 0.12;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
SDotBorder {
|
|
43
|
+
fill: none;
|
|
44
|
+
stroke-width: 1px;
|
|
45
|
+
stroke: var(--intergalactic-chart-grid-dot-outer-border, oklch(from oklch(0.23 0.009 245) l c h / 0.1));
|
|
46
|
+
stroke-dasharray: 2;
|
|
47
|
+
|
|
48
|
+
&[transparent] {
|
|
49
|
+
opacity: 0.03;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
31
53
|
SDot[transparent] {
|
|
32
54
|
opacity: 0.3;
|
|
33
|
-
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
SDotBackdrop {
|
|
58
|
+
stroke-width: 1px;
|
|
59
|
+
stroke: var(--intergalactic-chart-grid-border, #ffffff);
|
|
60
|
+
fill: var(--intergalactic-chart-grid-border, #ffffff);
|
|
61
|
+
transition-property: cx, cy;
|
|
62
|
+
transition-duration: var(--duration);
|
|
63
|
+
transition-timing-function: ease-in-out;
|
|
64
|
+
|
|
65
|
+
&[hide] {
|
|
66
|
+
display: none
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -1,27 +1,44 @@
|
|
|
1
1
|
SHoverLine, SHoverLine:focus-visible {
|
|
2
2
|
outline: none;
|
|
3
|
-
stroke: var(--intergalactic-chart-grid-x-axis, oklch(0.88 0.
|
|
3
|
+
stroke: var(--intergalactic-chart-grid-x-axis, oklch(0.88 0.011 234.9));
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
SHoverRect, SHoverRect:focus-visible {
|
|
7
7
|
outline: none;
|
|
8
|
-
fill: var(--intergalactic-chart-grid-bar-
|
|
8
|
+
fill: var(--intergalactic-chart-grid-bar-hover, oklch(0.375 0.09 242.7 / 0.05));
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
SHoveredTickWrapper {
|
|
12
12
|
font-size: var(--intergalactic-fs-100, 12px);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
text-
|
|
16
|
-
dominant-baseline: hanging;
|
|
13
|
+
font-variant-numeric: tabular-nums;
|
|
14
|
+
line-height: var(--intergalactic-lh-100, 1.3334);
|
|
15
|
+
color: var(--intergalactic-chart-grid-text-label, oklch(from oklch(0.182 0.045 244.8 / 0.593) l c h / 0.4));
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
text-align: center;
|
|
18
|
+
|
|
19
|
+
&[data-is-first='true'] {
|
|
20
|
+
text-align: start;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
&[data-is-last='true'] {
|
|
24
|
+
text-align: end;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&[position='top'] {
|
|
28
|
+
SHoveredTickContent {
|
|
29
|
+
align-content: end;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* FF fix */
|
|
34
|
+
SHoveredTickContent {
|
|
35
|
+
height: 100%;
|
|
36
|
+
}
|
|
24
37
|
|
|
25
|
-
|
|
26
|
-
|
|
38
|
+
SHoveredTick {
|
|
39
|
+
display: inline-block;
|
|
40
|
+
padding: 3px 12px;
|
|
41
|
+
border-radius: 6px;
|
|
42
|
+
background-color: var(--intergalactic-chart-x-axis-accent-tick, oklch(0.96 0.005 232.5));
|
|
43
|
+
}
|
|
27
44
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
SLine {
|
|
4
4
|
fill: transparent;
|
|
5
5
|
stroke-width: 2;
|
|
6
|
-
stroke: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.
|
|
6
|
+
stroke: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
7
7
|
transition-property: d;
|
|
8
8
|
transition-duration: var(--duration);
|
|
9
9
|
transition-timing-function: ease-in-out;
|
|
@@ -23,7 +23,7 @@ SLine[transparent] {
|
|
|
23
23
|
|
|
24
24
|
SNull {
|
|
25
25
|
fill: transparent;
|
|
26
|
-
stroke: var(--intergalactic-chart-palette-order-null, oklch(0.9 0.
|
|
26
|
+
stroke: var(--intergalactic-chart-palette-order-null, oklch(0.9 0.009 234));
|
|
27
27
|
stroke-dasharray: 4;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -36,7 +36,7 @@ SLineArea {
|
|
|
36
36
|
transition-duration: var(--duration);
|
|
37
37
|
transition-timing-function: ease-in-out;
|
|
38
38
|
opacity: 0.3;
|
|
39
|
-
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.
|
|
39
|
+
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
40
40
|
}
|
|
41
41
|
SLineArea[color] {
|
|
42
42
|
fill: var(--color);
|
|
@@ -2,8 +2,8 @@ SPlotA11yView {
|
|
|
2
2
|
position: relative;
|
|
3
3
|
display: block;
|
|
4
4
|
background-color: var(--intergalactic-bg-primary-neutral, oklch(1 0 0));
|
|
5
|
-
color: var(--intergalactic-text-primary, oklch(0.
|
|
6
|
-
border: 3px solid var(--intergalactic-border-primary, oklch(0.
|
|
5
|
+
color: var(--intergalactic-text-primary, oklch(0.23 0.009 245));
|
|
6
|
+
border: 3px solid var(--intergalactic-border-primary, oklch(0.277 0.066 242.6 / 0.18));
|
|
7
7
|
font-size: var(--intergalactic-fs-50, 10px);
|
|
8
8
|
z-index: var(--intergalactic-z-index-overlay, 500);
|
|
9
9
|
padding: 2px;
|
|
@@ -21,6 +21,6 @@ SPlotA11yView {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
table, td, th {
|
|
24
|
-
border: 1px solid var(--intergalactic-border-primary, oklch(0.
|
|
24
|
+
border: 1px solid var(--intergalactic-border-primary, oklch(0.277 0.066 242.6 / 0.18));
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
SAxis {
|
|
2
|
-
stroke: var(--intergalactic-chart-grid-line, oklch(0.
|
|
2
|
+
stroke: var(--intergalactic-chart-grid-line, oklch(0.7 0.021 242));
|
|
3
3
|
stroke-width: 1;
|
|
4
4
|
fill: transparent;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
SAxisLine,
|
|
8
8
|
SAxisTick {
|
|
9
|
-
stroke: var(--intergalactic-chart-grid-line, oklch(0.
|
|
9
|
+
stroke: var(--intergalactic-chart-grid-line, oklch(0.7 0.021 242));
|
|
10
10
|
stroke-width: 1;
|
|
11
11
|
stroke-dasharray: 2;
|
|
12
12
|
fill: transparent;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
SAxisLine[active] {
|
|
16
|
-
stroke: var(--intergalactic-chart-grid-y-accent-hover-line, oklch(0.88 0.
|
|
16
|
+
stroke: var(--intergalactic-chart-grid-y-accent-hover-line, oklch(0.88 0.011 234.9));
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
SAxisLabel {
|
|
@@ -31,7 +31,7 @@ SAxisLabel[yDirection] {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
SPolygon {
|
|
34
|
-
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.
|
|
34
|
+
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
35
35
|
opacity: 0.2;
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -49,7 +49,7 @@ SPolygonDot {
|
|
|
49
49
|
stroke-width: 2px;
|
|
50
50
|
stroke: var(--intergalactic-chart-grid-border, #ffffff);
|
|
51
51
|
r: 6px;
|
|
52
|
-
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.
|
|
52
|
+
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
SPolygonDot[transparent] {
|
|
@@ -61,7 +61,7 @@ SPolygonDot[color] {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
SPolygonLine {
|
|
64
|
-
stroke: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.
|
|
64
|
+
stroke: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
65
65
|
stroke-width: 3;
|
|
66
66
|
fill: transparent;
|
|
67
67
|
}
|
|
@@ -76,5 +76,5 @@ SPolygonLine[color] {
|
|
|
76
76
|
|
|
77
77
|
SPieRect {
|
|
78
78
|
outline: none;
|
|
79
|
-
fill: var(--intergalactic-chart-grid-bar-
|
|
79
|
+
fill: var(--intergalactic-chart-grid-bar-hover, oklch(0.375 0.09 242.7 / 0.05));
|
|
80
80
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
SRadian {
|
|
4
4
|
cursor: pointer;
|
|
5
|
-
fill: var(--intergalactic-text-large-info, oklch(0.
|
|
5
|
+
fill: var(--intergalactic-text-large-info, oklch(0.23 0.009 245));
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
SLine {
|
|
9
|
-
stroke: var(--intergalactic-text-large-info, oklch(0.
|
|
9
|
+
stroke: var(--intergalactic-text-large-info, oklch(0.23 0.009 245));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
SLine[stroke] {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
SReferenceLine {
|
|
2
2
|
fill: none;
|
|
3
|
-
stroke: var(--intergalactic-chart-grid-y-accent-hover-line, oklch(0.88 0.
|
|
3
|
+
stroke: var(--intergalactic-chart-grid-y-accent-hover-line, oklch(0.88 0.011 234.9));
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
STitle {
|
|
7
7
|
font-size: var(--intergalactic-fs-100, 12px);
|
|
8
|
-
fill: var(--intergalactic-chart-grid-text-label, oklch(0.
|
|
8
|
+
fill: var(--intergalactic-chart-grid-text-label, oklch(from oklch(0.182 0.045 244.8 / 0.593) l c h / 0.4));
|
|
9
9
|
transform-origin: var(--transform-origin);
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -31,13 +31,13 @@ STitle[position='left'] {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
SBackground {
|
|
34
|
-
fill: var(--intergalactic-chart-grid-period-bg, oklch(0.96 0.
|
|
34
|
+
fill: var(--intergalactic-chart-grid-period-bg, oklch(0.96 0.005 232.5));
|
|
35
35
|
}
|
|
36
36
|
SStripes {
|
|
37
37
|
fill: var(--fill);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
SStripesPatternPath {
|
|
41
|
-
stroke: var(--intergalactic-chart-grid-period-pattern, oklch(0.95 0.
|
|
41
|
+
stroke: var(--intergalactic-chart-grid-period-pattern, oklch(0.95 0.006 232.7));
|
|
42
42
|
stroke-width: 1px;
|
|
43
43
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import './var.css';
|
|
2
2
|
|
|
3
3
|
SScatterPlot {
|
|
4
|
-
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.
|
|
4
|
+
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
5
5
|
transition-property: cx, cy;
|
|
6
6
|
transition-duration: var(--duration);
|
|
7
7
|
transition-timing-function: ease-in-out;
|
|
@@ -5,18 +5,18 @@ STooltip {
|
|
|
5
5
|
line-height: var(--intergalactic-lh-100, 1.3334);
|
|
6
6
|
font-variant-numeric: tabular-nums;
|
|
7
7
|
position: relative;
|
|
8
|
-
color: var(--intergalactic-text-primary-invert, oklch(0.
|
|
9
|
-
background-color: var(--intergalactic-tooltip-bg-invert, oklch(0.23 0.
|
|
8
|
+
color: var(--intergalactic-text-primary-invert, oklch(0.991 0.005 232.5 / 0.959));
|
|
9
|
+
background-color: var(--intergalactic-tooltip-bg-invert, oklch(0.23 0.009 245));
|
|
10
10
|
border-radius: var(--intergalactic-popper-rounded, 6px);
|
|
11
|
-
border: 1px solid var(--intergalactic-tooltip-border-invert, oklch(0.4 0.
|
|
11
|
+
border: 1px solid var(--intergalactic-tooltip-border-invert, oklch(0.4 0.015 245));
|
|
12
12
|
box-sizing: border-box;
|
|
13
|
-
box-shadow: var(--intergalactic-box-shadow-popper, 1px 1px 10px 0px oklch(0.
|
|
14
|
-
padding: var(--intergalactic-spacing-
|
|
13
|
+
box-shadow: var(--intergalactic-box-shadow-popper, 1px 1px 10px 0px oklch(0.324 0.077 242.1 / 0.079));
|
|
14
|
+
padding: var(--intergalactic-spacing-3x, 12px);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
STitle {
|
|
18
|
-
color: var(--intergalactic-text-secondary-invert, oklch(0.
|
|
19
|
-
margin-bottom: var(--intergalactic-spacing-
|
|
18
|
+
color: var(--intergalactic-text-secondary-invert, oklch(0.953 0.025 240.1 / 0.726));
|
|
19
|
+
margin-bottom: var(--intergalactic-spacing-2x, 8px);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
SDotGroup {
|
|
@@ -25,7 +25,7 @@ SDotGroup {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
SDot {
|
|
28
|
-
margin-right: var(--intergalactic-spacing-
|
|
28
|
+
margin-right: var(--intergalactic-spacing-2x, 8px);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
SDotCircle[color][lightness] {
|
|
@@ -38,11 +38,11 @@ SDotCircle[color][lightness] {
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
SFooter {
|
|
41
|
-
background: var(--intergalactic-bg-secondary-invert, oklch(0.
|
|
42
|
-
color: var(--intergalactic-text-secondary-invert, oklch(0.
|
|
43
|
-
padding: var(--intergalactic-spacing-
|
|
41
|
+
background: var(--intergalactic-bg-secondary-invert, oklch(0.907 0.048 245.2 / 0.129));
|
|
42
|
+
color: var(--intergalactic-text-secondary-invert, oklch(0.953 0.025 240.1 / 0.726));
|
|
43
|
+
padding: var(--intergalactic-spacing-1x, 4px) var(--intergalactic-spacing-3x, 12px);
|
|
44
44
|
border-radius: 0 0 var(--intergalactic-rounded-medium, 6px) var(--intergalactic-rounded-medium, 6px);
|
|
45
|
-
margin: var(--intergalactic-spacing-
|
|
45
|
+
margin: var(--intergalactic-spacing-3x, 12px) calc(-1 * var(--intergalactic-spacing-3x, 12px)) calc(-1 * var(--intergalactic-spacing-3x, 12px));
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
SDotPattern {
|
package/lib/esm/utils.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import EventEmitter from "@semcore/core/lib/utils/eventEmitter";
|
|
2
2
|
import { extent, bisector } from "d3-array";
|
|
3
3
|
import { scaleQuantize, scaleBand, scaleSqrt } from "d3-scale";
|
|
4
|
+
import "./component/Chart/index.mjs";
|
|
5
|
+
import { DATA_TYPE } from "./component/Chart/AbstractChart.type.mjs";
|
|
4
6
|
const eventToPoint = (event, svgRoot) => {
|
|
5
7
|
const node = event.currentTarget || event.target;
|
|
6
8
|
const rect = svgRoot.getBoundingClientRect();
|
|
@@ -208,6 +210,23 @@ const calculateBubbleDomain = (data, key, range) => {
|
|
|
208
210
|
return [Math.floor(min), Math.floor(max)];
|
|
209
211
|
};
|
|
210
212
|
const PlotEventEmitter = EventEmitter;
|
|
213
|
+
function getDataOfType(data, type, y) {
|
|
214
|
+
const result = [];
|
|
215
|
+
let prevPoint = null;
|
|
216
|
+
let insideRun = false;
|
|
217
|
+
data.forEach((item) => {
|
|
218
|
+
const valid = item[y] !== interpolateValue;
|
|
219
|
+
if (valid && item[DATA_TYPE] === type) {
|
|
220
|
+
if (!insideRun && prevPoint !== null) result.push(prevPoint);
|
|
221
|
+
result.push(item);
|
|
222
|
+
insideRun = true;
|
|
223
|
+
} else {
|
|
224
|
+
insideRun = false;
|
|
225
|
+
}
|
|
226
|
+
if (valid) prevPoint = item;
|
|
227
|
+
});
|
|
228
|
+
return result;
|
|
229
|
+
}
|
|
211
230
|
export {
|
|
212
231
|
PlotEventEmitter,
|
|
213
232
|
calculateBubbleDomain,
|
|
@@ -216,6 +235,7 @@ export {
|
|
|
216
235
|
eventToPoint,
|
|
217
236
|
getBubbleChartValueScale,
|
|
218
237
|
getChartDefaultColorName,
|
|
238
|
+
getDataOfType,
|
|
219
239
|
getIndexFromData,
|
|
220
240
|
getNullData,
|
|
221
241
|
getScatterPlotRadius,
|
package/lib/types/Axis.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { IntergalacticD3Component } from './Plot';
|
|
|
7
7
|
export interface IXAxisProps extends XAxisProps, UnknownProperties {}
|
|
8
8
|
export type XAxisProps = Context & {
|
|
9
9
|
/** The position of the axis relative chart
|
|
10
|
-
* @default '
|
|
10
|
+
* @default 'bottom' */
|
|
11
11
|
position?: 'top' | 'right' | 'bottom' | 'left' | number;
|
|
12
12
|
/** Element hide property
|
|
13
13
|
* @default false */
|
|
@@ -38,7 +38,8 @@ export type AxisTicksProps = Context & {
|
|
|
38
38
|
hide?: boolean;
|
|
39
39
|
/** Values for axis ticks */
|
|
40
40
|
ticks?: any[];
|
|
41
|
-
/** Enables multiline tick labels, applicable only for band scales
|
|
41
|
+
/** Enables multiline tick labels, applicable only for band scales */
|
|
42
|
+
/** @deprecated has no effect since v.18 */
|
|
42
43
|
multiline?: boolean;
|
|
43
44
|
/**
|
|
44
45
|
* Enable `--intergalactic-text-primary` color for ticks
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type Axis = 'horizontal' | 'vertical';
|
|
2
|
+
type SizePayload = {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
};
|
|
6
|
+
type Position = 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
+
export declare class ChartMetaData {
|
|
8
|
+
private ticks;
|
|
9
|
+
getTicksSize(axis: Axis): SizePayload | null;
|
|
10
|
+
setTicksSize(axis: Axis, payload: SizePayload): void;
|
|
11
|
+
getTicksVisibility(axis: Axis): boolean | null;
|
|
12
|
+
setTicksVisibility(axis: Axis, isVisible: boolean): void;
|
|
13
|
+
getTicksPosition(axis: Axis): Position | null;
|
|
14
|
+
setTicksPosition(axis: Axis, position: Position): void;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=ChartMetaData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartMetaData.d.ts","sourceRoot":"","sources":["../../src/ChartMetaData.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,GAAG,YAAY,GAAG,UAAU,CAAC;AACtC,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AACrD,KAAK,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAUpD,qBAAa,aAAa;IACxB,OAAO,CAAC,KAAK,CAWX;IAEF,YAAY,CAAC,IAAI,EAAE,IAAI;IAIvB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW;IAI7C,kBAAkB,CAAC,IAAI,EAAE,IAAI;IAI7B,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO;IAIjD,gBAAgB,CAAC,IAAI,EAAE,IAAI;IAI3B,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ;CAGhD"}
|
package/lib/types/Donut.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface IDonutProps extends DonutProps, UnknownProperties {}
|
|
|
10
10
|
export type DonutProps = Context & {
|
|
11
11
|
/** Inner radius
|
|
12
12
|
* @default 0
|
|
13
|
-
|
|
13
|
+
*/
|
|
14
14
|
innerRadius?: number;
|
|
15
15
|
/** Outer radius
|
|
16
16
|
* @default calculated by the formula from width, height
|
package/lib/types/Hover.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ type HoverTooltip = (<X, Y>(
|
|
|
33
33
|
}) => { children: ReturnEl };
|
|
34
34
|
/** Flag for hide line on hovered value */
|
|
35
35
|
hideHoverLine?: boolean | ((xIndex: number | null, yIndex: number | null) => boolean);
|
|
36
|
+
/** Hide tick hover */
|
|
37
|
+
hideTickHover?: boolean;
|
|
36
38
|
} & Omit<NSBox.Props, 'children'>,
|
|
37
39
|
) => ReturnEl) &
|
|
38
40
|
TooltipTypeBase;
|