sag_components 1.0.734 → 1.0.736
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.
|
@@ -75,19 +75,13 @@ const BarChart = props => {
|
|
|
75
75
|
const {
|
|
76
76
|
x,
|
|
77
77
|
y,
|
|
78
|
-
stroke,
|
|
79
78
|
payload
|
|
80
79
|
} = props;
|
|
81
80
|
if (barChartData && barChartData.length > 0 && payload) {
|
|
82
81
|
const retailerData = barChartData.filter(item => item.title === payload.value);
|
|
83
82
|
if (retailerData && retailerData.length > 0) {
|
|
84
|
-
const {
|
|
85
|
-
offerType
|
|
86
|
-
} = retailerData[0];
|
|
87
83
|
return /*#__PURE__*/_react.default.createElement("g", {
|
|
88
84
|
transform: "translate(".concat(x, ",").concat(y, ")")
|
|
89
|
-
// onMouseEnter={() => handleMouseEnter(offerType)}
|
|
90
|
-
// onMouseLeave={handleMouseLeave}
|
|
91
85
|
}, /*#__PURE__*/_react.default.createElement("text", {
|
|
92
86
|
x: 0,
|
|
93
87
|
y: 0,
|
|
@@ -140,7 +134,7 @@ const BarChart = props => {
|
|
|
140
134
|
height: height,
|
|
141
135
|
data: barChartData,
|
|
142
136
|
margin: {
|
|
143
|
-
top:
|
|
137
|
+
top: 10,
|
|
144
138
|
right: 0,
|
|
145
139
|
bottom: 0,
|
|
146
140
|
left: -5
|
|
@@ -31,6 +31,10 @@ const BarChartTwoRows = props => {
|
|
|
31
31
|
barChartColorSecond,
|
|
32
32
|
showLegend,
|
|
33
33
|
legendData,
|
|
34
|
+
showReferenceLine,
|
|
35
|
+
referenceLinePoint,
|
|
36
|
+
referenceLineColor,
|
|
37
|
+
referenceLineDashed,
|
|
34
38
|
lowerValueLabel,
|
|
35
39
|
highValueLabel
|
|
36
40
|
} = props;
|
|
@@ -122,12 +126,16 @@ const BarChartTwoRows = props => {
|
|
|
122
126
|
height: height,
|
|
123
127
|
data: barChartData,
|
|
124
128
|
margin: {
|
|
125
|
-
top:
|
|
129
|
+
top: 10,
|
|
126
130
|
right: 0,
|
|
127
131
|
bottom: 0,
|
|
128
132
|
left: -5
|
|
129
133
|
}
|
|
130
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.
|
|
134
|
+
}, showReferenceLine && /*#__PURE__*/_react.default.createElement(_recharts.ReferenceLine, {
|
|
135
|
+
y: referenceLinePoint,
|
|
136
|
+
stroke: referenceLineColor,
|
|
137
|
+
strokeDasharray: referenceLineDashed
|
|
138
|
+
}), /*#__PURE__*/_react.default.createElement(_recharts.XAxis, {
|
|
131
139
|
dataKey: "title",
|
|
132
140
|
tick: CustomizedTickBarChart,
|
|
133
141
|
tickLine: false,
|
|
@@ -191,6 +199,10 @@ BarChartTwoRows.defaultProps = {
|
|
|
191
199
|
iconType: ICON_TYPE_SQUARE,
|
|
192
200
|
iconColor: '#BD9EFF'
|
|
193
201
|
}],
|
|
202
|
+
showReferenceLine: true,
|
|
203
|
+
referenceLinePoint: 0,
|
|
204
|
+
referenceLineColor: '#212121',
|
|
205
|
+
referenceLineDashed: '5',
|
|
194
206
|
lowerValueLabel: 'Lower Value:',
|
|
195
207
|
highValueLabel: 'High Value:'
|
|
196
208
|
};
|