@redsift/charts 11.4.0-muiv5-alpha.0 → 11.4.0-muiv5-alpha.1
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.d.ts +1 -0
- package/index.js +3 -2
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -875,6 +875,7 @@ declare const BarChart: Comp<BarChartProps, HTMLDivElement> & {
|
|
|
875
875
|
Axis: Comp<AxisProps, SVGGElement>;
|
|
876
876
|
GroupedTooltip: React$1.FC<{
|
|
877
877
|
dateFormatter: (date: Date) => string;
|
|
878
|
+
categories: string[];
|
|
878
879
|
categoryDecorator: (category: string) => string;
|
|
879
880
|
categoryColor: (category: string) => string;
|
|
880
881
|
datum: BarDatum;
|
package/index.js
CHANGED
|
@@ -1959,7 +1959,7 @@ const BarChartBars = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1959
1959
|
tooltipDecorator,
|
|
1960
1960
|
xScaleType
|
|
1961
1961
|
} = useBarChartContext();
|
|
1962
|
-
const filteredBarChartBars = bars.filter(bar => bar.category === category);
|
|
1962
|
+
const filteredBarChartBars = bars.filter(bar => bar.category === category && bar.value > 0);
|
|
1963
1963
|
const categoryIndex = categories.indexOf(category);
|
|
1964
1964
|
const categoryLength = categories.length;
|
|
1965
1965
|
return /*#__PURE__*/React__default.createElement(StyledBarChartBars, _extends({
|
|
@@ -2020,6 +2020,7 @@ BarChartBars.displayName = COMPONENT_NAME$9;
|
|
|
2020
2020
|
const BarChartGroupedTooltip = _ref => {
|
|
2021
2021
|
let {
|
|
2022
2022
|
dateFormatter,
|
|
2023
|
+
categories,
|
|
2023
2024
|
categoryDecorator,
|
|
2024
2025
|
categoryColor,
|
|
2025
2026
|
datum,
|
|
@@ -2058,7 +2059,7 @@ const BarChartGroupedTooltip = _ref => {
|
|
|
2058
2059
|
flexDirection: "column",
|
|
2059
2060
|
marginTop: "4px",
|
|
2060
2061
|
gap: "8px"
|
|
2061
|
-
},
|
|
2062
|
+
}, categories.map(category => {
|
|
2062
2063
|
var _groupedData$find;
|
|
2063
2064
|
const value = groupedData === null || groupedData === void 0 ? void 0 : (_groupedData$find = groupedData.find(d => d.category === category)) === null || _groupedData$find === void 0 ? void 0 : _groupedData$find.value;
|
|
2064
2065
|
const color = categoryColor(category);
|