Skip to content

RS-22593: Expose pictograph value as ChartData and title as ChartLabels$ChartTitle - #15

Closed
JustinCCYap wants to merge 2 commits into
masterfrom
RS-22593
Closed

RS-22593: Expose pictograph value as ChartData and title as ChartLabels$ChartTitle#15
JustinCCYap wants to merge 2 commits into
masterfrom
RS-22593

Conversation

@JustinCCYap

@JustinCCYap JustinCCYap commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Pictograph visualizations render a value (and, for VisualizeNumber, a title via text.above) but did not expose them on the output object, so consumers reading attr(x, "ChartData") / attr(x, "ChartLabels")$ChartTitle — notably the LLM-readable generation used by Chat to answer questions from existing outputs — had nothing to read or label.
  • VisualizeNumber now sets the input value as ChartData and text.above as ChartLabels$ChartTitle (computed once, NULL when no title is shown) directly on the widget at each of its return paths (main and icon/pictograph).
  • PictographChart attaches its cleaned data matrix as ChartData (captured before the internal rescale for icon rendering). It has no title, so no ChartLabels.

Jira: RS-22593

Test plan

  • test-visualizenumber.R: asserts ChartData and ChartLabels$ChartTitle are exposed on both return paths, and that no title is exposed when text.above is empty.
  • test-pictographchart.R: asserts ChartData matches the input values and no ChartLabels is set.
  • Note: R was not available locally to run tests; relying on CI.

AI code etiquette

  • The code changes and tests were AI-generated (Claude) and reviewed by me. The VisualizeNumber change touches control flow (two return paths), so it warrants closer review than the pictograph/PSM data attachment.

🤖 Generated with Claude Code

JustinCCYap and others added 2 commits July 13, 2026 15:21
…ls$ChartTitle

VisualizeNumber and PictographChart rendered their value (and, for
VisualizeNumber, a title via text.above) but did not expose them on the
output, so consumers reading attr(x, "ChartData") / attr(x, "ChartLabels")
(e.g. the LLM-readable generation) had nothing to read or label.

VisualizeNumber now attaches the input value as ChartData and text.above as
ChartLabels$ChartTitle (when non-empty), applied to both of its return paths.
PictographChart attaches its cleaned data matrix as ChartData; it has no title.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the wrapper helper with direct attribute assignment at each return
path. The title to expose is computed once (NULL when no title is shown), so
each path sets ChartData and ChartLabels on its widget without nesting calls.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant