sag_components 1.0.883 → 1.0.884
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.
|
@@ -7,12 +7,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.BarChartWithAreaChart = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _recharts = require("recharts");
|
|
10
11
|
var _FoodLionChartIcon = _interopRequireDefault(require("./icons/FoodLionChartIcon"));
|
|
11
12
|
var _GiantFoodChartIcon = _interopRequireDefault(require("./icons/GiantFoodChartIcon"));
|
|
12
13
|
var _TheGiantCompanyChartIcon = _interopRequireDefault(require("./icons/TheGiantCompanyChartIcon"));
|
|
13
14
|
var _StopAndShopChartIcon = _interopRequireDefault(require("./icons/StopAndShopChartIcon"));
|
|
14
15
|
var _HannafordChartIcon = _interopRequireDefault(require("./icons/HannafordChartIcon"));
|
|
15
|
-
var _recharts = require("recharts");
|
|
16
16
|
var _CommonFunctions = require("./CommonFunctions");
|
|
17
17
|
var _BarChartWithAreaChart = require("./BarChartWithAreaChart.style");
|
|
18
18
|
var _PerformanceAnalyticsLegend = _interopRequireDefault(require("./PerformanceAnalyticsLegend"));
|
|
@@ -41,9 +41,9 @@ const BarChartWithAreaChart = props => {
|
|
|
41
41
|
if (!value) return '';
|
|
42
42
|
switch (signType) {
|
|
43
43
|
case 'dollar':
|
|
44
|
-
return ''.concat(
|
|
44
|
+
return ''.concat('$', (0, _CommonFunctions.getFormattedValue)(value), (0, _CommonFunctions.getFormattedUnits)(value));
|
|
45
45
|
case 'percentage':
|
|
46
|
-
return ''.concat((0, _CommonFunctions.getFormattedValue)(value), (0, _CommonFunctions.getFormattedUnits)(value),
|
|
46
|
+
return ''.concat((0, _CommonFunctions.getFormattedValue)(value), (0, _CommonFunctions.getFormattedUnits)(value), '%');
|
|
47
47
|
case 'unit':
|
|
48
48
|
return ''.concat((0, _CommonFunctions.getFormattedValue)(value), (0, _CommonFunctions.getFormattedUnits)(value));
|
|
49
49
|
}
|
|
@@ -124,21 +124,27 @@ const BarChartWithAreaChart = props => {
|
|
|
124
124
|
stroke,
|
|
125
125
|
value
|
|
126
126
|
} = props;
|
|
127
|
-
if (value === undefined || value === null)
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
127
|
+
if (value === undefined || value === null) {
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement("text", {
|
|
129
|
+
x: x + 30,
|
|
130
|
+
y: y,
|
|
131
|
+
dy: -8,
|
|
132
|
+
fill: stroke,
|
|
133
|
+
fontSize: "0.6em",
|
|
134
|
+
textAnchor: "middle"
|
|
135
|
+
}, "N/A");
|
|
136
|
+
}
|
|
137
|
+
if (value === 0) {
|
|
138
|
+
return /*#__PURE__*/_react.default.createElement("text", {
|
|
139
|
+
x: x + 30,
|
|
140
|
+
y: y,
|
|
141
|
+
dy: -8,
|
|
142
|
+
fill: stroke,
|
|
143
|
+
fontSize: "0.6em",
|
|
144
|
+
textAnchor: "middle"
|
|
145
|
+
}, "0");
|
|
146
|
+
}
|
|
147
|
+
return /*#__PURE__*/_react.default.createElement("text", {
|
|
142
148
|
x: x + 30,
|
|
143
149
|
y: y,
|
|
144
150
|
dy: -8,
|
|
@@ -168,7 +174,7 @@ const BarChartWithAreaChart = props => {
|
|
|
168
174
|
}, /*#__PURE__*/_react.default.createElement(_recharts.YAxis, {
|
|
169
175
|
type: "number",
|
|
170
176
|
display: "none",
|
|
171
|
-
domain: [0, 'dataMax']
|
|
177
|
+
domain: [0, 'dataMax*1.5']
|
|
172
178
|
}), /*#__PURE__*/_react.default.createElement(_recharts.XAxis, {
|
|
173
179
|
dataKey: "title",
|
|
174
180
|
tick: CustomizedTickBarChart,
|