@easyv/charts 1.10.21 → 1.10.22
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/lib/utils/index.js +1 -1
- package/package.json +1 -1
- package/src/utils/index.js +1 -1
package/lib/utils/index.js
CHANGED
|
@@ -637,7 +637,7 @@ var reverseGradientStops = function reverseGradientStops(gradient) {
|
|
|
637
637
|
};
|
|
638
638
|
var getBandBackground = exports.getBandBackground = function getBandBackground(pattern, fill, y) {
|
|
639
639
|
if (!(pattern && pattern.path)) {
|
|
640
|
-
return (0, _utils.getColor)(y
|
|
640
|
+
return (0, _utils.getColor)(y > 0 ? reverseGradientStops(fill) : fill); //小于0颜色翻转
|
|
641
641
|
}
|
|
642
642
|
try {
|
|
643
643
|
var _pattern$backgroundSi = pattern.backgroundSize,
|
package/package.json
CHANGED
package/src/utils/index.js
CHANGED
|
@@ -621,7 +621,7 @@ const reverseGradientStops = (gradient) => {
|
|
|
621
621
|
};
|
|
622
622
|
const getBandBackground = (pattern, fill, y) => {
|
|
623
623
|
if (!(pattern && pattern.path)) {
|
|
624
|
-
return getColor(y
|
|
624
|
+
return getColor(y > 0 ? reverseGradientStops(fill) : fill); //小于0颜色翻转
|
|
625
625
|
}
|
|
626
626
|
try {
|
|
627
627
|
const { backgroundSize = "100% 100%", ..._pattern } = pattern;
|