@semcore/d3-chart 16.4.2 → 16.5.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 +12 -0
- package/README.md +4 -4
- package/lib/cjs/Area.js +11 -11
- package/lib/cjs/Axis.js +15 -15
- package/lib/cjs/Bar.js +16 -16
- package/lib/cjs/Bubble.js +15 -15
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +21 -19
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +12 -11
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +8 -8
- package/lib/cjs/HorizontalBar.js +16 -16
- package/lib/cjs/Hover.js +7 -7
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +9 -9
- package/lib/cjs/Plot.js +3 -3
- package/lib/cjs/Radar.js +21 -21
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +24 -24
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/Reference.js +12 -12
- package/lib/cjs/ScatterPlot.js +12 -11
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/Tooltip.js +9 -9
- package/lib/cjs/Venn.js +12 -11
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +5 -5
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/lib/cjs/component/Chart/AbstractChart.js +119 -35
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.js +5 -29
- package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.js +5 -29
- package/lib/cjs/component/Chart/BarChart.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.js +0 -4
- 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 +96 -59
- 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 +1 -6
- 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 +4 -28
- package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.js +5 -29
- package/lib/cjs/component/Chart/LineChart.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.js +1 -5
- 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 +0 -4
- 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/LegendFlex/LegendFlex.js +4 -4
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +17 -17
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/lib/cjs/style/abstract-chart.shadow.css +12 -0
- package/lib/es6/Area.js +11 -11
- package/lib/es6/Axis.js +15 -15
- package/lib/es6/Bar.js +16 -16
- package/lib/es6/Bubble.js +15 -15
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +21 -19
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +12 -11
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +8 -8
- package/lib/es6/HorizontalBar.js +16 -16
- package/lib/es6/Hover.js +7 -7
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +9 -9
- package/lib/es6/Plot.js +3 -3
- package/lib/es6/Radar.js +21 -21
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +24 -24
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/Reference.js +12 -12
- package/lib/es6/ScatterPlot.js +12 -11
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/Tooltip.js +9 -9
- package/lib/es6/Venn.js +12 -11
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +4 -4
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +2 -2
- package/lib/es6/component/Chart/AbstractChart.js +119 -31
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.js +5 -29
- package/lib/es6/component/Chart/AreaChart.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.js +5 -29
- package/lib/es6/component/Chart/BarChart.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.js +0 -4
- 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 +100 -61
- 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 +1 -6
- 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 +4 -28
- package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.js +5 -29
- package/lib/es6/component/Chart/LineChart.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.js +1 -5
- 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 +0 -4
- 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/LegendFlex/LegendFlex.js +4 -4
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +17 -17
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/lib/es6/style/abstract-chart.shadow.css +12 -0
- package/lib/esm/Area.mjs +12 -12
- package/lib/esm/Axis.mjs +16 -16
- package/lib/esm/Bar.mjs +17 -17
- package/lib/esm/Bubble.mjs +16 -16
- package/lib/esm/CompactHorizontalBar.mjs +21 -20
- package/lib/esm/Donut.mjs +12 -12
- package/lib/esm/Dots.mjs +9 -9
- package/lib/esm/HorizontalBar.mjs +17 -17
- package/lib/esm/Hover.mjs +8 -8
- package/lib/esm/Line.mjs +10 -10
- package/lib/esm/Plot.mjs +4 -4
- package/lib/esm/Radar.mjs +22 -22
- package/lib/esm/RadialTree.mjs +27 -27
- package/lib/esm/Reference.mjs +13 -13
- package/lib/esm/ScatterPlot.mjs +12 -12
- package/lib/esm/Tooltip.mjs +10 -10
- package/lib/esm/Venn.mjs +12 -12
- package/lib/esm/a11y/PlotA11yModule.mjs +5 -5
- package/lib/esm/a11y/PlotA11yView.mjs +3 -3
- package/lib/esm/component/Chart/AbstractChart.mjs +103 -19
- package/lib/esm/component/Chart/AreaChart.mjs +5 -27
- package/lib/esm/component/Chart/BarChart.mjs +6 -28
- package/lib/esm/component/Chart/BubbleChart.mjs +0 -4
- package/lib/esm/component/Chart/CigaretteChart.mjs +78 -45
- package/lib/esm/component/Chart/DonutChart.mjs +1 -4
- package/lib/esm/component/Chart/HistogramChart.mjs +5 -27
- package/lib/esm/component/Chart/LineChart.mjs +5 -27
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +1 -4
- package/lib/esm/component/Chart/VennChart.mjs +0 -4
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +5 -5
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +18 -18
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +7 -7
- package/lib/esm/style/abstract-chart.shadow.css +12 -0
- package/lib/types/a11y/PlotA11yModule.d.ts +1 -1
- package/lib/types/component/Chart/AbstractChart.d.ts +11 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +1 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +2 -0
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +1 -1
- package/package.json +5 -5
|
@@ -7,8 +7,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
import { createComponent } from '@semcore/core';
|
|
9
9
|
import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
10
|
-
import { Box, Flex } from '@semcore/flex-box';
|
|
11
|
-
import { Text } from '@semcore/typography';
|
|
12
10
|
import { scaleLinear, scaleTime } from 'd3-scale';
|
|
13
11
|
import React from 'react';
|
|
14
12
|
// @ts-ignore
|
|
@@ -96,40 +94,18 @@ var LineChartComponent = /*#__PURE__*/function (_AbstractChart) {
|
|
|
96
94
|
var _this = this;
|
|
97
95
|
var _this$asProps4 = this.asProps,
|
|
98
96
|
data = _this$asProps4.data,
|
|
99
|
-
groupKey = _this$asProps4.groupKey
|
|
100
|
-
showTotalInTooltip = _this$asProps4.showTotalInTooltip,
|
|
101
|
-
showTooltip = _this$asProps4.showTooltip;
|
|
102
|
-
var dataDefinitions = this.state.dataDefinitions;
|
|
103
|
-
if (!showTooltip) {
|
|
104
|
-
return null;
|
|
105
|
-
}
|
|
97
|
+
groupKey = _this$asProps4.groupKey;
|
|
106
98
|
return /*#__PURE__*/React.createElement(HoverLine.Tooltip, {
|
|
107
99
|
x: groupKey,
|
|
108
100
|
wMin: 100
|
|
109
101
|
}, function (_ref) {
|
|
110
|
-
var _dataItem$groupKey;
|
|
111
102
|
var xIndex = _ref.xIndex;
|
|
112
103
|
var dataItem = data[xIndex];
|
|
113
|
-
var total = _this.totalValue(dataItem);
|
|
114
104
|
return {
|
|
115
|
-
children:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}, /*#__PURE__*/React.createElement(HoverLine.Tooltip.Dot, {
|
|
120
|
-
mr: 4,
|
|
121
|
-
color: item.color
|
|
122
|
-
}, item.label), /*#__PURE__*/React.createElement(Text, {
|
|
123
|
-
bold: true
|
|
124
|
-
}, _this.tooltipValueFormatter(dataItem[item.id])));
|
|
125
|
-
}), showTotalInTooltip === true && /*#__PURE__*/React.createElement(Flex, {
|
|
126
|
-
mt: 2,
|
|
127
|
-
justifyContent: "space-between"
|
|
128
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
129
|
-
mr: 4
|
|
130
|
-
}, "Total"), /*#__PURE__*/React.createElement(Text, {
|
|
131
|
-
bold: true
|
|
132
|
-
}, total)))
|
|
105
|
+
children: _this.getTooltipChildren({
|
|
106
|
+
Tooltip: HoverLine.Tooltip,
|
|
107
|
+
dataItem: dataItem
|
|
108
|
+
})
|
|
133
109
|
};
|
|
134
110
|
});
|
|
135
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineChart.js","names":["createComponent","i18nEnhance","Box","Flex","Text","scaleLinear","scaleTime","React","Line","minMax","HoverLine","AbstractChart","localizedMessages","LineChartComponent","_AbstractChart","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","get","_this$asProps","asProps","xScale","_this$asProps$marginY","marginY","plotWidth","data","groupKey","testItem","range","plotPadding","domain","Date","Number","isNaN","getMilliseconds","_this$asProps2","yScale","_this$asProps2$margin","marginX","plotHeight","flatValues","_superPropGet","max","Math","apply","_toConsumableArray","min","value","renderChart","_this$asProps3","curve","showDots","area","areaCurve","onClickLine","_this$state","state","dataDefinitions","highlightedLine","map","item","index","checked","createElement","x","toString","y","id","color","transparent","onClick","Dots","display","Area","y0","y1","renderTooltip","_this","_this$asProps4","showTotalInTooltip","showTooltip","Tooltip","wMin","_ref","_dataItem$groupKey","xIndex","dataItem","total","totalValue","children","Fragment","Title","justifyContent","Dot","mr","label","bold","tooltipValueFormatter","mt","getLegendAriaLabel","getI18nText","chartType","_defineProperty","LineChart"],"sources":["../../../../src/component/Chart/LineChart.tsx"],"sourcesContent":["import { createComponent } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { Box, Flex } from '@semcore/flex-box';\nimport { Text } from '@semcore/typography';\nimport { type ScaleLinear, scaleLinear, scaleTime } from 'd3-scale';\nimport React from 'react';\n\nimport type { LineChartData, LineChartProps, LineChartType } from './LineChart.type';\n// @ts-ignore\nimport { Line, minMax, HoverLine } from '../..';\nimport { AbstractChart } from './AbstractChart';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\n\nclass LineChartComponent extends AbstractChart<\n LineChartData,\n LineChartProps,\n typeof LineChartComponent.enhance\n> {\n static displayName = 'Chart.Line';\n\n static enhance = [i18nEnhance(localizedMessages)] as const;\n\n protected get xScale() {\n const { xScale, marginY = 30, plotWidth, data, groupKey } = this.asProps;\n\n if (xScale) {\n return xScale;\n }\n\n const testItem = data[0][groupKey];\n const range = [marginY, plotWidth - this.plotPadding];\n const domain = minMax(data, groupKey);\n\n if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {\n return scaleTime(domain, range);\n }\n\n return scaleLinear(domain, range);\n }\n\n protected get yScale(): ScaleLinear<any, any> {\n const { yScale, marginX = 30, plotHeight } = this.asProps;\n\n if (yScale) {\n return yScale;\n }\n\n const flatValues = super.flatValues;\n\n const max = Math.max(...flatValues);\n const min = Math.min(...flatValues);\n\n return scaleLinear()\n .range([plotHeight - marginX, this.plotPadding])\n .domain([min, max]);\n }\n\n protected renderChart() {\n const { groupKey, curve, showDots, area, areaCurve, onClickLine } = this.asProps;\n const { dataDefinitions, highlightedLine } = this.state;\n\n return dataDefinitions.map((item, index) => {\n return (\n item.checked && (\n <Line\n x={groupKey.toString()}\n y={item.id}\n key={item.id}\n color={item.color}\n transparent={highlightedLine !== -1 && highlightedLine !== index}\n curve={curve}\n onClick={onClickLine}\n >\n {showDots && <Line.Dots display />}\n {area?.[item.id] && (\n <Line.Area area={area[item.id]} y0='y0' y1='y1' curve={areaCurve} />\n )}\n </Line>\n )\n );\n });\n }\n\n protected renderTooltip() {\n const { data, groupKey, showTotalInTooltip, showTooltip } = this.asProps;\n const { dataDefinitions } = this.state;\n\n if (!showTooltip) {\n return null;\n }\n\n return (\n <HoverLine.Tooltip x={groupKey} wMin={100}>\n {({ xIndex }: any) => {\n const dataItem = data[xIndex];\n const total = this.totalValue(dataItem);\n\n return {\n children: (\n <>\n <HoverLine.Tooltip.Title>{dataItem[groupKey]?.toString()}</HoverLine.Tooltip.Title>\n\n {dataDefinitions.map((item) => {\n return (\n item.checked && (\n <Flex justifyContent='space-between' key={item.id}>\n <HoverLine.Tooltip.Dot mr={4} color={item.color}>\n {item.label}\n </HoverLine.Tooltip.Dot>\n <Text bold>{this.tooltipValueFormatter(dataItem[item.id])}</Text>\n </Flex>\n )\n );\n })}\n\n {showTotalInTooltip === true && (\n <Flex mt={2} justifyContent='space-between'>\n <Box mr={4}>Total</Box>\n <Text bold>{total}</Text>\n </Flex>\n )}\n </>\n ),\n };\n }}\n </HoverLine.Tooltip>\n );\n }\n\n protected getLegendAriaLabel(): string {\n return this.asProps.getI18nText('legendForChart', { chartType: 'Line' });\n }\n}\n\nexport const L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GAC7CR,IAAI,CAACmC,KACe,CAAC,eACxB3F,KAAA,CAAA2D,aAAA,CAAC9D,IAAI;cAAC+F,IAAI;YAAA,GAAEnB,KAAI,CAACoB,qBAAqB,CAACX,QAAQ,CAAC1B,IAAI,CAACO,EAAE,CAAC,CAAQ,CAC5D,CACP;UAEL,CAAC,CAAC,EAEDY,kBAAkB,KAAK,IAAI,iBAC1B3E,KAAA,CAAA2D,aAAA,CAAC/D,IAAI;YAACkG,EAAE,EAAE,CAAE;YAACN,cAAc,EAAC;UAAe,gBACzCxF,KAAA,CAAA2D,aAAA,CAAChE,GAAG;YAAC+F,EAAE,EAAE;UAAE,GAAC,OAAU,CAAC,eACvB1F,KAAA,CAAA2D,aAAA,CAAC9D,IAAI;YAAC+F,IAAI;UAAA,GAAET,KAAY,CACpB,CAER;QAEN,CAAC;MACH,CACiB,CAAC;IAExB;EAAC;IAAAtE,GAAA;IAAA8B,KAAA,EAED,SAAUoD,kBAAkBA,CAAA,EAAW;MACrC,OAAO,IAAI,CAAC/E,OAAO,CAACgF,WAAW,CAAC,gBAAgB,EAAE;QAAEC,SAAS,EAAE;MAAO,CAAC,CAAC;IAC1E;EAAC;AAAA,EAtH8B7F,aAAa;AAAA8F,eAAA,CAAxC5F,kBAAkB,iBAKD,YAAY;AAAA4F,eAAA,CAL7B5F,kBAAkB,aAOL,CAACZ,WAAW,CAACW,iBAAiB,CAAC,CAAC;AAkHnD,OAAO,IAAM8F,SAAwB,GAAG1G,eAAe,CAACa,kBAAkB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"LineChart.js","names":["createComponent","i18nEnhance","scaleLinear","scaleTime","React","Line","minMax","HoverLine","AbstractChart","localizedMessages","LineChartComponent","_AbstractChart","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","get","_this$asProps","asProps","xScale","_this$asProps$marginY","marginY","plotWidth","data","groupKey","testItem","range","plotPadding","domain","Date","Number","isNaN","getMilliseconds","_this$asProps2","yScale","_this$asProps2$margin","marginX","plotHeight","flatValues","_superPropGet","max","Math","apply","_toConsumableArray","min","value","renderChart","_this$asProps3","curve","showDots","area","areaCurve","onClickLine","_this$state","state","dataDefinitions","highlightedLine","map","item","index","checked","createElement","x","toString","y","id","color","transparent","onClick","Dots","display","Area","y0","y1","renderTooltip","_this","_this$asProps4","Tooltip","wMin","_ref","xIndex","dataItem","children","getTooltipChildren","getLegendAriaLabel","getI18nText","chartType","_defineProperty","LineChart"],"sources":["../../../../src/component/Chart/LineChart.tsx"],"sourcesContent":["import { createComponent } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { type ScaleLinear, scaleLinear, scaleTime } from 'd3-scale';\nimport React from 'react';\n\nimport type { LineChartData, LineChartProps, LineChartType } from './LineChart.type';\n// @ts-ignore\nimport { Line, minMax, HoverLine } from '../..';\nimport { AbstractChart } from './AbstractChart';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\n\nclass LineChartComponent extends AbstractChart<\n LineChartData,\n LineChartProps,\n typeof LineChartComponent.enhance\n> {\n static displayName = 'Chart.Line';\n\n static enhance = [i18nEnhance(localizedMessages)] as const;\n\n protected get xScale() {\n const { xScale, marginY = 30, plotWidth, data, groupKey } = this.asProps;\n\n if (xScale) {\n return xScale;\n }\n\n const testItem = data[0][groupKey];\n const range = [marginY, plotWidth - this.plotPadding];\n const domain = minMax(data, groupKey);\n\n if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {\n return scaleTime(domain, range);\n }\n\n return scaleLinear(domain, range);\n }\n\n protected get yScale(): ScaleLinear<any, any> {\n const { yScale, marginX = 30, plotHeight } = this.asProps;\n\n if (yScale) {\n return yScale;\n }\n\n const flatValues = super.flatValues;\n\n const max = Math.max(...flatValues);\n const min = Math.min(...flatValues);\n\n return scaleLinear()\n .range([plotHeight - marginX, this.plotPadding])\n .domain([min, max]);\n }\n\n protected renderChart() {\n const { groupKey, curve, showDots, area, areaCurve, onClickLine } = this.asProps;\n const { dataDefinitions, highlightedLine } = this.state;\n\n return dataDefinitions.map((item, index) => {\n return (\n item.checked && (\n <Line\n x={groupKey.toString()}\n y={item.id}\n key={item.id}\n color={item.color}\n transparent={highlightedLine !== -1 && highlightedLine !== index}\n curve={curve}\n onClick={onClickLine}\n >\n {showDots && <Line.Dots display />}\n {area?.[item.id] && (\n <Line.Area area={area[item.id]} y0='y0' y1='y1' curve={areaCurve} />\n )}\n </Line>\n )\n );\n });\n }\n\n protected renderTooltip() {\n const { data, groupKey } = this.asProps;\n\n return (\n <HoverLine.Tooltip x={groupKey} wMin={100}>\n {({ xIndex }: any) => {\n const dataItem = data[xIndex];\n\n return {\n children: this.getTooltipChildren({\n Tooltip: HoverLine.Tooltip,\n dataItem,\n }),\n };\n }}\n </HoverLine.Tooltip>\n );\n }\n\n protected getLegendAriaLabel(): string {\n return this.asProps.getI18nText('legendForChart', { chartType: 'Line' });\n }\n}\n\nexport const LineChart: LineChartType = createComponent(LineChartComponent);\n"],"mappings":";;;;;;;AAAA,SAASA,eAAe,QAAQ,eAAe;AAC/C,OAAOC,WAAW,MAAM,8CAA8C;AACtE,SAA2BC,WAAW,EAAEC,SAAS,QAAQ,UAAU;AACnE,OAAOC,KAAK,MAAM,OAAO;AAGzB;AACA,SAASC,IAAI,EAAEC,MAAM,EAAEC,SAAS,QAAQ,OAAO;AAC/C,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,iBAAiB,QAAQ,oDAAoD;AAAC,IAEjFC,kBAAkB,0BAAAC,cAAA;EAAA,SAAAD,mBAAA;IAAAE,eAAA,OAAAF,kBAAA;IAAA,OAAAG,UAAA,OAAAH,kBAAA,EAAAI,SAAA;EAAA;EAAAC,SAAA,CAAAL,kBAAA,EAAAC,cAAA;EAAA,OAAAK,YAAA,CAAAN,kBAAA;IAAAO,GAAA;IAAAC,GAAA,EAStB,SAAAA,IAAA,EAAuB;MACrB,IAAAC,aAAA,GAA4D,IAAI,CAACC,OAAO;QAAhEC,MAAM,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AA,CAAxC/E,kBAAkB,iBAKD,YAAY;AAAA+E,eAAA,CAL7B/E,kBAAkB,aAOL,CAACT,WAAW,CAACQ,iBAAiB,CAAC,CAAC;AAuFnD,OAAO,IAAMiF,SAAwB,GAAG1F,eAAe,CAACU,kBAAkB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadarChart.type.js","names":[],"sources":["../../../../src/component/Chart/RadarChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type RadarChartData = Record<string, string[] | number[]>;\n\nexport type RadarChartProps = BaseChartProps<RadarChartData> & {\n groupKey: string;\n scale?: ScaleLinear<any, any>;\n xScale?: never;\n yScale?: never;\n showDots?: boolean;\n circle?: boolean;\n /** Callback triggered when a user clicks on a chart at a position corresponding to a category */\n onClickRadar?: (index: number, e: React.SyntheticEvent) => void;\n};\n\nexport type RadarChartType = Intergalactic.Component<typeof Flex, RadarChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"RadarChart.type.js","names":[],"sources":["../../../../src/component/Chart/RadarChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type RadarChartData = Record<string, string[] | number[]>;\n\nexport type RadarChartProps = Intergalactic.InternalTypings.EfficientOmit<\n BaseChartProps<RadarChartData>,\n 'showTotalInTooltip' | 'showPercentValueInTooltip'\n> & {\n groupKey: string;\n scale?: ScaleLinear<any, any>;\n xScale?: never;\n yScale?: never;\n showDots?: boolean;\n circle?: boolean;\n /** Callback triggered when a user clicks on a chart at a position corresponding to a category */\n onClickRadar?: (index: number, e: React.SyntheticEvent) => void;\n};\n\nexport type RadarChartType = Intergalactic.Component<typeof Flex, RadarChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -118,12 +118,8 @@ var ScatterPlotChartComponent = /*#__PURE__*/function (_AbstractChart) {
|
|
|
118
118
|
var _this = this;
|
|
119
119
|
var _this$asProps5 = this.asProps,
|
|
120
120
|
data = _this$asProps5.data,
|
|
121
|
-
groupKey = _this$asProps5.groupKey
|
|
122
|
-
showTooltip = _this$asProps5.showTooltip;
|
|
121
|
+
groupKey = _this$asProps5.groupKey;
|
|
123
122
|
var dataDefinitions = this.state.dataDefinitions;
|
|
124
|
-
if (!showTooltip) {
|
|
125
|
-
return null;
|
|
126
|
-
}
|
|
127
123
|
return dataDefinitions.filter(function (item) {
|
|
128
124
|
return item.checked;
|
|
129
125
|
}).map(function (item) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScatterPlotChart.js","names":["createComponent","i18nEnhance","Text","scaleLinear","scaleTime","React","minMax","ScatterPlot","getScatterPlotRadius","AbstractChart","localizedMessages","ScatterPlotChartComponent","_AbstractChart","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","get","_this$props","props","data","groupKey","valueKey","Object","keys","filter","_this$asProps","asProps","xScale","_this$asProps$marginY","marginY","plotWidth","radius","getValueScale","_toConsumableArray","flatValues","testItem","range","plotPadding","domain","Date","Number","isNaN","getMilliseconds","_this$asProps2","yScale","_this$asProps2$margin","marginX","plotHeight","max","Math","apply","min","_this$asProps3","reduce","result","item","entries","forEach","_ref","_ref2","_slicedToArray","value","add","Set","renderChart","_this$asProps4","onClickScatterItem","dataDefinitions","state","map","checked","createElement","onClick","x","y","id","color","renderTooltip","_this","_this$asProps5","showTooltip","Tooltip","wMin","_ref3","index","children","Fragment","Dot","tag","tooltipValueFormatter","getLegendAriaLabel","getI18nText","chartType","_defineProperty","direction","showXAxis","showYAxis","showLegend","ScatterPlotChart"],"sources":["../../../../src/component/Chart/ScatterPlotChart.tsx"],"sourcesContent":["import { createComponent } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { Text } from '@semcore/typography';\nimport { type ScaleLinear, scaleLinear, scaleTime } from 'd3-scale';\nimport React from 'react';\n\n// @ts-ignore\nimport { minMax, ScatterPlot, getScatterPlotRadius } from '../..';\nimport { AbstractChart } from './AbstractChart';\nimport type { BaseChartProps, ListData } from './AbstractChart.type';\nimport type {\n ScatterPlotChartData,\n ScatterPlotChartProps,\n ScatterPlotChartType,\n} from './ScatterPlotChart.type';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\n\nclass ScatterPlotChartComponent extends AbstractChart<\n ScatterPlotChartData,\n ScatterPlotChartProps,\n typeof ScatterPlotChartComponent.enhance\n> {\n static displayName = 'Chart.ScatterPlot';\n public static defaultProps: Partial<BaseChartProps<ListData>> = {\n direction: 'column',\n showXAxis: true,\n showYAxis: true,\n showTooltip: true,\n showLegend: false,\n };\n\n static enhance = [i18nEnhance(localizedMessages)] as const;\n\n protected get dataKeys(): string[] {\n const { data, groupKey, valueKey } = this.props;\n\n return Object.keys(data[0]).filter((key) => key !== groupKey && key !== valueKey);\n }\n\n protected get xScale() {\n const { xScale, marginY = 30, plotWidth, data, groupKey, valueKey } = this.asProps;\n\n if (xScale) {\n return xScale;\n }\n\n const radius = getScatterPlotRadius(valueKey) / this.getValueScale([...this.flatValues]);\n const testItem = data[0][groupKey];\n const range = [marginY, plotWidth - this.plotPadding];\n const domain = minMax(data, groupKey);\n\n if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {\n return scaleTime([domain[0] - radius, domain[1] + radius], range);\n }\n\n return scaleLinear([domain[0] - radius, domain[1] + radius], range);\n }\n\n protected get yScale(): ScaleLinear<any, any> {\n const { yScale, marginX = 30, plotHeight, valueKey } = this.asProps;\n\n if (yScale) {\n return yScale;\n }\n\n const flatValues = this.flatValues;\n const radius = getScatterPlotRadius(valueKey) / this.getValueScale([...flatValues]);\n\n const max = Math.max(...flatValues) + radius;\n const min = Math.min(...flatValues) - radius;\n\n return scaleLinear()\n .range([plotHeight - marginX, this.plotPadding])\n .domain([min, max]);\n }\n\n protected get flatValues(): Set<number> {\n const { data, groupKey, valueKey } = this.asProps;\n\n const flatValues = data.reduce<Set<number>>((result, item) => {\n Object.entries(item).forEach(([key, value]) => {\n if (key !== groupKey && key !== valueKey && typeof value === 'number') {\n result.add(value);\n }\n });\n\n return result;\n }, new Set());\n\n return flatValues;\n }\n\n protected renderChart() {\n const { groupKey, valueKey, onClickScatterItem } = this.asProps;\n const { dataDefinitions } = this.state;\n\n return dataDefinitions.map((item) => {\n return (\n item.checked && (\n <ScatterPlot onClick={onClickScatterItem} x={groupKey} y={item.id} key={item.id} color={item.color} value={valueKey} />\n )\n );\n });\n }\n\n protected renderTooltip() {\n const { data, groupKey, showTooltip } = this.asProps;\n const { dataDefinitions } = this.state;\n\n if (!showTooltip) {\n return null;\n }\n\n return dataDefinitions\n .filter((item) => item.checked)\n .map((item) => {\n return (\n <ScatterPlot.Tooltip key={item.id} x={groupKey} y={item.id} wMin={100}>\n {({ index, x, y }: any) => {\n return {\n children: (\n <>\n <ScatterPlot.Tooltip.Dot color={item.color}>Data</ScatterPlot.Tooltip.Dot>\n <Text tag='div'>\n X axis\n {this.tooltipValueFormatter(data[index][x])}\n </Text>\n <Text tag='div'>\n Y axis\n {this.tooltipValueFormatter(data[index][y])}\n </Text>\n </>\n ),\n };\n }}\n </ScatterPlot.Tooltip>\n );\n });\n }\n\n protected getLegendAriaLabel(): string {\n return this.asProps.getI18nText('legendForChart', { chartType: 'ScatterPlot' });\n }\n}\n\nexport const ScatterPlotChart: ScatterPlotChartType = createComponent(ScatterPlotChartComponent);\n"],"mappings":";;;;;;;AAAA,SAASA,eAAe,QAAQ,eAAe;AAC/C,OAAOC,WAAW,MAAM,8CAA8C;AACtE,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,SAA2BC,WAAW,EAAEC,SAAS,QAAQ,UAAU;AACnE,OAAOC,KAAK,MAAM,OAAO;;AAE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,SAAS,EAAE,IAAI;EACfhB,WAAW,EAAE,IAAI;EACjBiB,UAAU,EAAE;AACd,CAAC;AAAAJ,eAAA,CAZGrF,yBAAyB,aAcZ,CAACV,WAAW,CAACS,iBAAiB,CAAC,CAAC;AAkHnD,OAAO,IAAM2F,gBAAsC,GAAGrG,eAAe,CAACW,yBAAyB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ScatterPlotChart.js","names":["createComponent","i18nEnhance","Text","scaleLinear","scaleTime","React","minMax","ScatterPlot","getScatterPlotRadius","AbstractChart","localizedMessages","ScatterPlotChartComponent","_AbstractChart","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","get","_this$props","props","data","groupKey","valueKey","Object","keys","filter","_this$asProps","asProps","xScale","_this$asProps$marginY","marginY","plotWidth","radius","getValueScale","_toConsumableArray","flatValues","testItem","range","plotPadding","domain","Date","Number","isNaN","getMilliseconds","_this$asProps2","yScale","_this$asProps2$margin","marginX","plotHeight","max","Math","apply","min","_this$asProps3","reduce","result","item","entries","forEach","_ref","_ref2","_slicedToArray","value","add","Set","renderChart","_this$asProps4","onClickScatterItem","dataDefinitions","state","map","checked","createElement","onClick","x","y","id","color","renderTooltip","_this","_this$asProps5","Tooltip","wMin","_ref3","index","children","Fragment","Dot","tag","tooltipValueFormatter","getLegendAriaLabel","getI18nText","chartType","_defineProperty","direction","showXAxis","showYAxis","showTooltip","showLegend","ScatterPlotChart"],"sources":["../../../../src/component/Chart/ScatterPlotChart.tsx"],"sourcesContent":["import { createComponent } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { Text } from '@semcore/typography';\nimport { type ScaleLinear, scaleLinear, scaleTime } from 'd3-scale';\nimport React from 'react';\n\n// @ts-ignore\nimport { minMax, ScatterPlot, getScatterPlotRadius } from '../..';\nimport { AbstractChart } from './AbstractChart';\nimport type { BaseChartProps, ListData } from './AbstractChart.type';\nimport type {\n ScatterPlotChartData,\n ScatterPlotChartProps,\n ScatterPlotChartType,\n} from './ScatterPlotChart.type';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\n\nclass ScatterPlotChartComponent extends AbstractChart<\n ScatterPlotChartData,\n ScatterPlotChartProps,\n typeof ScatterPlotChartComponent.enhance\n> {\n static displayName = 'Chart.ScatterPlot';\n public static defaultProps: Partial<BaseChartProps<ListData>> = {\n direction: 'column',\n showXAxis: true,\n showYAxis: true,\n showTooltip: true,\n showLegend: false,\n };\n\n static enhance = [i18nEnhance(localizedMessages)] as const;\n\n protected get dataKeys(): string[] {\n const { data, groupKey, valueKey } = this.props;\n\n return Object.keys(data[0]).filter((key) => key !== groupKey && key !== valueKey);\n }\n\n protected get xScale() {\n const { xScale, marginY = 30, plotWidth, data, groupKey, valueKey } = this.asProps;\n\n if (xScale) {\n return xScale;\n }\n\n const radius = getScatterPlotRadius(valueKey) / this.getValueScale([...this.flatValues]);\n const testItem = data[0][groupKey];\n const range = [marginY, plotWidth - this.plotPadding];\n const domain = minMax(data, groupKey);\n\n if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {\n return scaleTime([domain[0] - radius, domain[1] + radius], range);\n }\n\n return scaleLinear([domain[0] - radius, domain[1] + radius], range);\n }\n\n protected get yScale(): ScaleLinear<any, any> {\n const { yScale, marginX = 30, plotHeight, valueKey } = this.asProps;\n\n if (yScale) {\n return yScale;\n }\n\n const flatValues = this.flatValues;\n const radius = getScatterPlotRadius(valueKey) / this.getValueScale([...flatValues]);\n\n const max = Math.max(...flatValues) + radius;\n const min = Math.min(...flatValues) - radius;\n\n return scaleLinear()\n .range([plotHeight - marginX, this.plotPadding])\n .domain([min, max]);\n }\n\n protected get flatValues(): Set<number> {\n const { data, groupKey, valueKey } = this.asProps;\n\n const flatValues = data.reduce<Set<number>>((result, item) => {\n Object.entries(item).forEach(([key, value]) => {\n if (key !== groupKey && key !== valueKey && typeof value === 'number') {\n result.add(value);\n }\n });\n\n return result;\n }, new Set());\n\n return flatValues;\n }\n\n protected renderChart() {\n const { groupKey, valueKey, onClickScatterItem } = this.asProps;\n const { dataDefinitions } = this.state;\n\n return dataDefinitions.map((item) => {\n return (\n item.checked && (\n <ScatterPlot onClick={onClickScatterItem} x={groupKey} y={item.id} key={item.id} color={item.color} value={valueKey} />\n )\n );\n });\n }\n\n protected renderTooltip() {\n const { data, groupKey } = this.asProps;\n const { dataDefinitions } = this.state;\n\n return dataDefinitions\n .filter((item) => item.checked)\n .map((item) => {\n return (\n <ScatterPlot.Tooltip key={item.id} x={groupKey} y={item.id} wMin={100}>\n {({ index, x, y }: any) => {\n return {\n children: (\n <>\n <ScatterPlot.Tooltip.Dot color={item.color}>Data</ScatterPlot.Tooltip.Dot>\n <Text tag='div'>\n X axis\n {this.tooltipValueFormatter(data[index][x])}\n </Text>\n <Text tag='div'>\n Y axis\n {this.tooltipValueFormatter(data[index][y])}\n </Text>\n </>\n ),\n };\n }}\n </ScatterPlot.Tooltip>\n );\n });\n }\n\n protected getLegendAriaLabel(): string {\n return this.asProps.getI18nText('legendForChart', { chartType: 'ScatterPlot' });\n }\n}\n\nexport const ScatterPlotChart: ScatterPlotChartType = createComponent(ScatterPlotChartComponent);\n"],"mappings":";;;;;;;AAAA,SAASA,eAAe,QAAQ,eAAe;AAC/C,OAAOC,WAAW,MAAM,8CAA8C;AACtE,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,SAA2BC,WAAW,EAAEC,SAAS,QAAQ,UAAU;AACnE,OAAOC,KAAK,MAAM,OAAO;;AAEzB;AACA,SAASC,MAAM,EAAEC,WAAW,EAAEC,oBAAoB,QAAQ,OAAO;AACjE,SAASC,aAAa,QAAQ,iBAAiB;AAO/C,SAASC,iBAAiB,QAAQ,oDAAoD;AAAC,IAEjFC,yBAAyB,0BAAAC,cAAA;EAAA,SAAAD,0BAAA;IAAAE,eAAA,OAAAF,yBAAA;IAAA,OAAAG,UAAA,OAAAH,yBAAA,EAAAI,SAAA;EAAA;EAAAC,SAAA,CAAAL,yBAAA,EAA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AACnE,WAAW,CAAC4E,OAAO,CAACM,GAAG;cAACV,KAAK,EAAErB,IAAI,CAACqB;YAAM,GAAC,MAA6B,CAAC,eAC1E1E,KAAA,CAAAqE,aAAA,CAACxE,IAAI;cAACwF,GAAG,EAAC;YAAK,GAAC,QAEd,EAACT,KAAI,CAACU,qBAAqB,CAACrE,IAAI,CAACgE,KAAK,CAAC,CAACV,CAAC,CAAC,CACtC,CAAC,eACPvE,KAAA,CAAAqE,aAAA,CAACxE,IAAI;cAACwF,GAAG,EAAC;YAAK,GAAC,QAEd,EAACT,KAAI,CAACU,qBAAqB,CAACrE,IAAI,CAACgE,KAAK,CAAC,CAACT,CAAC,CAAC,CACtC,CACN;UAEN,CAAC;QACH,CACmB,CAAC;MAE1B,CAAC,CAAC;IACN;EAAC;IAAA3D,GAAA;IAAA8C,KAAA,EAED,SAAU4B,kBAAkBA,CAAA,EAAW;MACrC,OAAO,IAAI,CAAC/D,OAAO,CAACgE,WAAW,CAAC,gBAAgB,EAAE;QAAEC,SAAS,EAAE;MAAc,CAAC,CAAC;IACjF;EAAC;AAAA,EAzHqCrF,aAAa;AAAAsF,eAAA,CAA/CpF,yBAAyB,iBAKR,mBAAmB;AAAAoF,eAAA,CALpCpF,yBAAyB,kBAMmC;EAC9DqF,SAAS,EAAE,QAAQ;EACnBC,SAAS,EAAE,IAAI;EACfC,SAAS,EAAE,IAAI;EACfC,WAAW,EAAE,IAAI;EACjBC,UAAU,EAAE;AACd,CAAC;AAAAL,eAAA,CAZGpF,yBAAyB,aAcZ,CAACV,WAAW,CAACS,iBAAiB,CAAC,CAAC;AA8GnD,OAAO,IAAM2F,gBAAsC,GAAGrG,eAAe,CAACW,yBAAyB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScatterPlotChart.type.js","names":[],"sources":["../../../../src/component/Chart/ScatterPlotChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\nexport type ScatterPlotChartData = Array<Record<string, number | typeof interpolateValue | Date>>;\n\nexport type ScatterPlotChartProps = BaseChartProps<ScatterPlotChartData> & {\n /** Field name that groups the data points */\n groupKey: string;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Optional field name for additional value data */\n valueKey?: string;\n /** Callback triggered when a user clicks on a scatter item */\n onClickScatterItem?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type ScatterPlotChartType = Intergalactic.Component<typeof Flex, ScatterPlotChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ScatterPlotChart.type.js","names":[],"sources":["../../../../src/component/Chart/ScatterPlotChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\nexport type ScatterPlotChartData = Array<Record<string, number | typeof interpolateValue | Date>>;\n\nexport type ScatterPlotChartProps = Intergalactic.InternalTypings.EfficientOmit<\n BaseChartProps<ScatterPlotChartData>,\n 'showTotalInTooltip'\n> & {\n /** Field name that groups the data points */\n groupKey: string;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Optional field name for additional value data */\n valueKey?: string;\n /** Callback triggered when a user clicks on a scatter item */\n onClickScatterItem?: (index: number, event: React.SyntheticEvent) => void;\n};\n\nexport type ScatterPlotChartType = Intergalactic.Component<typeof Flex, ScatterPlotChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -110,10 +110,6 @@ var VennChartComponent = /*#__PURE__*/function (_AbstractChart) {
|
|
|
110
110
|
}, {
|
|
111
111
|
key: "renderTooltip",
|
|
112
112
|
value: function renderTooltip() {
|
|
113
|
-
var showTooltip = this.asProps.showTooltip;
|
|
114
|
-
if (!showTooltip) {
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
113
|
return /*#__PURE__*/React.createElement(Venn.Tooltip, null, function (_ref) {
|
|
118
114
|
var name = _ref.name,
|
|
119
115
|
dataKey = _ref.dataKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VennChart.js","names":["createComponent","i18nEnhance","Text","scaleLinear","React","Venn","AbstractChart","localizedMessages","VennChartComponent","_AbstractChart","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","get","xScale","asProps","yScale","data","props","legendKeys","Object","keys","filter","item","isIntersection","test","value","defaultLegendProps","legendType","renderChart","_this$asProps","onClickVennItem","_this$state","state","dataDefinitions","highlightedLine","checkedLegendItems","checked","checkedLegendItemsMap","reduce","result","id","intersections","dataKey","push","createElement","onClick","map","index","Circle","name","label","color","transparent","intersectionKey","intersectionKeys","split","hasDisabledItems","some","undefined","_dataDefinitions$find","find","legendItem","join","Intersection","renderTooltip","
|
|
1
|
+
{"version":3,"file":"VennChart.js","names":["createComponent","i18nEnhance","Text","scaleLinear","React","Venn","AbstractChart","localizedMessages","VennChartComponent","_AbstractChart","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","get","xScale","asProps","yScale","data","props","legendKeys","Object","keys","filter","item","isIntersection","test","value","defaultLegendProps","legendType","renderChart","_this$asProps","onClickVennItem","_this$state","state","dataDefinitions","highlightedLine","checkedLegendItems","checked","checkedLegendItemsMap","reduce","result","id","intersections","dataKey","push","createElement","onClick","map","index","Circle","name","label","color","transparent","intersectionKey","intersectionKeys","split","hasDisabledItems","some","undefined","_dataDefinitions$find","find","legendItem","join","Intersection","renderTooltip","Tooltip","_ref","children","Fragment","Title","bold","getLegendAriaLabel","getI18nText","chartType","_defineProperty","direction","alignItems","marginY","marginX","VennChart"],"sources":["../../../../src/component/Chart/VennChart.tsx"],"sourcesContent":["import { createComponent } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { Text } from '@semcore/typography';\nimport { scaleLinear } from 'd3-scale';\nimport React from 'react';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n// @ts-ignore\nimport { Venn } from '../..';\nimport { AbstractChart } from './AbstractChart';\nimport type { VennChartData, VennChartProps, VennChartType } from './VennChart.type';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\nimport type { LegendItem } from '../ChartLegend/LegendItem/LegendItem.type';\n\nclass VennChartComponent extends AbstractChart<\n VennChartData,\n VennChartProps,\n typeof VennChartComponent.enhance\n> {\n static displayName = 'Chart.Venn';\n\n static defaultProps: Partial<BaseChartProps<VennChartData>> = {\n direction: 'row-reverse',\n alignItems: 'flex-start',\n marginY: 0,\n marginX: 0,\n };\n\n static enhance = [i18nEnhance(localizedMessages)] as const;\n\n get xScale() {\n const { xScale } = this.asProps;\n\n if (xScale) {\n return xScale;\n }\n\n return scaleLinear();\n }\n\n get yScale() {\n const { yScale } = this.asProps;\n\n if (yScale) {\n return yScale;\n }\n\n return scaleLinear();\n }\n\n protected get dataKeys(): string[] {\n const { data } = this.props;\n\n const legendKeys: string[] = Object.keys(data).filter((item) => {\n const isIntersection = /\\//.test(item);\n\n return !isIntersection;\n });\n\n return legendKeys;\n }\n\n defaultLegendProps() {\n return {\n legendType: 'Table' as const,\n };\n }\n\n renderChart() {\n const { data, onClickVennItem } = this.asProps;\n const { dataDefinitions, highlightedLine } = this.state;\n\n const checkedLegendItems = dataDefinitions.filter((item) => item.checked);\n const checkedLegendItemsMap = checkedLegendItems.reduce<Record<string, LegendItem>>(\n (result, item) => {\n result[item.id] = item;\n\n return result;\n },\n {},\n );\n\n const intersections = Object.keys(data).reduce<string[]>((result, dataKey) => {\n const isIntersection = /\\//.test(dataKey);\n\n if (isIntersection) {\n result.push(dataKey);\n }\n\n return result;\n }, []);\n\n return (\n <Venn onClick={onClickVennItem}>\n {checkedLegendItems.map((item, index) => {\n return (\n <Venn.Circle\n key={item.id}\n dataKey={item.id}\n name={item.label}\n color={item.color}\n transparent={highlightedLine !== -1 && highlightedLine !== index}\n />\n );\n })}\n\n {intersections.map((intersectionKey) => {\n const intersectionKeys = intersectionKey.split('/');\n\n const hasDisabledItems = intersectionKeys.some((key) => {\n return checkedLegendItemsMap[key] === undefined;\n });\n\n if (hasDisabledItems) {\n return null;\n }\n\n const name = intersectionKeys\n .map((id) => {\n return dataDefinitions.find((legendItem) => legendItem.id === id)?.label || '';\n })\n .join(' & ');\n\n return <Venn.Intersection key={intersectionKey} dataKey={intersectionKey} name={name} />;\n })}\n </Venn>\n );\n }\n\n renderTooltip() {\n return (\n <Venn.Tooltip>\n {({ name, dataKey, data }: any) => {\n return {\n children: (\n <>\n <Venn.Tooltip.Title>{name}</Venn.Tooltip.Title>\n <Text bold>{data[dataKey]}</Text>\n </>\n ),\n };\n }}\n </Venn.Tooltip>\n );\n }\n\n protected getLegendAriaLabel(): string {\n return this.asProps.getI18nText('legendForChart', { chartType: 'Venn' });\n }\n}\n\nexport const VennChart: VennChartType = createComponent(VennChartComponent);\n"],"mappings":";;;;;AAAA,SAASA,eAAe,QAAQ,eAAe;AAC/C,OAAOC,WAAW,MAAM,8CAA8C;AACtE,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,SAASC,WAAW,QAAQ,UAAU;AACtC,OAAOC,KAAK,MAAM,OAAO;AAGzB;AACA,SAASC,IAAI,QAAQ,OAAO;AAC5B,SAASC,aAAa,QAAQ,iBAAiB;AAE/C,SAASC,iBAAiB,QAAQ,oDAAoD;AAAC,IAGjFC,kBAAkB,0BAAAC,cAAA;EAAA,SAAAD,mBAAA;IAAAE,eAAA,OAAAF,kBAAA;IAAA,OAAAG,UAAA,OAAAH,kBAAA,EAAAI,SAAA;EAAA;EAAAC,SAAA,CAAAL,kBAAA,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,OAAO,CAAQ,CAChC;QAEN,CAAC;MACH,CACY,CAAC;IAEnB;EAAC;IAAA/B,GAAA;IAAAc,KAAA,EAED,SAAU8C,kBAAkBA,CAAA,EAAW;MACrC,OAAO,IAAI,CAACzD,OAAO,CAAC0D,WAAW,CAAC,gBAAgB,EAAE;QAAEC,SAAS,EAAE;MAAO,CAAC,CAAC;IAC1E;EAAC;AAAA,EAtI8BvE,aAAa;AAAAwE,eAAA,CAAxCtE,kBAAkB,iBAKD,YAAY;AAAAsE,eAAA,CAL7BtE,kBAAkB,kBAOwC;EAC5DuE,SAAS,EAAE,aAAa;EACxBC,UAAU,EAAE,YAAY;EACxBC,OAAO,EAAE,CAAC;EACVC,OAAO,EAAE;AACX,CAAC;AAAAJ,eAAA,CAZGtE,kBAAkB,aAcL,CAACP,WAAW,CAACM,iBAAiB,CAAC,CAAC;AA2HnD,OAAO,IAAM4E,SAAwB,GAAGnF,eAAe,CAACQ,kBAAkB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VennChart.type.js","names":[],"sources":["../../../../src/component/Chart/VennChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type DataKey = string;\n\nexport type VennChartData = Record<DataKey, number>;\n\nexport type VennChartProps = BaseChartProps<VennChartData> & {\n /** Internal */\n groupKey?: never;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Callback triggered when a user clicks on a circle */\n onClickVennItem?: (key: DataKey, e: React.SyntheticEvent) => void;\n};\n\nexport type VennChartType = Intergalactic.Component<typeof Flex, VennChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"VennChart.type.js","names":[],"sources":["../../../../src/component/Chart/VennChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear } from 'd3-scale';\n\nimport type { BaseChartProps } from './AbstractChart.type';\n\nexport type DataKey = string;\n\nexport type VennChartData = Record<DataKey, number>;\n\nexport type VennChartProps = Intergalactic.InternalTypings.EfficientOmit<\n BaseChartProps<VennChartData>,\n 'showTotalInTooltip'\n> & {\n /** Internal */\n groupKey?: never;\n /** Custom x-axis scale */\n xScale?: ScaleLinear<any, any>;\n /** Custom y-axis scale */\n yScale?: ScaleLinear<any, any>;\n /** Callback triggered when a user clicks on a circle */\n onClickVennItem?: (key: DataKey, e: React.SyntheticEvent) => void;\n};\n\nexport type VennChartType = Intergalactic.Component<typeof Flex, VennChartProps>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -13,12 +13,12 @@ import Divider from '@semcore/divider';
|
|
|
13
13
|
import { Flex } from '@semcore/flex-box';
|
|
14
14
|
import React from 'react';
|
|
15
15
|
/*!__reshadow-styles__:"./legend-flex.shadow.css"*/
|
|
16
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
16
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendFlex_qzq5k_gg_._direction_row_qzq5k_gg_{align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:8px 16px}.___SLegendFlex_qzq5k_gg_._direction_column_qzq5k_gg_{align-items:flex-start;flex-wrap:wrap;gap:8px}", /*__inner_css_end__*/"qzq5k_gg_"),
|
|
17
17
|
/*__reshadow_css_end__*/
|
|
18
18
|
{
|
|
19
|
-
"__SLegendFlex": "
|
|
20
|
-
"_direction_row": "
|
|
21
|
-
"_direction_column": "
|
|
19
|
+
"__SLegendFlex": "___SLegendFlex_qzq5k_gg_",
|
|
20
|
+
"_direction_row": "_direction_row_qzq5k_gg_",
|
|
21
|
+
"_direction_column": "_direction_column_qzq5k_gg_"
|
|
22
22
|
});
|
|
23
23
|
import { localizedMessages } from '../../../translations/__intergalactic-dynamic-locales';
|
|
24
24
|
import { BaseLegend } from '../BaseLegend';
|
|
@@ -21,25 +21,25 @@ import { Flex, Box } from '@semcore/flex-box';
|
|
|
21
21
|
import { Text as TypographyText } from '@semcore/typography';
|
|
22
22
|
import React from 'react';
|
|
23
23
|
/*!__reshadow-styles__:"./legend-item.shadow.css"*/
|
|
24
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
24
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendItem_g4xlu_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_g4xlu_gg_:hover{cursor:pointer}.___SLegendItem_g4xlu_gg_.__disabled_g4xlu_gg_:hover{cursor:default}}.___SPointShape_g4xlu_gg_.__color_g4xlu_gg_{background-color:var(--color_g4xlu);margin-right:8px;flex-shrink:0}.___SPointShape_g4xlu_gg_._shape_Circle_g4xlu_gg_._size_l_g4xlu_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_g4xlu_gg_._shape_Circle_g4xlu_gg_._size_m_g4xlu_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_g4xlu_gg_._shape_Line_g4xlu_gg_._size_l_g4xlu_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_g4xlu_gg_._shape_Line_g4xlu_gg_._size_m_g4xlu_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_g4xlu_gg_._shape_Square_g4xlu_gg_._size_l_g4xlu_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_g4xlu_gg_._shape_Square_g4xlu_gg_._size_m_g4xlu_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SPointShape_g4xlu_gg_._shape_Pattern_g4xlu_gg_{background-color:transparent;margin-right:4px}.___SIcon_g4xlu_gg_{line-height:0;margin-right:4px}.___SIcon_g4xlu_gg_._size_l_g4xlu_gg_{margin-top:4px}.___SIcon_g4xlu_gg_._size_m_g4xlu_gg_{margin-top:2px}.___SLabel_g4xlu_gg_{min-width:0}.___SAdditionalLabel_g4xlu_gg_._size_l_g4xlu_gg_,.___SCount_g4xlu_gg_._size_l_g4xlu_gg_,.___SLabel_g4xlu_gg_._size_l_g4xlu_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SAdditionalLabel_g4xlu_gg_._size_m_g4xlu_gg_,.___SCount_g4xlu_gg_._size_m_g4xlu_gg_,.___SLabel_g4xlu_gg_._size_m_g4xlu_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SAdditionalLabel_g4xlu_gg_,.___SCount_g4xlu_gg_{margin-left:4px}.___SAdditionalLabel_g4xlu_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_g4xlu_gg_::before{content:\"\";display:inline-block;background-color:var(--intergalactic-text-secondary, #6c6e79);height:4px;width:4px;border-radius:2px;margin-right:4px}.___SAdditionalLabel_g4xlu_gg_._size_l_g4xlu_gg_::before{margin-top:10px}.___SAdditionalLabel_g4xlu_gg_._size_m_g4xlu_gg_::before{margin-top:8px}.___SPatternSymbol_g4xlu_gg_{transform:scale(.8)}", /*__inner_css_end__*/"g4xlu_gg_"),
|
|
25
25
|
/*__reshadow_css_end__*/
|
|
26
26
|
{
|
|
27
|
-
"__SLegendItem": "
|
|
28
|
-
"_disabled": "
|
|
29
|
-
"__SPointShape": "
|
|
30
|
-
"_color": "
|
|
31
|
-
"--color": "--
|
|
32
|
-
"_shape_Circle": "
|
|
33
|
-
"_size_l": "
|
|
34
|
-
"_size_m": "
|
|
35
|
-
"_shape_Line": "
|
|
36
|
-
"_shape_Square": "
|
|
37
|
-
"_shape_Pattern": "
|
|
38
|
-
"__SIcon": "
|
|
39
|
-
"__SLabel": "
|
|
40
|
-
"__SAdditionalLabel": "
|
|
41
|
-
"__SCount": "
|
|
42
|
-
"__SPatternSymbol": "
|
|
27
|
+
"__SLegendItem": "___SLegendItem_g4xlu_gg_",
|
|
28
|
+
"_disabled": "__disabled_g4xlu_gg_",
|
|
29
|
+
"__SPointShape": "___SPointShape_g4xlu_gg_",
|
|
30
|
+
"_color": "__color_g4xlu_gg_",
|
|
31
|
+
"--color": "--color_g4xlu",
|
|
32
|
+
"_shape_Circle": "_shape_Circle_g4xlu_gg_",
|
|
33
|
+
"_size_l": "_size_l_g4xlu_gg_",
|
|
34
|
+
"_size_m": "_size_m_g4xlu_gg_",
|
|
35
|
+
"_shape_Line": "_shape_Line_g4xlu_gg_",
|
|
36
|
+
"_shape_Square": "_shape_Square_g4xlu_gg_",
|
|
37
|
+
"_shape_Pattern": "_shape_Pattern_g4xlu_gg_",
|
|
38
|
+
"__SIcon": "___SIcon_g4xlu_gg_",
|
|
39
|
+
"__SLabel": "___SLabel_g4xlu_gg_",
|
|
40
|
+
"__SAdditionalLabel": "___SAdditionalLabel_g4xlu_gg_",
|
|
41
|
+
"__SCount": "___SCount_g4xlu_gg_",
|
|
42
|
+
"__SPatternSymbol": "___SPatternSymbol_g4xlu_gg_"
|
|
43
43
|
});
|
|
44
44
|
import { StaticShapes } from './LegendItem.type';
|
|
45
45
|
import { PatternSymbol } from '../../../Pattern';
|
|
@@ -11,14 +11,14 @@ import { createComponent, sstyled, Root } from '@semcore/core';
|
|
|
11
11
|
import { Box } from '@semcore/flex-box';
|
|
12
12
|
import React from 'react';
|
|
13
13
|
/*!__reshadow-styles__:"./legend-table.shadow.css"*/
|
|
14
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
14
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendTable_12151_gg_.__columns-count_12151_gg_{font-feature-settings:\"tnum\";font-variant-numeric:tabular-nums;display:grid;grid-template-columns:auto .2fr;align-items:center;height:-moz-fit-content;height:fit-content;grid-column-gap:16px;grid-row-gap:8px}.___SColumnItem_12151_gg_._size_l_12151_gg_{font-size:var(--intergalactic-fs-300, 16px);text-align:right}.___SColumnItem_12151_gg_._size_m_12151_gg_{font-size:var(--intergalactic-fs-200, 14px);text-align:right}", /*__inner_css_end__*/"12151_gg_"),
|
|
15
15
|
/*__reshadow_css_end__*/
|
|
16
16
|
{
|
|
17
|
-
"__SLegendTable": "
|
|
18
|
-
"_columns-count": "__columns-
|
|
19
|
-
"__SColumnItem": "
|
|
20
|
-
"_size_l": "
|
|
21
|
-
"_size_m": "
|
|
17
|
+
"__SLegendTable": "___SLegendTable_12151_gg_",
|
|
18
|
+
"_columns-count": "__columns-count_12151_gg_",
|
|
19
|
+
"__SColumnItem": "___SColumnItem_12151_gg_",
|
|
20
|
+
"_size_l": "_size_l_12151_gg_",
|
|
21
|
+
"_size_m": "_size_m_12151_gg_"
|
|
22
22
|
});
|
|
23
23
|
import { BaseLegend } from '../BaseLegend';
|
|
24
24
|
import { LegendItemComponent } from '../LegendItem/LegendItem';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
STooltipChildrenWrapper {
|
|
2
|
+
display: grid;
|
|
3
|
+
column-gap: var(--intergalactic-spacing-2x, 8px);
|
|
4
|
+
|
|
5
|
+
&[columnsCount='2'] {
|
|
6
|
+
grid-template-columns: auto minmax(28px, max-content);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&[columnsCount='3'] {
|
|
10
|
+
grid-template-columns: auto minmax(28px, max-content) minmax(28px, max-content);
|
|
11
|
+
}
|
|
12
|
+
}
|
package/lib/esm/Area.mjs
CHANGED
|
@@ -21,21 +21,21 @@ var style = (
|
|
|
21
21
|
/*__reshadow_css_start__*/
|
|
22
22
|
(sstyled.insert(
|
|
23
23
|
/*__inner_css_start__*/
|
|
24
|
-
".
|
|
24
|
+
".___SArea_dh1yc_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);fill-opacity:.2}.___SArea_dh1yc_gg_.__color_dh1yc_gg_{fill:var(--color_dh1yc)}.___SArea_dh1yc_gg_.__pattern_dh1yc_gg_{fill:var(--pattern_dh1yc);fill-opacity:.7}.___SArea_dh1yc_gg_.__transparent_dh1yc_gg_{opacity:.3}.___SAreaLine_dh1yc_gg_{stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke-width:3;fill:transparent}.___SAreaLine_dh1yc_gg_.__color_dh1yc_gg_{stroke:var(--color_dh1yc)}.___SAreaLine_dh1yc_gg_.__transparent_dh1yc_gg_{opacity:.3}.___SAreaLine_dh1yc_gg_,.___SArea_dh1yc_gg_{transition-property:d;transition-duration:var(--duration_dh1yc);transition-timing-function:ease-in-out}.___SNull_dh1yc_gg_{fill:transparent;stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf);stroke-dasharray:4}.___SNull_dh1yc_gg_.__hide_dh1yc_gg_{display:none}",
|
|
25
25
|
/*__inner_css_end__*/
|
|
26
|
-
"
|
|
26
|
+
"dh1yc_gg_"
|
|
27
27
|
), /*__reshadow_css_end__*/
|
|
28
28
|
{
|
|
29
|
-
"__SArea": "
|
|
30
|
-
"_color": "
|
|
31
|
-
"--color": "--
|
|
32
|
-
"_pattern": "
|
|
33
|
-
"--pattern": "--
|
|
34
|
-
"_transparent": "
|
|
35
|
-
"__SAreaLine": "
|
|
36
|
-
"--duration": "--
|
|
37
|
-
"__SNull": "
|
|
38
|
-
"_hide": "
|
|
29
|
+
"__SArea": "___SArea_dh1yc_gg_",
|
|
30
|
+
"_color": "__color_dh1yc_gg_",
|
|
31
|
+
"--color": "--color_dh1yc",
|
|
32
|
+
"_pattern": "__pattern_dh1yc_gg_",
|
|
33
|
+
"--pattern": "--pattern_dh1yc",
|
|
34
|
+
"_transparent": "__transparent_dh1yc_gg_",
|
|
35
|
+
"__SAreaLine": "___SAreaLine_dh1yc_gg_",
|
|
36
|
+
"--duration": "--duration_dh1yc",
|
|
37
|
+
"__SNull": "___SNull_dh1yc_gg_",
|
|
38
|
+
"_hide": "__hide_dh1yc_gg_"
|
|
39
39
|
})
|
|
40
40
|
);
|
|
41
41
|
var AreaRoot = /* @__PURE__ */ (function(_Component) {
|
package/lib/esm/Axis.mjs
CHANGED
|
@@ -15,25 +15,25 @@ var style = (
|
|
|
15
15
|
/*__reshadow_css_start__*/
|
|
16
16
|
(sstyled.insert(
|
|
17
17
|
/*__inner_css_start__*/
|
|
18
|
-
".
|
|
18
|
+
".___SAxis_1e44w_gg_{stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SAxis_1e44w_gg_.__hide_1e44w_gg_,.___STick_1e44w_gg_.__hide_1e44w_gg_{display:none}.___STick_1e44w_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79)}.___SGrid_1e44w_gg_{fill:transparent;stroke:var(--intergalactic-border-secondary, #e0e1e9)}.___STitle_1e44w_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-text-hint, #6c6e79);transform-origin:var(--transform-origin_1e44w)}.___STitle_1e44w_gg_._position_top_1e44w_gg_{text-anchor:middle}.___STitle_1e44w_gg_._position_bottom_1e44w_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_1e44w_gg_._position_left_1e44w_gg_,.___STitle_1e44w_gg_._position_right_1e44w_gg_{transform:rotate(-90deg);text-anchor:middle;dominant-baseline:middle}.___STitle_1e44w_gg_._position_left_1e44w_gg_.__verticalWritingMode_1e44w_gg_,.___STitle_1e44w_gg_._position_right_1e44w_gg_.__verticalWritingMode_1e44w_gg_{writing-mode:vertical-rl;transform:none}.___STick_1e44w_gg_._position_top_1e44w_gg_{transform:translateY(-12px);text-anchor:middle}.___STick_1e44w_gg_._position_bottom_1e44w_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_1e44w_gg_._position_bottom_1e44w_gg_ tspan{dominant-baseline:hanging}.___STick_1e44w_gg_._position_right_1e44w_gg_{transform:translateX(16px);text-anchor:start;dominant-baseline:middle}.___STick_1e44w_gg_._position_left_1e44w_gg_ tspan,.___STick_1e44w_gg_._position_right_1e44w_gg_ tspan{dominant-baseline:middle}.___STick_1e44w_gg_._position_left_1e44w_gg_.__multiline_1e44w_gg_,.___STick_1e44w_gg_._position_left_1e44w_gg_.__multiline_1e44w_gg_ tspan,.___STick_1e44w_gg_._position_right_1e44w_gg_.__multiline_1e44w_gg_,.___STick_1e44w_gg_._position_right_1e44w_gg_.__multiline_1e44w_gg_ tspan{dominant-baseline:auto}.___STick_1e44w_gg_._position_left_1e44w_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}.___STick_1e44w_gg_._position_custom_0_1e44w_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_1e44w_gg_._position_custom_0_1e44w_gg_ tspan{dominant-baseline:hanging}.___STick_1e44w_gg_._position_custom_1_1e44w_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}.___STick_1e44w_gg_._position_custom_1_1e44w_gg_ tspan{dominant-baseline:middle}",
|
|
19
19
|
/*__inner_css_end__*/
|
|
20
|
-
"
|
|
20
|
+
"1e44w_gg_"
|
|
21
21
|
), /*__reshadow_css_end__*/
|
|
22
22
|
{
|
|
23
|
-
"__SAxis": "
|
|
24
|
-
"_hide": "
|
|
25
|
-
"__STick": "
|
|
26
|
-
"__SGrid": "
|
|
27
|
-
"__STitle": "
|
|
28
|
-
"--transform-origin": "--transform-
|
|
29
|
-
"_position_top": "
|
|
30
|
-
"_position_bottom": "
|
|
31
|
-
"_position_right": "
|
|
32
|
-
"_position_left": "
|
|
33
|
-
"_verticalWritingMode": "
|
|
34
|
-
"_multiline": "
|
|
35
|
-
"_position_custom_0": "
|
|
36
|
-
"_position_custom_1": "
|
|
23
|
+
"__SAxis": "___SAxis_1e44w_gg_",
|
|
24
|
+
"_hide": "__hide_1e44w_gg_",
|
|
25
|
+
"__STick": "___STick_1e44w_gg_",
|
|
26
|
+
"__SGrid": "___SGrid_1e44w_gg_",
|
|
27
|
+
"__STitle": "___STitle_1e44w_gg_",
|
|
28
|
+
"--transform-origin": "--transform-origin_1e44w",
|
|
29
|
+
"_position_top": "_position_top_1e44w_gg_",
|
|
30
|
+
"_position_bottom": "_position_bottom_1e44w_gg_",
|
|
31
|
+
"_position_right": "_position_right_1e44w_gg_",
|
|
32
|
+
"_position_left": "_position_left_1e44w_gg_",
|
|
33
|
+
"_verticalWritingMode": "__verticalWritingMode_1e44w_gg_",
|
|
34
|
+
"_multiline": "__multiline_1e44w_gg_",
|
|
35
|
+
"_position_custom_0": "_position_custom_0_1e44w_gg_",
|
|
36
|
+
"_position_custom_1": "_position_custom_1_1e44w_gg_"
|
|
37
37
|
})
|
|
38
38
|
);
|
|
39
39
|
var CUSTOM_0 = Symbol("custom_0");
|
package/lib/esm/Bar.mjs
CHANGED
|
@@ -17,26 +17,26 @@ var style = (
|
|
|
17
17
|
/*__reshadow_css_start__*/
|
|
18
18
|
(sstyled.insert(
|
|
19
19
|
/*__inner_css_start__*/
|
|
20
|
-
".
|
|
20
|
+
".___SBar_194w8_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_194w8);transition-timing-function:ease-in-out}.___SBar_194w8_gg_.__color_194w8_gg_{fill:var(--color_194w8)}.___SBar_194w8_gg_.__pattern_194w8_gg_.__color_194w8_gg_{fill:var(--pattern_194w8);stroke:var(--color_194w8);stroke-width:1px}.___SBar_194w8_gg_.__hide_194w8_gg_{display:none}.___SBar_194w8_gg_.__transparent_194w8_gg_{opacity:.3}.___SBackground_194w8_gg_.__onClick_194w8_gg_,.___SBar_194w8_gg_.__onClick_194w8_gg_{cursor:pointer}.___SBackground_194w8_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9)}.___SBarAnnotation_194w8_gg_{display:flex;justify-content:space-between}.___SBarLabel_194w8_gg_{color:var(--intergalactic-text-primary, #191b23);margin-right:auto}.___SBarLabel_194w8_gg_,.___SBarPercent_194w8_gg_,.___SBarValue_194w8_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SBarPercent_194w8_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SBarValue_194w8_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary, #191b23);text-align:right}.___SCompactHorizontalBarHoverRect_194w8_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}",
|
|
21
21
|
/*__inner_css_end__*/
|
|
22
|
-
"
|
|
22
|
+
"194w8_gg_"
|
|
23
23
|
), /*__reshadow_css_end__*/
|
|
24
24
|
{
|
|
25
|
-
"__SBar": "
|
|
26
|
-
"--duration": "--
|
|
27
|
-
"_color": "
|
|
28
|
-
"--color": "--
|
|
29
|
-
"_pattern": "
|
|
30
|
-
"--pattern": "--
|
|
31
|
-
"_hide": "
|
|
32
|
-
"_transparent": "
|
|
33
|
-
"_onClick": "
|
|
34
|
-
"__SBackground": "
|
|
35
|
-
"__SBarAnnotation": "
|
|
36
|
-
"__SBarLabel": "
|
|
37
|
-
"__SBarPercent": "
|
|
38
|
-
"__SBarValue": "
|
|
39
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
25
|
+
"__SBar": "___SBar_194w8_gg_",
|
|
26
|
+
"--duration": "--duration_194w8",
|
|
27
|
+
"_color": "__color_194w8_gg_",
|
|
28
|
+
"--color": "--color_194w8",
|
|
29
|
+
"_pattern": "__pattern_194w8_gg_",
|
|
30
|
+
"--pattern": "--pattern_194w8",
|
|
31
|
+
"_hide": "__hide_194w8_gg_",
|
|
32
|
+
"_transparent": "__transparent_194w8_gg_",
|
|
33
|
+
"_onClick": "__onClick_194w8_gg_",
|
|
34
|
+
"__SBackground": "___SBackground_194w8_gg_",
|
|
35
|
+
"__SBarAnnotation": "___SBarAnnotation_194w8_gg_",
|
|
36
|
+
"__SBarLabel": "___SBarLabel_194w8_gg_",
|
|
37
|
+
"__SBarPercent": "___SBarPercent_194w8_gg_",
|
|
38
|
+
"__SBarValue": "___SBarValue_194w8_gg_",
|
|
39
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_194w8_gg_"
|
|
40
40
|
})
|
|
41
41
|
);
|
|
42
42
|
var MIN_HEIGHT = 2;
|
package/lib/esm/Bubble.mjs
CHANGED
|
@@ -21,23 +21,23 @@ var style = (
|
|
|
21
21
|
/*__reshadow_css_start__*/
|
|
22
22
|
(sstyled.insert(
|
|
23
23
|
/*__inner_css_start__*/
|
|
24
|
-
".
|
|
24
|
+
".___SBubble_1d4b3_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:2px;transition-property:cx,cy;transition-duration:var(--duration_1d4b3);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SBubble_1d4b3_gg_:hover{opacity:.8}}g._visible_false_1d4b3_gg_{display:none}.___SBubble_1d4b3_gg_.__color_1d4b3_gg_{fill:var(--color_1d4b3)}.___SBubble_1d4b3_gg_.__pattern_1d4b3_gg_.__color_1d4b3_gg_{fill:var(--pattern_1d4b3);stroke:var(--color_1d4b3);stroke-width:1px}.___SBubble_1d4b3_gg_.__transparent_1d4b3_gg_{opacity:.3}.___SCenter_1d4b3_gg_{text-anchor:middle;font-size:calc(var(--intergalactic-fs-100, 12px) - 1px);stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SCenter_1d4b3_gg_.__color_1d4b3_gg_{stroke:var(--color_1d4b3)}.___SCenter_1d4b3_gg_.__transparent_1d4b3_gg_{opacity:.3}.___SLabel_1d4b3_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SLabel_1d4b3_gg_._position_right_1d4b3_gg_{text-anchor:end}.___SLabel_1d4b3_gg_._position_left_1d4b3_gg_{text-anchor:start}.___SLabel_1d4b3_gg_.__color_1d4b3_gg_{fill:var(--color_1d4b3)}.___SLabel_1d4b3_gg_.__transparent_1d4b3_gg_{opacity:.3}",
|
|
25
25
|
/*__inner_css_end__*/
|
|
26
|
-
"
|
|
26
|
+
"1d4b3_gg_"
|
|
27
27
|
), /*__reshadow_css_end__*/
|
|
28
28
|
{
|
|
29
|
-
"_visible_false": "
|
|
30
|
-
"__SBubble": "
|
|
31
|
-
"_color": "
|
|
32
|
-
"--color": "--
|
|
33
|
-
"_pattern": "
|
|
34
|
-
"--pattern": "--
|
|
35
|
-
"_transparent": "
|
|
36
|
-
"__SCenter": "
|
|
37
|
-
"__SLabel": "
|
|
38
|
-
"_position_right": "
|
|
39
|
-
"_position_left": "
|
|
40
|
-
"--duration": "--
|
|
29
|
+
"_visible_false": "_visible_false_1d4b3_gg_",
|
|
30
|
+
"__SBubble": "___SBubble_1d4b3_gg_",
|
|
31
|
+
"_color": "__color_1d4b3_gg_",
|
|
32
|
+
"--color": "--color_1d4b3",
|
|
33
|
+
"_pattern": "__pattern_1d4b3_gg_",
|
|
34
|
+
"--pattern": "--pattern_1d4b3",
|
|
35
|
+
"_transparent": "__transparent_1d4b3_gg_",
|
|
36
|
+
"__SCenter": "___SCenter_1d4b3_gg_",
|
|
37
|
+
"__SLabel": "___SLabel_1d4b3_gg_",
|
|
38
|
+
"_position_right": "_position_right_1d4b3_gg_",
|
|
39
|
+
"_position_left": "_position_left_1d4b3_gg_",
|
|
40
|
+
"--duration": "--duration_1d4b3"
|
|
41
41
|
})
|
|
42
42
|
);
|
|
43
43
|
var BubbleRoot = /* @__PURE__ */ (function(_Component) {
|
|
@@ -177,13 +177,13 @@ _defineProperty(BubbleRoot, "defaultProps", {
|
|
|
177
177
|
duration: 500,
|
|
178
178
|
markedCross: true
|
|
179
179
|
});
|
|
180
|
-
|
|
180
|
+
function BubbleTooltip(props) {
|
|
181
181
|
var _ref = arguments[0], _ref2;
|
|
182
182
|
var SBubbleTooltip = Tooltip;
|
|
183
183
|
return _ref2 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SBubbleTooltip, _ref2.cn("SBubbleTooltip", _objectSpread({}, assignProps({
|
|
184
184
|
"excludeAnchorProps": true
|
|
185
185
|
}, _ref))));
|
|
186
|
-
}
|
|
186
|
+
}
|
|
187
187
|
function BubbleCircle(props) {
|
|
188
188
|
var _ref3, _circleData$color;
|
|
189
189
|
var color = props.color, scale = props.scale, x = props.x, y = props.y, offset = props.offset, styles = props.styles, uid = props.uid, duration = props.duration, value = props.value, label = props.label, markedCross = props.markedCross, size = props.size, data = props.data, transparent = props.transparent, resolveColor = props.resolveColor, patterns = props.patterns, index = props.index, bindHandlerTooltip = props.bindHandlerTooltip, Element = props.Element, _props$visible = props.visible, visible = _props$visible === void 0 ? true : _props$visible, onClick = props.onClick, onClickCircleRoot = props.onClickCircleRoot;
|