Skip to content

Conversation

@ANAMASGARD
Copy link
Contributor

Root Cause

The cleanData() function in R/z_animintHelpers.R was removing columns with NA values BEFORE converting NA to "transparent", causing the fill column to be deleted.

Solution

Reordered operations so that:

  1. ✅ Convert fill=NA to fill="transparent" using toRGB() FIRST
  2. ✅ Then remove truly empty columns.

Files Changed

  • R/z_animintHelpers.R - The fix (3 lines reordered)
  • tests/testthat/test-compiler-legend-fill-na.R - New tests
  • NEWS.md - Changelog entry

Testing

  • ✅ 9 new unit tests (all passing)
  • ✅ Visual verification confirms legends now display correctly
  • ✅ JSON output verified: pointfill: "transparent" now present
  • ✅ No regressions in existing tests

Visual Proof

Before: Left legend solid ❌
Screenshot From 2025-10-05 18-36-50

After: Both legends hollow ✅
Screenshot From 2025-10-05 18-49-49

Closes #227

@ANAMASGARD
Copy link
Contributor Author

I have updated the NEWS.md file

@ANAMASGARD ANAMASGARD requested a review from tdhock October 7, 2025 01:03
@ANAMASGARD ANAMASGARD force-pushed the fill=NA-legend-not-working branch from 62465d7 to d334fd6 Compare October 7, 2025 05:00
@ANAMASGARD ANAMASGARD force-pushed the fill=NA-legend-not-working branch from d334fd6 to 219f037 Compare October 7, 2025 05:14
@ANAMASGARD ANAMASGARD requested a review from tdhock October 8, 2025 16:03
@ANAMASGARD
Copy link
Contributor Author

ANAMASGARD commented Oct 8, 2025

https://github.com/animint/animint2/pull/244/commits

03cee81

I HAVE MADE ALL THE CHANGES YOU ASKED FOR , PLEASE GIVE YOUR FEEDBACK SIR .

- Resolved NEWS.md conflict
- Keep both version 2025.10.9 (PR#242) and 2025.10.5 (PR#244) entries
@tdhock tdhock changed the title Fill=na legend not working like ill=transparent FIXED #227 fill=NA legend not working like fill=transparent Oct 22, 2025
@tdhock tdhock merged commit 0c78ef8 into animint:master Oct 22, 2025
1 of 4 checks passed
@tdhock
Copy link
Collaborator

tdhock commented Oct 22, 2025

great work! thanks very much

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.

fill=NA not respected by legend but fill=transparent is

2 participants