sag_components 1.0.26 → 1.0.27
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/dist/stories/TotalDoughnutChart.stories.js +1 -1
- package/dist/stories/TotalDoughnutChart.style.js +5 -5
- package/dist/stories/components/TotalDoughnutChart.js +4 -4
- package/package.json +1 -1
- package/src/stories/TotalDoughnutChart.stories.js +1 -1
- package/src/stories/TotalDoughnutChart.style.js +8 -8
- package/src/stories/components/TotalDoughnutChart.jsx +4 -4
|
@@ -28,7 +28,7 @@ var CurrencySign = _styledComponents.default.div(_templateObject4 || (_templateO
|
|
|
28
28
|
exports.CurrencySign = CurrencySign;
|
|
29
29
|
var FormattedValue = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 200px;\n height: 48px;\n left: 57px;\n top: 115px;\n font-weight: 500;\n font-size: 40px;\n line-height: 48px;\n //border: 1px solid red;\n"])));
|
|
30
30
|
exports.FormattedValue = FormattedValue;
|
|
31
|
-
var DoughnutChart = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width:
|
|
31
|
+
var DoughnutChart = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 90px;\n height: 90px;\n left: ", ";\n top: ", "; \n //border: 1px solid red;\n"])), function (props) {
|
|
32
32
|
return props.left.toString().concat("", "px"); //10px
|
|
33
33
|
}, function (props) {
|
|
34
34
|
return props.top.toString().concat("", "px"); //top: 221px;
|
|
@@ -40,13 +40,13 @@ var LegendControls = _styledComponents.default.div(_templateObject7 || (_templat
|
|
|
40
40
|
return props.top.toString().concat("", "px"); //top: 221px;
|
|
41
41
|
});
|
|
42
42
|
exports.LegendControls = LegendControls;
|
|
43
|
-
var LegendColorRectangle = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 16px;\n height: 16px;\n left:
|
|
43
|
+
var LegendColorRectangle = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 16px;\n height: 16px;\n left: 8px;\n top: 14px;\n background: ", ";\n"])), function (props) {
|
|
44
44
|
return props.color;
|
|
45
45
|
});
|
|
46
46
|
exports.LegendColorRectangle = LegendColorRectangle;
|
|
47
|
-
var LegendTitle = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width:
|
|
47
|
+
var LegendTitle = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 150px;\n height: 18px;\n left: 30px;\n top: 1px;\n font-weight: 400;\n font-size: 14px;\n line-height: 17px;\n //border: 1px solid red;\n"])));
|
|
48
48
|
exports.LegendTitle = LegendTitle;
|
|
49
|
-
var LegendCurrencySign = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 11px;\n height: 19px;\n left:
|
|
49
|
+
var LegendCurrencySign = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 11px;\n height: 19px;\n left: 30px;\n top: 21px;\n font-weight: 600;\n font-size: 16px;\n line-height: 19px;\n //border: 1px solid red;\n"])));
|
|
50
50
|
exports.LegendCurrencySign = LegendCurrencySign;
|
|
51
|
-
var LegendFormattedValue = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width:
|
|
51
|
+
var LegendFormattedValue = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 120px;\n height: 19px;\n left: 40px;\n top: 21px;\n font-weight: 600;\n font-size: 16px;\n line-height: 19px;\n //border: 1px solid red;\n"])));
|
|
52
52
|
exports.LegendFormattedValue = LegendFormattedValue;
|
|
@@ -149,13 +149,13 @@ var TotalDoughnutChart = function TotalDoughnutChart(_ref) {
|
|
|
149
149
|
left: getDoughnutChartLeft(),
|
|
150
150
|
top: getDoughnutChartTop()
|
|
151
151
|
}, /*#__PURE__*/_react.default.createElement(_recharts.PieChart, {
|
|
152
|
-
width:
|
|
153
|
-
height:
|
|
152
|
+
width: 90,
|
|
153
|
+
height: 90,
|
|
154
154
|
onMouseEnter: onPieEnterHandler
|
|
155
155
|
}, /*#__PURE__*/_react.default.createElement(_recharts.Pie, {
|
|
156
156
|
data: legendData,
|
|
157
|
-
innerRadius:
|
|
158
|
-
outerRadius:
|
|
157
|
+
innerRadius: 30,
|
|
158
|
+
outerRadius: 45,
|
|
159
159
|
fill: "#8884d8",
|
|
160
160
|
dataKey: "value"
|
|
161
161
|
}, legendData.map(function (row, index) {
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ const arrLegendData = [
|
|
|
8
8
|
|
|
9
9
|
const arrLegendDat3rows = [
|
|
10
10
|
{ name: "Package Cost", value: 30000, color: "#85A1D2"},
|
|
11
|
-
{ name: "
|
|
11
|
+
{ name: "Existing Redeemers", value: 6500,color: "#9AE6FF"},
|
|
12
12
|
{ name: "Others", value: 20000, color: "#FD5959"},
|
|
13
13
|
// { name: "My test 2", value: 35000, color: "#79DB95"},
|
|
14
14
|
];
|
|
@@ -71,8 +71,8 @@ export const FormattedValue = styled.div`
|
|
|
71
71
|
|
|
72
72
|
export const DoughnutChart = styled.div`
|
|
73
73
|
position: absolute;
|
|
74
|
-
width:
|
|
75
|
-
height:
|
|
74
|
+
width: 90px;
|
|
75
|
+
height: 90px;
|
|
76
76
|
left: ${(props) => {
|
|
77
77
|
return props.left.toString().concat("", "px"); //10px
|
|
78
78
|
}};
|
|
@@ -101,16 +101,16 @@ export const LegendColorRectangle = styled.div`
|
|
|
101
101
|
position: absolute;
|
|
102
102
|
width: 16px;
|
|
103
103
|
height: 16px;
|
|
104
|
-
left:
|
|
104
|
+
left: 8px;
|
|
105
105
|
top: 14px;
|
|
106
106
|
background: ${(props) => props.color};
|
|
107
107
|
`;
|
|
108
108
|
|
|
109
109
|
export const LegendTitle = styled.div`
|
|
110
110
|
position: absolute;
|
|
111
|
-
width:
|
|
111
|
+
width: 150px;
|
|
112
112
|
height: 18px;
|
|
113
|
-
left:
|
|
113
|
+
left: 30px;
|
|
114
114
|
top: 1px;
|
|
115
115
|
font-weight: 400;
|
|
116
116
|
font-size: 14px;
|
|
@@ -122,7 +122,7 @@ export const LegendCurrencySign = styled.div`
|
|
|
122
122
|
position: absolute;
|
|
123
123
|
width: 11px;
|
|
124
124
|
height: 19px;
|
|
125
|
-
left:
|
|
125
|
+
left: 30px;
|
|
126
126
|
top: 21px;
|
|
127
127
|
font-weight: 600;
|
|
128
128
|
font-size: 16px;
|
|
@@ -132,9 +132,9 @@ export const LegendCurrencySign = styled.div`
|
|
|
132
132
|
|
|
133
133
|
export const LegendFormattedValue = styled.div`
|
|
134
134
|
position: absolute;
|
|
135
|
-
width:
|
|
135
|
+
width: 120px;
|
|
136
136
|
height: 19px;
|
|
137
|
-
left:
|
|
137
|
+
left: 40px;
|
|
138
138
|
top: 21px;
|
|
139
139
|
font-weight: 600;
|
|
140
140
|
font-size: 16px;
|
|
@@ -151,14 +151,14 @@ export const TotalDoughnutChart = ({
|
|
|
151
151
|
left={getDoughnutChartLeft() }
|
|
152
152
|
top={getDoughnutChartTop()}>
|
|
153
153
|
<SourcePieChart
|
|
154
|
-
width={
|
|
155
|
-
height={
|
|
154
|
+
width={90}
|
|
155
|
+
height={90}
|
|
156
156
|
onMouseEnter={onPieEnterHandler}
|
|
157
157
|
>
|
|
158
158
|
<Pie
|
|
159
159
|
data={legendData}
|
|
160
|
-
innerRadius={
|
|
161
|
-
outerRadius={
|
|
160
|
+
innerRadius={30}
|
|
161
|
+
outerRadius={45}
|
|
162
162
|
fill="#8884d8"
|
|
163
163
|
dataKey="value"
|
|
164
164
|
>
|