@easyv/charts 1.8.13 → 1.8.14
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.
|
@@ -947,6 +947,7 @@ var Label = function Label(_ref10) {
|
|
|
947
947
|
_ref10$config$value = _ref10$config.value,
|
|
948
948
|
showValue = _ref10$config$value.show,
|
|
949
949
|
valueFont = _ref10$config$value.font,
|
|
950
|
+
valueSameColor = _ref10$config$value.sameColor,
|
|
950
951
|
_ref10$config$value$s = _ref10$config$value.suffix,
|
|
951
952
|
showSuffix = _ref10$config$value$s.show,
|
|
952
953
|
text = _ref10$config$value$s.text,
|
|
@@ -956,6 +957,7 @@ var Label = function Label(_ref10) {
|
|
|
956
957
|
suffixTranslateY = _ref10$config$value$s2.y,
|
|
957
958
|
_ref10$config$percent = _ref10$config.percent,
|
|
958
959
|
showPercent = _ref10$config$percent.show,
|
|
960
|
+
percentSameColor = _ref10$config$percent.sameColor,
|
|
959
961
|
percentFont = _ref10$config$percent.font,
|
|
960
962
|
precision = _ref10$config$percent.precision,
|
|
961
963
|
_ref10$iosStyle = _ref10.iosStyle,
|
|
@@ -1048,7 +1050,9 @@ var Label = function Label(_ref10) {
|
|
|
1048
1050
|
"float": mode == "horizontal" ? "left" : "none"
|
|
1049
1051
|
})
|
|
1050
1052
|
}), showValue && /*#__PURE__*/_react["default"].createElement("span", {
|
|
1051
|
-
style: (0, _utils.getFontStyle)(valueFont)
|
|
1053
|
+
style: _objectSpread(_objectSpread({}, (0, _utils.getFontStyle)(valueFont)), {}, {
|
|
1054
|
+
"color": valueSameColor ? pure : valueFont.color
|
|
1055
|
+
})
|
|
1052
1056
|
}, data.y, showSuffix && /*#__PURE__*/_react["default"].createElement("span", {
|
|
1053
1057
|
style: {
|
|
1054
1058
|
position: "relative",
|
|
@@ -1057,7 +1061,9 @@ var Label = function Label(_ref10) {
|
|
|
1057
1061
|
top: suffixTranslateY
|
|
1058
1062
|
}
|
|
1059
1063
|
}, text)), showPercent && /*#__PURE__*/_react["default"].createElement("span", {
|
|
1060
|
-
style: (0, _utils.getFontStyle)(percentFont)
|
|
1064
|
+
style: _objectSpread(_objectSpread({}, (0, _utils.getFontStyle)(percentFont)), {}, {
|
|
1065
|
+
"color": percentSameColor ? pure : percentFont.color
|
|
1066
|
+
})
|
|
1061
1067
|
}, (_showValue ? "(" : "") + percent + "%" + (_showValue ? ")" : "")))));
|
|
1062
1068
|
}));
|
|
1063
1069
|
};
|
|
@@ -1203,7 +1209,8 @@ var RingLabel = function RingLabel(_ref12) {
|
|
|
1203
1209
|
})
|
|
1204
1210
|
}), showValue && /*#__PURE__*/_react["default"].createElement("span", {
|
|
1205
1211
|
style: _objectSpread(_objectSpread({}, (0, _utils.getFontStyle)(valueFont)), {}, {
|
|
1206
|
-
transform: getTranslate(valueTranslate, x3 >= 0)
|
|
1212
|
+
transform: getTranslate(valueTranslate, x3 >= 0),
|
|
1213
|
+
"color": valueSameColor ? pure : valueFont.color
|
|
1207
1214
|
})
|
|
1208
1215
|
}, realData.y, showSuffix && /*#__PURE__*/_react["default"].createElement("span", {
|
|
1209
1216
|
style: {
|
|
@@ -1214,7 +1221,8 @@ var RingLabel = function RingLabel(_ref12) {
|
|
|
1214
1221
|
}
|
|
1215
1222
|
}, text)), showPercent && /*#__PURE__*/_react["default"].createElement("span", {
|
|
1216
1223
|
style: _objectSpread(_objectSpread({}, (0, _utils.getFontStyle)(percentFont)), {}, {
|
|
1217
|
-
transform: getTranslate(percentTranslate, x3 >= 0)
|
|
1224
|
+
transform: getTranslate(percentTranslate, x3 >= 0),
|
|
1225
|
+
"color": percentSameColor ? pure : percentFont.color
|
|
1218
1226
|
})
|
|
1219
1227
|
}, (_showValue ? "(" : "") + percent + "%" + (_showValue ? ")" : "")))));
|
|
1220
1228
|
}));
|
package/package.json
CHANGED
|
@@ -1097,6 +1097,7 @@ const Label = ({
|
|
|
1097
1097
|
value: {
|
|
1098
1098
|
show: showValue,
|
|
1099
1099
|
font: valueFont,
|
|
1100
|
+
sameColor:valueSameColor,
|
|
1100
1101
|
suffix: {
|
|
1101
1102
|
show: showSuffix,
|
|
1102
1103
|
text,
|
|
@@ -1104,7 +1105,7 @@ const Label = ({
|
|
|
1104
1105
|
translate: { x: suffixTranslateX, y: suffixTranslateY },
|
|
1105
1106
|
},
|
|
1106
1107
|
},
|
|
1107
|
-
percent: { show: showPercent, font: percentFont, precision },
|
|
1108
|
+
percent: { show: showPercent,sameColor:percentSameColor, font: percentFont, precision },
|
|
1108
1109
|
},
|
|
1109
1110
|
iosStyle: { isIOS, left, top },
|
|
1110
1111
|
arcs,
|
|
@@ -1238,7 +1239,7 @@ const Label = ({
|
|
|
1238
1239
|
></TextOverflow>
|
|
1239
1240
|
)}
|
|
1240
1241
|
{showValue && (
|
|
1241
|
-
<span style={getFontStyle(valueFont)}>
|
|
1242
|
+
<span style={{...getFontStyle(valueFont),"color":valueSameColor?pure:valueFont.color}}>
|
|
1242
1243
|
{data.y}
|
|
1243
1244
|
{showSuffix && (
|
|
1244
1245
|
<span
|
|
@@ -1255,7 +1256,7 @@ const Label = ({
|
|
|
1255
1256
|
</span>
|
|
1256
1257
|
)}
|
|
1257
1258
|
{showPercent && (
|
|
1258
|
-
<span style={getFontStyle(percentFont)}>
|
|
1259
|
+
<span style={{...getFontStyle(percentFont),"color":percentSameColor?pure:percentFont.color}}>
|
|
1259
1260
|
{(_showValue ? "(" : "") +
|
|
1260
1261
|
percent +
|
|
1261
1262
|
"%" +
|
|
@@ -1460,6 +1461,7 @@ const RingLabel = ({
|
|
|
1460
1461
|
style={{
|
|
1461
1462
|
...getFontStyle(valueFont),
|
|
1462
1463
|
transform: getTranslate(valueTranslate, x3 >= 0),
|
|
1464
|
+
"color":valueSameColor?pure:valueFont.color
|
|
1463
1465
|
}}
|
|
1464
1466
|
>
|
|
1465
1467
|
{realData.y}
|
|
@@ -1482,6 +1484,7 @@ const RingLabel = ({
|
|
|
1482
1484
|
style={{
|
|
1483
1485
|
...getFontStyle(percentFont),
|
|
1484
1486
|
transform: getTranslate(percentTranslate, x3 >= 0),
|
|
1487
|
+
"color":percentSameColor?pure:percentFont.color
|
|
1485
1488
|
}}
|
|
1486
1489
|
>
|
|
1487
1490
|
{(_showValue ? "(" : "") +
|