Skip to content

## [0.7.2] - 2026-03-05 - Gradient Fill Support#25

Merged
alaa-eddine merged 3 commits intomainfrom
dev
Mar 5, 2026
Merged

## [0.7.2] - 2026-03-05 - Gradient Fill Support#25
alaa-eddine merged 3 commits intomainfrom
dev

Conversation

@alaa-eddine
Copy link
Contributor

[0.7.2] - 2026-03-05 - Gradient Fill Support

Added

  • Gradient Fill (FillRenderer): Added support for Pine Script's gradient fill variant — fill(plot1, plot2, top_value, bottom_value, top_color, bottom_color). The renderer detects plotOptions.gradient === true and renders each polygon segment with a vertical ECharts linear gradient, mapping top_color to the higher-value boundary and bottom_color to the lower-value boundary. Gracefully falls back to a semi-transparent grey if per-bar color data is missing.
  • ColorUtils.toRgba(): Added a new utility method to convert any parsed color + opacity pair into a reliable rgba() string, handling rgb(), 6-digit hex, and 8-digit hex (#RRGGBBAA) inputs.
  • ColorUtils.parseColor() — 8-digit Hex: Extended parseColor() to handle #RRGGBBAA colors (the format PineTS emits for color.new() with alpha), correctly extracting the alpha channel as opacity.

Fixed

  • Fill References Broken by color: na: Fixed fill plots losing their reference data when the source plot had segments with color: na (invisible segments). Previously, plotDataArrays stored the post-nullification array (where na-color points were set to null), so the fill had gaps wherever the source plot was invisible. Now a separate rawDataArray is stored with the original numeric values, ensuring fills always see the underlying data regardless of visibility.

@alaa-eddine alaa-eddine merged commit 44622a5 into main Mar 5, 2026
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.

1 participant