Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feat/add line segmentation#144

Merged
hunterg325 merged 17 commits intomainfrom
feat/add-line-segmentation
Feb 26, 2026
Merged

Feat/add line segmentation#144
hunterg325 merged 17 commits intomainfrom
feat/add-line-segmentation

Conversation

@hunterg325
Copy link
Collaborator

@hunterg325 hunterg325 commented Feb 26, 2026

Description

Implement line and area segmentation via null data entries with a connectNulls option, including core data-path changes, shaders, documentation, examples, and acceptance tests.[page:1]

Changes

  • Add design doc and implementation plan for line segmentation (null gaps + connectNulls).[page:1]
  • Widen CartesianSeriesData types to accept null entries for line and area series.[page:1]
  • Introduce connectNulls option on line/area series and resolve it in option resolution.[page:1]
  • Add gap-aware handling in data upload and sampling paths, bypassing sampling when null gaps are present.[page:1]
  • Update line vertex shader and area vertex generation to detect and respect NaN/null gaps.[page:1]
  • Add line-gaps acceptance test that validates null-gap detection, filtering, bounds computation, option resolution, and sampling bypass behavior.[page:1]
  • Add exchange-gaps example (HTML + TS) to demo exchange maintenance gaps, connectNulls toggle, multi-asset outages, and trading session concatenation.[page:1]
  • Document null-gaps / line segmentation behavior and connectNulls in docs/api/options.md and surface the feature in the README and examples index.[page:1]
  • Ensure connectNulls works with both array and columnar data formats and fix columnar handling where necessary.[page:1]
  • Misc: improve exchange-gaps example readability and drop internal docs/plans from tracking.[page:1]

Type of Change

  • New feature
  • Tests
  • Documentation update

Related Issues

Closes #103

Addresses #103. Documents the NaN sentinel approach for rendering
disconnected line/area segments via null entries in data arrays.
12-task TDD plan covering types, option resolution, shader NaN
detection, data pipeline, example page, acceptance tests, and docs.
The connectNulls filtering used Array.isArray() as a guard, which
returned false for MutableXYColumns (XYArraysData) after the
coordinator converts DataPoint[] to columnar format. Added filterGaps()
that handles all CartesianSeriesData formats. Replaced the minimal
line-gaps dev example with a realistic exchange-gaps showcase using
crypto price data with maintenance windows.
Normalize multi-asset chart to % change so ETH and SOL share the same
y-axis scale. Fix connectNulls toggle losing xAxis/yAxis/dataZoom config
on setOption(). Add null gaps highlight to README.
These files were committed before the gitignore entry was added.
The .gitignore already excludes docs/plans/ — local copies preserved.
@hunterg325 hunterg325 merged commit d5f330c into main Feb 26, 2026
2 checks passed
@hunterg325 hunterg325 deleted the feat/add-line-segmentation branch February 26, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: multiple segments for a line

1 participant