@redsift/charts 8.0.0-alpha.3 → 8.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -3
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1680,7 +1680,11 @@ const PieChartLabelVariant = {
|
|
|
1680
1680
|
/**
|
|
1681
1681
|
* Component style.
|
|
1682
1682
|
*/
|
|
1683
|
-
const StyledPieChart = styled(ChartContainer)
|
|
1683
|
+
const StyledPieChart = styled(ChartContainer)`
|
|
1684
|
+
.redsift-piechart__chart-wrapper {
|
|
1685
|
+
position: relative;
|
|
1686
|
+
}
|
|
1687
|
+
`;
|
|
1684
1688
|
const StyledPieChartCenterText = styled.div`
|
|
1685
1689
|
position: absolute;
|
|
1686
1690
|
top: 0;
|
|
@@ -1977,7 +1981,9 @@ const RenderedPieChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1977
1981
|
className: className,
|
|
1978
1982
|
id: id,
|
|
1979
1983
|
ref: ref
|
|
1980
|
-
}),
|
|
1984
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1985
|
+
className: `${PieChart.className}__chart-wrapper`
|
|
1986
|
+
}, text ? /*#__PURE__*/React__default.createElement(StyledPieChartCenterText, {
|
|
1981
1987
|
$maxWidth: innerRadius * 2,
|
|
1982
1988
|
$textSize: fontSize,
|
|
1983
1989
|
$smallTextSize: smallFontSize
|
|
@@ -2021,7 +2027,7 @@ const RenderedPieChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2021
2027
|
tooltipVariant: tooltipVariant,
|
|
2022
2028
|
transform: `translate(${width / 2} ${height / 2})`,
|
|
2023
2029
|
role: sliceRole
|
|
2024
|
-
})), labelVariant !== PieChartLabelVariant.none && labelVariant !== PieChartLabelVariant.internal ? /*#__PURE__*/React__default.createElement(Legend, {
|
|
2030
|
+
}))), labelVariant !== PieChartLabelVariant.none && labelVariant !== PieChartLabelVariant.internal ? /*#__PURE__*/React__default.createElement(Legend, {
|
|
2025
2031
|
data: data.map(d => _objectSpread2(_objectSpread2({}, d), {}, {
|
|
2026
2032
|
color: colorScale === null || colorScale === void 0 ? void 0 : colorScale(d.key)
|
|
2027
2033
|
})),
|