fix(linear-gradient): avoid the infinite value in linearMap util.#14602
Conversation
|
Thanks for your contribution! The pull request is marked to be |
|
@plainheart I think We can clamp it if we want to limit it in the range: |
|
@pissang For the case in #14534, it seems to differ from the case in #14601, some changes may need to be applied to zrender. When all values of the line series are null, the width and height of the computed bounding rectangle of area polygon will both be infinite, which makes the gradient color can't be drawn. |
|
@plainheart Sorry for the late reply. I agree use Infinity |
|
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
Brief Information
This pull request is in the type of:
What does this PR do?
Fix a bug that the chart cannot be rendered for
Infinitevalue, fix #7293, #14534, #14601.Fixed issues
Details
Before: What was the problem?
The chart cannot be rendered since the error below,
After: How is it fixed in this PR?
Usage
Are there any API changes?
Related test cases or examples to use the new APIs
Please refer to
test/linear-gradient.html.Others
Merging options
Other information
Related PR in zrender: ecomfe/zrender#748