How to use a column dialog list for column switcher?
May 11, 2020 2:00 PM(435 views)
I want to create a script where a list of columns is selected in a column dialog and, later on, appears in the column switcher of graph builder.
The column name is unspecific in order to use the script for different data tables. I started to write a small code, however, in this version the "column switcher columns" need to be selected by the user manually after closing the column dialog. I am quite new to JSL and would appreciate some help to solve this problem.
Names Default to Here(1);
dt = Current Data Table() << Get Column Names;
cd = Column Dialog(
colx = ColList( "X", Max Col( 1 ), Modeling Type( "Continuous" ) ),
coly = ColList( "Y", Min Col( 1 ), Modeling Type( "Continuous" ) ),);
Size( 400, 300 ),
Show Control Panel( 0 ),
Variables( X( colx ), Y( coly ) ),
Elements( Line( X, Y, Legend( 3 ) ) ),
Column Switcher( coly ) );