F1: training form driven by the API schema; Sankey stopped nodes at the left
The training form flattens the discriminated source union generically: the discriminator becomes a select labelled by each variant's title, a variant's fields hide unless it is chosen, and the payload keeps only the chosen variant's fields. No variant names, option labels or Hz labels live in the WebApp. The Sankey places the three 'Se quedó en' nodes in the leftmost column, every node at its own position.
This commit is contained in:
@@ -490,6 +490,9 @@ export function sexCountBars(r: Reading, catalog: Catalog, axis: string, period:
|
||||
};
|
||||
}
|
||||
|
||||
export const SANKEY_X = [0.22, 0.5, 0.78, 0.999, 0.001, 0.001, 0.001];
|
||||
export const SANKEY_Y = [0.2, 0.2, 0.2, 0.2, 0.5, 0.75, 0.999];
|
||||
|
||||
export function teaSankey(r: Reading): Figure {
|
||||
const [mchat, psychology, neuro, eeg] = [
|
||||
'mchat_only',
|
||||
@@ -521,7 +524,7 @@ export function teaSankey(r: Reading): Figure {
|
||||
{
|
||||
type: 'sankey',
|
||||
arrangement: 'fixed',
|
||||
node: { label: labels, color: colors, align: 'left', pad: 24, hovertemplate },
|
||||
node: { label: labels, color: colors, x: SANKEY_X, y: SANKEY_Y, pad: 24, hovertemplate },
|
||||
link: {
|
||||
source: links.map(({ source }) => source),
|
||||
target: links.map(({ target }) => target),
|
||||
|
||||
Reference in New Issue
Block a user