Tighten the chart colour guard and the axis check

Open
#60 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@MaxGhenis is already working on this.

Since Nov 27, 2026.

  • #61 by @MaxGhenis — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript, react

Research direction

Start with src/charts/noHex.test.js and src/charts/chartText.test.jsx, then inspect the chart components that use AXIS_PROPS. Add a sample covering decoded CSS text inside style elements, and update the axis check to inspect JSX props after spreads on both self-closing and paired axes. Done means both findings are covered by tests; the issue has linked open pull request #61.

Written by the indexing model from the issue text.

Description

The round-3 review of #58 raised two P3 findings. They're filed here so #58 could merge.

  • src/charts/noHex.test.js reads strings and template literals, not JSX text, so CSS inside a <style> element passes. For <style>.series &#123; stroke: #227773; &#125;</style> the scan reports nothing. No chart file has a <style> element today. Scan the decoded text inside <style> elements and add that case to the sample test.
  • The static axis check in src/charts/chartText.test.jsx accepts <XAxis axisLine={true} tickLine={false} />, which leaves the axis line and tick text in Recharts' #666. Its regex can also skip an axis written as a paired tag. All 18 axes spread AXIS_PROPS today, and the rendered checks cover every chart they draw. Parse the JSX instead, and check the axis line, tick and title props each axis ends up with, including any set after the spread.
Dominant language
Python
Stars
1
Forks
1
Avg merge
2d 21h
Merged PRs (30d)
10

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PolicyEngine/ai-inequality

All issues in PolicyEngine/ai-inequality

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.