VisActor / VChart

VChart, more than just a cross-platform charting library, but also an expressive data storyteller.
https://www.visactor.io/vchart
MIT License
919 stars 62 forks source link

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

Open 7ASSEL opened 3 months ago

7ASSEL commented 3 months ago

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';
      },
    },
    },
  2. curveType: 'monotone' suggests a smooth line, but when the line changes color, the conjunction part becomes sharp, which goes against expected behavior.
  3. 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