Skip to content

[Feature] Restart line smoothing at a marked vertex #21796

Open

Description

@awtaylor

What problem does this feature solve?

One line series sometimes has a real join in the middle: history and a forecast, or a change of regime. Smoothing should not borrow slope from the other side of that join, but the stroke should stay one series so the legend and the axis tooltip do not split.

Two series with the same color can fake the corner, and they show up as two legend entries and two tooltip rows. null already opens a gap (connectNulls: false). markLine only draws a guide. This is a corner, not a gap.

There is no open issue asking for this. #7158 and #21532 are about unwanted corners, and #1817 asked to smooth across gaps. This asks for a deliberate corner.

What does the proposed API look like?

series: [{
    type: 'line',
    smooth: true,
    data: [
        20, 55, 30,
        { value: 80, smoothBreak: true },
        25, 60, 35, 70
    ]
}]

The stroke stays connected through that sample. Smoothing restarts there. smoothBreak is only read from a series.data object. A number, an [x, y] tuple, or a dataset row cannot carry it. Perhaps another name is clearer?

Activity

  1. added
    enThis issue is in English
    pendingWe are not sure about whether this is a bug/new feature.
    on Oct 19, 2026
  2. awtaylor commented on Oct 19, 2026

    @awtaylor
    Author

    I am going to implement this:

    The stroke stays connected. null is still the gap. smoothBreak is only a restart of smoothing at that vertex, and only when the point is a series.data object. I am happy to rename it if smoothBreak sounds too much like a gap.

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

    enThis issue is in Englishnew-featurependingWe 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