VChart icon indicating copy to clipboard operation
VChart copied to clipboard

[Bug] curveType monotone can't be applied to the part having invalid data

Open mengxi-ream opened this issue 1 year ago • 1 comments

Version

1.12.1

Link to Minimal Reproduction

use the spec in doc website

Steps to Reproduce

Use the spec

const spec = {
    "type": "line",
    "data": {
        "values": [
            {
                "Date": "2024-07-24",
                "Avg. Mood": 6
            },
            {
                "Date": "2024-08-23",
                "Avg. Mood": 1
            },
            {
                "Date": "2024-08-25",
                "Avg. Mood": 5.5
            },
            {
                "Date": "2024-08-27",
                "Avg. Mood": 4
            },
            {
                "Date": "2024-08-28",
                "Avg. Mood": 9
            },
            {
                "Date": "2024-09-30",
                "Avg. Mood": null
            },
            {
                "Date": "2024-10-01",
                "Avg. Mood": 3
            }
        ]
    },
    "xField": "Date",
    "yField": "Avg. Mood",
    "axes": [
        {
            "orient": "left",
            "min": 0,
            "max": 10
        }
    ],
    "line": {
        "style": {
            "curveType": "monotone"
        }
    },
    "invalidType": "link"
}

const vchart = new VChart(spec, { dom: CONTAINER_ID });

vchart.renderSync();

Current Behavior

CleanShot 2024-08-28 at 13 33 02@2x

When we have the null value on 2024-09-30, there is no monotone curve between 2024-08-28 and 2024-10-01

Expected Behavior

CleanShot 2024-08-28 at 13 33 02@2x

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

mengxi-ream avatar Aug 28 '24 20:08 mengxi-ream

duplicated with #2790

xile611 avatar Aug 29 '24 05:08 xile611

fixed in 1.13.4

xile611 avatar Jan 17 '25 12:01 xile611