sag_components 1.0.704 → 1.0.705
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.
|
@@ -25,6 +25,7 @@ const BarChartsByWeeks = props => {
|
|
|
25
25
|
width,
|
|
26
26
|
height,
|
|
27
27
|
barChartColor,
|
|
28
|
+
barChartSecondColor,
|
|
28
29
|
xselectedColor,
|
|
29
30
|
tooltipTitle,
|
|
30
31
|
startWeekRange = 0,
|
|
@@ -33,7 +34,8 @@ const BarChartsByWeeks = props => {
|
|
|
33
34
|
isPercentValue,
|
|
34
35
|
interval,
|
|
35
36
|
showLegend,
|
|
36
|
-
legendData
|
|
37
|
+
legendData,
|
|
38
|
+
showTwoBars
|
|
37
39
|
} = props;
|
|
38
40
|
const [BarChartContainerWidth, setBarChartContainerWidth] = (0, _react.useState)(0);
|
|
39
41
|
const [BarChartContainerHeight, setBarChartContainerHeight] = (0, _react.useState)(0);
|
|
@@ -148,13 +150,28 @@ const BarChartsByWeeks = props => {
|
|
|
148
150
|
tickFormatter: value => "".concat(displayFormattedValue(value))
|
|
149
151
|
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, {
|
|
150
152
|
content: /*#__PURE__*/_react.default.createElement(CustomTooltip, null)
|
|
151
|
-
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, null), /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
|
|
153
|
+
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, null), !showTwoBars ? /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
|
|
152
154
|
dataKey: "value",
|
|
153
155
|
name: "title",
|
|
154
156
|
maxBarSize: 30,
|
|
155
157
|
radius: [4, 4, 0, 0],
|
|
156
158
|
fill: barChartColor
|
|
157
|
-
})
|
|
159
|
+
}) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
|
|
160
|
+
dataKey: "value",
|
|
161
|
+
name: "title",
|
|
162
|
+
maxBarSize: 30
|
|
163
|
+
// radius={[4, 4, 0, 0]}
|
|
164
|
+
,
|
|
165
|
+
stackId: "a",
|
|
166
|
+
fill: barChartColor
|
|
167
|
+
}), /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
|
|
168
|
+
dataKey: "secondValue",
|
|
169
|
+
name: "title",
|
|
170
|
+
maxBarSize: 30,
|
|
171
|
+
radius: [4, 4, 0, 0],
|
|
172
|
+
stackId: "a",
|
|
173
|
+
fill: barChartSecondColor
|
|
174
|
+
})))), displayEventWeeksLegendData(), showLegend && /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.default, {
|
|
158
175
|
legendData: legendData
|
|
159
176
|
})));
|
|
160
177
|
};
|
|
@@ -205,6 +222,7 @@ BarChartsByWeeks.defaultProps = {
|
|
|
205
222
|
width: '100%',
|
|
206
223
|
height: '100%',
|
|
207
224
|
barChartColor: '#BD9EFF',
|
|
225
|
+
barChartSecondColor: '#42977A',
|
|
208
226
|
xselectedColor: '#42977A',
|
|
209
227
|
tooltipTitle: 'Sales',
|
|
210
228
|
startWeekRange: 0,
|
|
@@ -222,5 +240,6 @@ BarChartsByWeeks.defaultProps = {
|
|
|
222
240
|
title: 'Category Average',
|
|
223
241
|
iconType: ICON_TYPE_LEGEND_LINE_ICON,
|
|
224
242
|
iconColor: '#C906FD'
|
|
225
|
-
}]
|
|
243
|
+
}],
|
|
244
|
+
showTwoBars: false
|
|
226
245
|
};
|