Test evidence
Association scatter
Every requirement of this module, the tests named for it, and what each test recorded the last time the evidence was rebuilt.
Summary
- Requirements
- 87
- Tests named for them
- 89 (41 unit, 48 browser)
- Result
- pass every test passing
- Screenshots
- 16
- Recorded
- 2026-10-04 19:02 UTC
- Environment
- linux 6.17.0-1022-azure · node v22.23.3 · playwright 1.61.1 · chromium 149.0.7827.55
The requirements are the rows of the module’s requirement matrix. A test is named for a requirement by starting its name with the requirement’s ID. The results are read from the committed evidence set; continuous integration reruns every test and fails when the committed set no longer matches.
Requirements and their tests
AS-KIT-001 pass
The chart is built from
SafetyViz.kit, found on the page: safety.viz's bundle and bio.viz's are two script tags, and every panel is drawn with the kit's Chart.js constructor. On a page without safety.viz the chart refuses to be made, with a message saying thatSafetyViz.kitwas not found.AS-KIT-002 pass
bio.viz's committed bundles export
associationScatter, hold none of safety.viz and no Chart.js, and defining the chart needs no safety.viz.AS-KIT-003 pass
The chart is built from the parts every chart shares, in
src/shared/: the statistics line's rounds and waiting state, the reading of the tables, the settings checks, and the kit's shell, filters, listing, CSV download and participant rail. It imports nothing of the group comparison chart, which is built from the same parts, nor of the correlation matrix, and none of them is written a second time in the chart's own files. How a variable is written in settings and in a request is shared with the correlation matrix, insrc/shared/variables.js.AS-KIT-004 pass
The chart's source holds no statistical inference: no arithmetic of a correlation, a regression, a smooth, an interval or a p-value is written in it. What it works out is a logarithm for a logarithmic axis, its inverse to place R's points on that axis, and the room about an axis.
AS-CFG-001 pass
Every setting has a default, the column and baseline settings carry the core's names and defaults, and a setting the group comparison chart also has is named the same, with the same default.
AS-CFG-002 pass
Each axis is set by a variable as the core takes one,
xandy: a biomarker at a visit with a value type, or a participant-level column, which is read as a number. A malformed variable is refused where it was written.AS-CFG-003 pass
A caller's settings are laid over the defaults; a setting that is not known, or a value a setting cannot take, is refused with a message naming it.
AS-CFG-004 pass
The chart has no setting that chooses a confidence level, a minimum number of pairs, an adjustment or how smooth a smooth is.
AS-DATA-001 pass
The chart draws one point per participant. The rows come from the core's frame with x and y as two variables, so a participant missing either is left out and counted by the core's reason and by the axis it was missing on.
AS-DATA-002 pass
Either axis is a biomarker at a visit with any value type, or a participant-level number.
AS-DATA-003 pass
A colour splits the points by the levels of a group, and panels by one further variable give one panel per level, each holding its own participants, all on the same two axes.
AS-DATA-004 pass
Each axis has its own scale, linear or logarithmic. On a logarithmic axis a value of zero or less is left out and counted for that axis, a participant is counted once, and the axis's room is a ratio.
AS-DATA-005 pass
A filter chooses participants: the ones filtered out are not drawn, and are not counted as missing a result. A filter that lets nobody through draws nothing and raises no error.
AS-DATA-006 pass
With the results table alone the points are the ones the participant table would give, and a column carried on the results rows can be a colour or a participant-level number.
AS-DATA-007 pass
An axis is named for its variable, with the unit its values are in; a fold change has no unit, a percent change is in percent, and a column is named by its label.
AS-DATA-008 pass
A change, a fold change or a percent change read at the one baseline visit is the same for every participant; the chart draws nothing there and asks for a later visit.
AS-DATA-009 pass
The identity line is y = x across the part of the two axes they share: two ends when the axes have the same scale, a curve along y = x when one is logarithmic and one linear, and nothing where they share no value. It reads no data.
AS-DATA-010 pass
A region holds the participants whose point is inside it on both axes, edges included, however its corners are given.
AS-CTRL-001 pass
The participant-level numbers an axis can take are the columns in which every written value is a number and more than one value occurs: the participant table's, or those carried on the results rows. The setting
numbers, when given, is the list.AS-CTRL-002 pass
With no variable named the chart opens on the first two biomarkers at the first visit, with stated fallbacks for one biomarker and one visit. A variable that is named is the one it opens on, and one the tables do not have gives way to the defaults and is reported.
AS-CTRL-003 pass
The variable, the value type, the visit and the scale of each axis are chosen in the sidebar, and the chart follows; a participant-level number has no value type and no visit, and a baseline value has no visit.
AS-CTRL-004 pass
The colour, the panels, the fitted line and the method are chosen in the sidebar, and Reset chart returns every control and filter to what the chart opened on.
AS-DRAW-001 pass
On the synthetic study the chart draws the planted pair, TNF-alpha against IL-10 at Baseline, as one point per participant at its two results, with each axis named for its variable and unit and the note saying how many of how many are drawn.
AS-DRAW-002 pass
A colour gives each level its own colour and a key; the key does not switch a level off, because the coefficient is of every point drawn.
AS-DRAW-003 pass
Panels by one further variable are each a chart of their own on the same two axes, with their own count.
AS-DRAW-004 pass
Each axis can be logarithmic on its own; values of zero or less are left out and the note above the chart counts them by axis.
AS-DRAW-005 pass
The identity line is drawn with no R attached, and nothing is asked of R for it.
AS-FILTER-001 pass
Loaded with the results table alone the chart draws and shows no filters; with the vendored results, which carry no participant-level column, it offers no colour and no panel.
AS-FILTER-002 pass
Loaded with participant data the chart shows a filter per category column and offers the participant-level variables to colour and panel by and on either axis; a filter narrows the participants drawn, and the note follows.
AS-FILTER-003 pass
On the demo, filters with nobody in common leave the chart reading
No participant passes the filters., in the words every chart uses, with the note that none of the participants pass; nothing is drawn, R is asked nothing, the filters and Reset chart stay usable, nothing is written to the console, and loosening a filter draws again.AS-FILTER-004 pass
A filter reads its spec by the rule safety.viz's charts follow, through the kit's
reconcileFilters:startsets what it opens on and All is still offered; onlyall: falseremoves All, and its first value is then the one in force; a value the data lacks falls back to All with a console warning naming the filter; and the selection each control shows is the selection the chart filters by.AS-STAT-001 pass
What R is asked for a panel is the function named in settings, the panel's rows by the names of their fields, and the arguments
strXCol,strYColandstrMethod, withstrGroupColwhen there is a colour. Nothing else is sent.AS-STAT-002 pass
The identity of a panel's rows states what was drawn by the settings' names: the two variables, the baseline settings, the colour and its levels in the rows, the panel, the filters in force and each logarithmic scale. A member that is not set is left out, the method is not part of it, and no two views share one.
AS-STAT-003 pass
On a logarithmic axis R is handed the base-10 logarithm of that axis's values, the values as plotted, and the scale is part of the rows' identity, so a result stored for one scale never answers for the other.
AS-STAT-004 pass
The result is printed through the shared formatter with its method and counts, labelled exploratory and unadjusted, and the coefficient with the interval R gave, each number R's own to four significant figures; no star and never the word significant.
AS-STAT-005 pass
Spearman's coefficient is printed with no interval, because R gives none, and R's note says so; none is made up.
AS-STAT-006 pass
With a colour the coefficient within each level is printed from R's rows as a small table, each with its count, its interval and its p-value, under a caption naming the method and labelling them unadjusted; a level with too few pairs prints R's reason in its row.
- pass unit association scatter: what the line says AS-STAT-006: with a colour the coefficient within each level is printed from R’s rows as a small table, each with its count, its interval and its p-value under a caption naming the method; a level with too few pairs prints R’s reason in its row (#26)
AS-STAT-007 pass
Too few pairs prints R's reason once and no number.
AS-STAT-008 pass
R's warnings and notes are printed as R worded them, and an answer that is not R's result reads as what it is: unavailable, not stored for this view, or an error.
AS-STAT-009 pass
From the moment a result is asked for until it arrives the line says it is waiting, with the page's note until R has answered once; an answer that arrives after the chart has been drawn again is never shown. A fitted line waits in its own words.
AS-STAT-010 pass
What a coefficient covers is said under it, and every time an axis is logarithmic the line says which scale the statistic was computed on, for either coefficient and for either fitted line.
AS-STAT-011 pass
The rows desktop R is run on are the chart's: each case is one panel of the gallery's demo in one view, its rows made by the chart's own code from the demo's own tables and settings, and deriving them again gives the committed files. The files hold the values the chart drew; on a logarithmic axis the chart hands R their base-10 logarithm, and the R script takes that logarithm itself.
- pass unit the rows R is run on AS-STAT-011: deriving each case’s rows again, with the chart’s own code from the demo’s own tables and settings, gives the committed files (#26)
- pass unit the rows R is run on AS-STAT-011: the rows are the chart’s: one per participant, the fields the chart hands R, the values the chart drew, and the demo’s settings read from the demo’s own script (#26)
AS-STAT-012 pass
The expected results name the script, the R version, and the commit and checksum of the vendored statistics file that made them, and hold one result per case: both coefficients, a coefficient per colour, a level and a view too small, and both fitted lines.
AS-STAT-013 pass
A stored result written from R by the documented recipe is one the chart finds: for every case the function, the arguments, the identity and the row count R wrote are the ones the chart asks with, and handed to a connection each is found by its own view's request and by no other's.
- pass unit what desktop R answered, and the key it wrote AS-STAT-013: for every case the function, the arguments, the identity and the row count R wrote by the recipe are the ones the chart asks with (#26)
- pass unit what desktop R answered, and the key it wrote AS-STAT-013: handed to a connection as stored results, each of R’s answers is found by the chart’s request for its panel, and by no other view’s (#26)
AS-STAT-014 pass
The correlation the synthetic study was planted with, 0.6, lies inside the interval R gives for the planted pair; and R's Spearman coefficient is the same on logarithms as on the values, while Pearson's is not.
AS-STAT-015 pass
On the page, with no R attached, the statistics line of every panel reads that statistics are unavailable, and nothing is fetched to say so.
AS-STAT-016 pass
On the page, with a connection given in settings, the line shows that it is waiting until R answers and then prints the answer; R is asked for the rows that are drawn.
AS-STAT-017 pass
On the page, a change to a variable, a visit, a scale, the colour, the panels, the method or a filter each clears the line and asks R again for what is then drawn, and the answer to the question before is never shown. A region asks R nothing.
AS-STAT-018 pass
On the page, each panel asks R for itself, on its own rows and under its own identity, and is answered for itself.
AS-STAT-019 pass
On the page, with R's answers stored and no R attached, a view an answer was stored for prints it, the coefficient with its interval and the table per colour, with no request to R's hosts; a view none was stored for reads unavailable, never another view's numbers.
AS-STAT-020 pass
On the page, with an axis logarithmic, the line says which scale the statistic was computed on, and R is handed the logarithms.
AS-FIT-001 pass
A fitted line is asked of R for a panel with the function named in settings, the rows and the identity the coefficient is asked with, and the arguments
strXCol,strYColandstrMethod,linearorsmooth, withstrGroupColwhen there is a colour. The identity line is never asked for.AS-FIT-002 pass
A linear fit prints the test of its slope with its method and counts, the slope and the intercept with the intervals R gave, and R-squared; with a colour, each level's slope and intercept in a small table. Too few pairs prints R's reason and no number.
AS-FIT-003 pass
A smooth prints its method and the pairs it used and no p-value, because a smooth has no test, with R's notes; a level R drew no curve for says why.
AS-FIT-004 pass
The lines drawn are exactly the points R returned, joined, with R's band between its lower and upper points; on a logarithmic axis each is put back on the axis's own scale. With no answer from R there is no line, and the chart says it is not drawn and why.
AS-FIT-005 pass
On the page, with no R attached, a linear fit and a smooth are not drawn and the chart says why, while the points and the identity line still draw.
AS-FIT-006 pass
On the page, with R's answers stored, a linear fit and a smooth are drawn from R's points with their band, each colour's in its colour, and the slope and intercept are printed with their intervals.
AS-BRUSH-001 pass
Dragging across the points selects a region: its participants are listed in the kit's record listing, the points outside it fade, and the footnote says how many of how many are listed. The statistics stay those of every participant drawn, R is not asked again, and the chart says so.
AS-BRUSH-002 pass
With panels a region is in the panel it was dragged in and lists that panel's participants;
chart.brush()selects one by values and names its panel, and a new region replaces the last.AS-BRUSH-003 pass
Where a finger is the pointer a drag on the chart scrolls the page until Select a region is switched on; then a drag selects a region and does not scroll. A tap on a point lists its participant either way.
AS-BRUSH-004 pass
A change to a control or a filter, a click on nothing, or
chart.clearBrush()lets go of the region and empties the listing, so it never lists a region that is no longer drawn.AS-LIST-001 pass
The listing's search and paging work on the participants listed, and its export downloads them as CSV under this chart's name.
AS-PROF-001 pass
Clicking a point lists that participant and opens their profile: the chart raises safety.viz's
participantsSelectedevent with the participant's id, and safety.viz's participant profile opens on it. A row of the listing does the same.AS-LIFE-001 pass
init,setData,setSettings,render,resizeanddestroydrive the chart as they drive a safety.viz chart;setSettings({ x, y })opens it on a named pair, andview()reads back what the controls are set to.AS-LIFE-002 pass
Tables the chart cannot read are refused with a message, shown in the chart's element.
AS-LIFE-003 pass
The chart can be mounted inside another chart's element on a named pair, with a way back: the setting
backputs a button above the chart that calls the caller's function, by a click or from the keyboard.AS-MOBILE-001 pass
At a 390-pixel-wide viewport the chart fills the width with its controls folded away one tap from open, panels stack one to a row, and the page does not scroll sideways.
AS-MOBILE-002 pass
At a 390-pixel-wide viewport a point can be tapped, its listing read and a profile opened below the chart, with the coefficient, the table per colour and the fitted line's table beneath, and the page still does not scroll sideways.
AS-SITE-001 pass
The gallery lists the association scatter with links to its live demo, its evidence page and its API reference.
AS-SITE-002 pass
The live demo draws the chart on the synthetic study, opening on the planted pair coloured by arm, from safety.viz's vendored bundle and bio.viz's committed one, with R attached and gsm.bio's statistics file published beside it. Where R's host cannot be reached it still draws, and says that R could not be started.
AS-SITE-003 pass
The live demo holds at a 390-pixel-wide viewport with no horizontal scroll.
AS-SITE-004 pass
The API reference has a table row for every setting the chart has; the site build fails when one is missing.
AS-LIVE-001 pass
The gallery's demo draws first and starts R in the browser when the chart first asks, from webR's pinned version and gsm.bio's vendored statistics file, with no R package installed. The line waits, saying what the first start costs, and then prints Pearson's coefficient, its interval and its p-value, for everyone and within each arm, equal to desktop R's for the same rows within 1 part in 10^8; the planted 0.6 lies inside the printed interval.
AS-LIVE-002 pass
On the demo, Spearman's coefficient, overall and within each arm, equals desktop R's for the same rows; where R's own answer differs between the desktop's version and the browser's, both are recorded and nothing else differs.
AS-LIVE-003 pass
On the demo, the linear fit's slope, intercept, their intervals and every point of the line and its band, overall and within each arm, equal desktop R's, and the lines drawn are those points.
AS-LIVE-004 pass
On the demo, the smooth's curve and band equal desktop R's, and no p-value is printed for it.
AS-LIVE-005 pass
On the demo, with both axes logarithmic, Pearson's coefficient and the linear fit are those of the logarithms and equal desktop R's, and the line says which scale they were computed on.
AS-LIVE-006 pass
On the demo, a filter change shows the waiting state and then the new result, which equals desktop R's, and never the old one; a level with too few pairs, and a view with too few, print R's reason and no number.
AS-LIVE-007 pass
The megabytes and seconds of the demo's first statistic are measured, printed in the run's log and written to a file with both versions' answers, and are what the page tells its reader in the waiting text.
AS-LIVE-008 pass
On a phone the demo prints R's coefficient, its table per arm and the fitted line's, and the page does not scroll sideways.
AS-STAT-021 pass
When the connection is replaced (
setSettings({ connection })), an answer that arrives late from the connection it replaced is never shown: it changes neither the statistics line nor whatchart.statistics()reports.AS-FAIL-001 pass
When drawing fails, the association scatter says so in its footnote (
This chart could not be drawn:and why), takes away what was drawn of the panels, ends the statistics round, empties the listing and the participant rail, says it in the danger colour and keeps its controls; once drawing works again it draws.AS-DROP-001 pass
With a participant table, a participant the results have and the table does not is left out and counted (
Not in the participant table), and a row of results with no participant id is counted (Row has no participant id); a participant table without the participant id column is refused with a sentence that names the column.AS-DROP-002 pass
With results for participants the participant table does not have and filters that let nobody through, the chart says
No participant passes the filters., as it does with no such rows.AS-DROP-003 pass
A setting that names a participant id column the participant table does not have (
setSettings({ participant_id_col })) is refused with the same sentence as the tables are, before anything changes, and the chart stays as it was drawn.AS-STAT-022 pass
The R recipe run on a data frame with a panel column that holds numbers writes the identity as text, as the chart asks with, so a stored result written that way is found.
AS-DROP-004 pass
The participant table and the setting that names its id column change together:
setData(tables, settings)checks the tables against the settings it is given with them, lays the settings over, and draws.
Checking this page
npm ci
npm run evidence:check # rerun every test and compare with the committed evidence set
npm run evidence # rebuild docs/evidence/association-scatter/evidence.json















