RS-19884: Export Price Sensitivity Meter as a chart when the default PowerPoint export format is Microsoft chart - #21
Open
JamieMorris1 wants to merge 1 commit into
Open
JamieMorris1 wants to merge 1 commit into
JamieMorris1 wants to merge 1 commit into
Conversation
…nt format is Default Attach a ChartSettings attribute, with data labels off for each series, so Displayr's Default export takes the same path as an explicit Microsoft Chart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JamieMorris1
marked this pull request as ready for review
October 2, 2026 05:23
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused implementation follows established chart metadata patterns and is adequately covered by tests.
Review effort: Balanced
Findings: None
What changed in this PR
Enables Price Sensitivity Meter outputs to export as editable Microsoft charts when configured as the document default.
Changes:
- Adds
ChartSettingswith data labels disabled for every series. - Tests all four output modes.
- Bumps the package version to 1.3.6.
| File | Description |
|---|---|
R/pricesensitivitymeter.R |
Adds Microsoft chart export settings. |
tests/testthat/test-pricesensitivitymeter.R |
Verifies settings across output modes. |
DESCRIPTION |
Updates the package version. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
chschan
approved these changes
Oct 2, 2026
chschan
left a comment
Contributor
There was a problem hiding this comment.
We could do more with to make preserve the other chart settings (e.g. line color etc), but considering that there are already considerable changes, I guess its not worthwhile
LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reviewing AI-generated PRs from Context Engineering
TL;DR: In a document whose default PowerPoint export format is Microsoft Chart, a Price Sensitivity Meter left on "Default (Microsoft Chart)" exports as an image. With this change it exports as an editable chart, as it already does when "Microsoft Chart" is chosen explicitly.
Verified using test r server: r-rs19884-psm.test.displayr.com
Before, exports as image, when default is set to ms chart:

After, exports as chart, when default is set to ms chart:

Fixes RS-19884.
When an R output's format is Default and the document's default is Microsoft Chart, Displayr exports it as an editable chart only if the output has a
ChartSettingsattribute. Otherwise it falls back to an image without telling the user. Standard visualizations get that attribute fromflipChart::CChart, butPriceSensitivityMeterdraws its chart withflipStandardCharts::Linedirectly and only attachedChartData. Choosing "Microsoft Chart" explicitly skips the check, which is why that workaround works.The fix attaches a minimal
ChartSettingswith data labels turned off for each series. The labels have to be turned off because onceChartSettingsis present, Displayr shows data labels on every series by default. The exported chart is then the same as today's explicit "Microsoft Chart" export, and no Price Sensitivity Meter styling is carried over yet.What CI can and can't show: the new test checks that the attribute is attached for all four "Show" outputs, but CI can't run Displayr's export. I checked that on nightly by wrapping
PriceSensitivityMeteroutput in R calculations with this attribute. For all four outputs, Default exported the same chart XML as an explicit "Microsoft Chart", apart from hidden data-label blocks. A Playwright regression test in q (src/tests/replicator/RS-19884.spec.ts) will confirm it end to end once this version is on nightly's R server. On this PR, the GitHub nix build ran the full testthat suite against this branch and passed (292 passed, 0 failed). CircleCI's BuildAndCheckPackage fails at "Install R dependencies" (remove.packages("rlang")finds no such package) before any tests run, as it has on master since at least February.What users will see change:
flipChart::CChart. It can no longer be picked as a table input to another analysis, and Google Slides export should produce a native chart. I haven't checked the Google Slides export.Follow-ups, deliberately left out: RS-23784 makes the editable chart match Displayr (the plotted lines only, the chart's own styling, intersection labels), and RS-23785 exports the two-axis output as an image with a warning.
AI involvement: the code change, the test and this description were written by Claude Code and checked by a separate review agent.
🤖 Drafted with
/bug-fixin Claude Code.