VChart icon indicating copy to clipboard operation
VChart copied to clipboard

[Bug] react, VChart, curveType:monotone,change line color, conjunction part becomes sharp

Open 7ASSEL opened this issue 1 year ago • 0 comments

Version

^1.11.2

Link to Minimal Reproduction

https://jsfiddle.net/c207a54n/

Steps to Reproduce

No interactioin required, open the link and you will see that.

  1. create a basic VChart, type is line:
type: 'line',
  line: {
    style: {
      curveType: 'monotone',
      stroke: (data) => {
        if (data.value >= upperBound || data.value <= lowerBound) {
          return 'red';
        }
        return 'blue';
      },
    },
  },
  1. curveType: 'monotone' suggests a smooth line, but when the line changes color, the conjunction part becomes sharp, which goes against expected behavior.
  2. For more information, you can see the JSFiddle link: https://jsfiddle.net/c207a54n/

Current Behavior

When the monotone line changes color, the conjunction part becomes sharp, which goes against expected behavior. img_v3_02bj_dae829c0-66a9-47c5-92fb-5bb45a2ef5hu img_v3_02bj_687fbaa0-2823-4d04-b3fe-f15728ba52hu

Expected Behavior

line shape stays the same as no color changes.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

7ASSEL avatar Jun 06 '24 03:06 7ASSEL