This question is similar to another post about how to parse chart column names.
I want to create a simple bar chart where my Y columns are determined by user selection from a col list box.
I can't figure out a way to use parse and or expr to put my user selections into the chart statement.
For other types of charts (like Overlay), I have been able to use a list of columns to do this, but I can't
seem to do that with chart.
This code generates the graph when the Ycols are known:
dt = Open("$ENGLISH_SAMPLE_DATA/Big Class.jmp");
Chart (X( :name )
,
Y( :height, :weight )
);
When I have user selected YCols, I need to do something like this:
Chart1Expr= expr(Chart(
X(:name),
Y(ycols)
));
replaceycols = expr(:height, :weight) <- this doesn't work, but it's like what I neednewchartexpr = substitute(name expr(Chart1Expr), expr(ycols), expr(replaceycols));
newchartexpr;