sag_components 1.0.948 → 1.0.950
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.
|
@@ -24,6 +24,7 @@ const BarChart = props => {
|
|
|
24
24
|
title,
|
|
25
25
|
barChartData,
|
|
26
26
|
barSize,
|
|
27
|
+
barFontSizeValue,
|
|
27
28
|
isDollar,
|
|
28
29
|
width,
|
|
29
30
|
height,
|
|
@@ -103,7 +104,7 @@ const BarChart = props => {
|
|
|
103
104
|
y: y,
|
|
104
105
|
dy: -8,
|
|
105
106
|
fill: stroke,
|
|
106
|
-
fontSize:
|
|
107
|
+
fontSize: barFontSizeValue,
|
|
107
108
|
textAnchor: "middle"
|
|
108
109
|
}, displayFormattedValue(value));
|
|
109
110
|
};
|
|
@@ -180,6 +181,7 @@ BarChart.defaultProps = {
|
|
|
180
181
|
width: '100%',
|
|
181
182
|
height: '100%',
|
|
182
183
|
barSize: 60,
|
|
184
|
+
barFontSizeValue: '0.6em',
|
|
183
185
|
barChartColor: '#BD9EFF',
|
|
184
186
|
showDollarSign: true,
|
|
185
187
|
isDollar: true,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
@@ -10,7 +9,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
9
|
var _recharts = require("recharts");
|
|
11
10
|
var _CommonFunctions = require("./CommonFunctions");
|
|
12
11
|
var _BarChartTwoRows = require("./BarChartTwoRows.style");
|
|
13
|
-
var _PerformanceAnalyticsLegend = _interopRequireDefault(require("./PerformanceAnalyticsLegend"));
|
|
14
12
|
/* eslint-disable react/prop-types */
|
|
15
13
|
/* eslint-disable no-shadow */
|
|
16
14
|
/* eslint-disable react/no-unstable-nested-components */
|
|
@@ -169,7 +167,7 @@ const BarChartTwoRows = props => {
|
|
|
169
167
|
}, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
170
168
|
dataKey: "value",
|
|
171
169
|
content: CustomizedLabel
|
|
172
|
-
})))), showLegend && /*#__PURE__*/_react.default.createElement(
|
|
170
|
+
})))), showLegend && /*#__PURE__*/_react.default.createElement(_BarChartTwoRows.LegendContainer, {
|
|
173
171
|
legendData: legendData
|
|
174
172
|
})));
|
|
175
173
|
};
|
|
@@ -4,8 +4,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.TooltipTitle = exports.TooltipLabel = exports.TooltipDiv = exports.Title = exports.LabelText = exports.LabelBoldText = exports.ControlsContainer = exports.Controls = void 0;
|
|
7
|
+
exports.TooltipTitle = exports.TooltipLabel = exports.TooltipDiv = exports.Title = exports.LegendContainer = exports.LabelText = exports.LabelBoldText = exports.ControlsContainer = exports.Controls = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _PerformanceAnalyticsLegend = require("./PerformanceAnalyticsLegend");
|
|
9
10
|
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div`
|
|
10
11
|
font-family: "Poppins", sans-serif;
|
|
11
12
|
width: ${props => props.width};
|
|
@@ -39,7 +40,7 @@ const Title = exports.Title = _styledComponents.default.span`
|
|
|
39
40
|
display: inline-block;
|
|
40
41
|
font-size: 18px;
|
|
41
42
|
font-weight: 400;
|
|
42
|
-
margin-bottom:
|
|
43
|
+
margin-bottom: 14px;
|
|
43
44
|
@media (max-width: 1536px) {
|
|
44
45
|
font-size: 16px;
|
|
45
46
|
}
|
|
@@ -47,6 +48,10 @@ const Title = exports.Title = _styledComponents.default.span`
|
|
|
47
48
|
font-size: 14px;
|
|
48
49
|
}
|
|
49
50
|
`;
|
|
51
|
+
const LegendContainer = exports.LegendContainer = (0, _styledComponents.default)(_PerformanceAnalyticsLegend.PerformanceAnalyticsLegend)`
|
|
52
|
+
margin-top: auto;
|
|
53
|
+
padding-bottom: 16px;
|
|
54
|
+
`;
|
|
50
55
|
const TooltipDiv = exports.TooltipDiv = _styledComponents.default.div`
|
|
51
56
|
border-radius: 5px;
|
|
52
57
|
padding: 8px 12px;
|
|
@@ -24,6 +24,7 @@ const TwoBarCharts = props => {
|
|
|
24
24
|
title,
|
|
25
25
|
barChartData,
|
|
26
26
|
barSize,
|
|
27
|
+
barFontSizeValue,
|
|
27
28
|
isDollar,
|
|
28
29
|
width,
|
|
29
30
|
height,
|
|
@@ -102,7 +103,7 @@ const TwoBarCharts = props => {
|
|
|
102
103
|
y: y,
|
|
103
104
|
dy: -8,
|
|
104
105
|
fill: stroke,
|
|
105
|
-
fontSize:
|
|
106
|
+
fontSize: barFontSizeValue,
|
|
106
107
|
textAnchor: "middle"
|
|
107
108
|
}, displayFormattedValue(value));
|
|
108
109
|
};
|
|
@@ -192,16 +193,17 @@ TwoBarCharts.defaultProps = {
|
|
|
192
193
|
width: '100%',
|
|
193
194
|
height: '100%',
|
|
194
195
|
barSize: 60,
|
|
196
|
+
barFontSizeValue: '0.6em',
|
|
195
197
|
barChartColorFirst: '#BD9EFF',
|
|
196
198
|
barChartColorSecond: '#5865c8',
|
|
197
199
|
isDollar: true,
|
|
200
|
+
showDollarSign: true,
|
|
198
201
|
showLegend: true,
|
|
199
202
|
legendData: [{
|
|
200
203
|
title: 'Incremental Sales',
|
|
201
204
|
iconType: ICON_TYPE_SQUARE,
|
|
202
205
|
iconColor: '#BD9EFF'
|
|
203
206
|
}],
|
|
204
|
-
showDollarSign: true,
|
|
205
207
|
showReferenceLine: false,
|
|
206
208
|
referenceLinePoint: 0,
|
|
207
209
|
referenceLineColor: '#212121',
|