I’ve written a Graph Builder script with two Column Switchers (for X and Y axes).
The code runs without errors, but the Column Switcher controls do not appear in the graph UI.
When I simplify to a standalone Graph Builder (outside New Window or New Script), the switchers appear normally.
Is there a known limitation or syntax nuance that causes Column Switcher not to render when used inside saved table scripts or New Window blocks?
Example (anonymized but structurally identical):
// Visualization Script: KPI Trends by X-axis
Current Data Table() << New Script(
"Graphs: KPI v X-axis",
New Window("KPI Trends",
Graph Builder(
Size( 457, 346 ),
Fit to Window( "Off" ),
Variables(
X( :"X-axis Variable"n ),
Y( :"Primary Metric (%)"n ),
Overlay( :Batch_ID ),
Color( :Group_ID )
),
Elements(
Line( X, Y, Legend( 21 ) ),
Points( X, Y, Legend( 22 ) )
),
// Switch between time-based axes
Column Switcher(
:"X-axis Variable"n,
{:"X-axis Variable"n, :"Alternate X Variable"n}
),
// Switch between various KPIs on Y-axis
Column Switcher(
:"Primary Metric (%)"n,
{
:"Primary Metric (%)"n,
:"Metric_1 (unit)"n,
:"Metric_2 (unit)"n,
:"Metric_3 (unit)"n,
:"Metric_4 (unit)"n,
:"Metric_5 (unit)"n,
:"Metric_6 (unit)"n,
:"Metric_7 (unit)"n
}
//Retain Axis Settings( 0 ) // (Commented)
),
SendToReport(
Dispatch(
{},
"Primary Metric (%)",
ScaleBox,
{Min( 0 )}
)
)
)
)
);
Notes: