Repository navigation
fix(chart): render the delta under the pen's mask - #137
Merged
Merged
Conversation
The delta readout rendered the active pen's difference under a fixed 0.###, so a pressure pen read every difference below 0.0005 as 0. PenValueFormat.FormatDifference renders it under the positive section of the pen's mask, and a catalogue apply refreshes the readout.
A positive section carrying a literal +, ( or ) rendered a negative difference as -+5.0 or -(5.0), because .NET puts its own minus ahead of the section. FormatDifference drops those literals and keeps the exponent's sign.
mrcsin
force-pushed
the
delta-pen-format
branch
from
October 16, 2026 14:58
6209098 to
7fbc2e6
Compare
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.
Problem
The delta readout rendered the active pen's Δy under a fixed
0.###, whatever mask the pen carries. A pressure pen in the 1e-3..1e-6 range read every difference below 0.0005 as0, and the readout disagreed with the precision the sidebar and the hover readout show for the same pen. The literal also sat outsidePenValueFormat, whichAGENTS.mdnames as the only owner of a pen's rendering.What changed
PenValueFormat.FormatDifference(value, mask): the difference renders under the positive section of the pen's mask alone, or under0.###when the mask is unusable. A reading's negative section may leave the sign out (0.0;0.0) and its zero section may print a dash for "no reading" (0.0;(0.0);-); neither suits a difference, which is often negative and often zero.ChartDeltaCursorReader.FormatReadouttakes the pen's mask;TrendChartViewModel.DeltaReadoutTextpasses the active pen'sPen.Formatand raisesDeltaReadoutTextafter a catalogue apply, so a mask edited in the pen editor reaches a readout already on screen.charting.md(PenValueFormat),trend-interaction.md(delta cursors),AGENTS.md(thePenValueFormatrule names the delta readout).-1.5-1.50.00E+000-1.20E-050.0011.000.0;(0.0);-00.0Verification
SemiPlot.Tests.Unit: 2273 passed. New:ADifferenceRendersUnderThePositiveSectionOfTheMask(7 cases),FormatReadout_RendersTheDeltaYUnderThePensMask,DeltaMode_RendersTheDeltaYUnderTheActivePensMask_AndFollowsAMaskTheCatalogueChanges; the last fails with the newRaisePropertyChangedremoved.dotnet format --verify-no-changes(pre-commit hook) andterseclean.