Skip to content

[feature] Add clip option for scatter, line, bar, lines, custom chart #11240

@pissang

Description

@pissang

Currently we have overflow issue on the axis with fixed min/max. As described in the following issues.

They are all related to the function of clipping the overflowed graphics.

So I'm planning to add a clip option in these series, whose default value is true.

The clipping strategy varies between series to achieve a good visual quality. For example:

  • Scatter series will ignore the graphics whose centroid is outside the grid.
  • Line series will use a rect clip path and let canvas do the clipping. But the symbol in line series will follow scatter series.
  • Bar series will do an intersection operation with the grid rect.
  • Custom series will also use a clip path to do the clipping. Since we can't sure what graphics will be used.

Series needs clip option

  • scatter
  • line
  • bar
  • pictorialBar
  • lines
  • candlestick
  • custom

Q: Why not use clip path for all series?

A: Let canvas do clipping may cause visual artifacts on particular series. For example:

  • It may cut the graphics into half.
  • It may cause line along the edge looks thinner

Reference of highcharts. https://api.highcharts.com/highcharts/series.line.clip

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions