Populating a chart by default when column names in table change. Referring to columns in table by position (order) rather than name

I am running a data function from my Spotfire dash-board which returns a table of numbers based on the analysis of a set of variables selected interactively.

For each run the names (headers) of the columns in the name are based on the interactive selection so they can be different between each run.

I have charts (line chart and scatter-plot) set-up to display the data for some of the variables (the first 4 from the left).

If I set up the charts "manually", i.e. I select the columns to display after a run, the charts will display an error message after the next run if different variables have been analyzed (the chart can no longer find columns with the names the charts were set up for previously).

If I set up the Y axis for the line chart with a simple expression like: $csearch([RF Prices Analyzed],"Not Dates") , the chart will dynamically reset to display the new variables for the run (except the column labelled "dates"). But all the variables will be displayed, not just the first 4, so the chart is too busy. This also does not work for the scatter-plot which accepts only one variable for each axis.

Is there a way to reference columns in an expression by their position in the table rather than their names?

Is there a way to reference a sub-set of columns in an expression without using their names?

1 Comment

The disadvantage of my last proposal is the chart now populates by default to the variable I pass as a custom expression, but it is no longer easy to select other variables you might want to display.

You have to specify "Remove All" to recover the layout with the menu below/next to the axis.

After you've have done that you have lost your default setting for the data function next runs.

Is there a way to combine both default set-up and easy interactive selection of the variable to show on the chart?.

michel.beck - Aug 24, 2016 - 5:49pm ::
+ Add a Comment

(2) Answers

Login