Skip to content

[Bug] smoothMonotone generates saddle points #21532

Open

Description

@akloeckner

Version

current

Link to Minimal Reproduction

see below

Steps to Reproduce

Use the ECharts help here:
https://apache.github.io/echarts-handbook/en/how-to/chart-types/line/basic-line/

Select a few points and set smoothMonotone to x.

With smoothMonotone:

Image

Without smoothMonotone:

Image

Current Behavior

Setting the option generates saddle points at the actual data points.

Expected Behavior

The graph should not have saddle points but simply be monotone.

Environment

ECharts help

Any additional comments?

I found this when examining data shown in home assistant. The data was surprising to me until I realized it was actually a graphing artifact.

See home-assistant/frontend#29907 (comment)

Activity

  1. added
    enThis issue is in English
    pendingWe are not sure about whether this is a bug/new feature.
    on Mar 9, 2026
  2. helgasoft commented on Apr 6, 2026

    @helgasoft

    apparently this 'saddle' effect comes from smooth, not smoothMonotone - Demo.
    And is probably by design.

  3. awtaylor commented on Oct 19, 2026

    @awtaylor

    I believe the horizontal tangent at each sample comes from smoothMonotone: 'x' (the control points keep that sample's y). That part is the behavior added in #7158. smooth: true without it can still bow past the samples, but it does not flatten every knot.

    #21794 leaves 'x' and 'y' as they are and adds smoothMonotone: 'monotoneX' for a monotone curve that does not put a saddle on every sample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions