EnableSeries

Syntax graph.EnableSeries(true|false, SeriesNumber, [,SeriesNumber]*)

Description This enables or disables a row of data. By default, all rows of data are enabled, so you will probably only use this command to filter data series.

This command can filter any number of series. Each series should be separated by a comma. It can also filter ranges of series, as illustrated in Example 5.20 below. A range of series is denoted by a hyphen between the low and high value in the range.

Perhaps the main difference between this command and the graph. EnableRow() command is that it is a post-processing command. It occurs after data from a spreadsheet is converted to series and categories. This means that graph. Transposed() applies to this command, while it doesn't apply to graph. EnableRow().

The usefulness of this method is illustrated with the following example—suppose you are importing data for a bar graph. When a user clicks on a certain series of bars, you want to drill-down to a pareto graph, which only uses one series of data. By filtering out all of the other series, you would be able to use the exact same data as you used from your bar graph, saving you from having to make another data query. For example, if a user drill-downed on the fifth series of data, you would add this PCScript command to filter out all of the other series:

Example 5.20 Hiding Data Series

Graph.EnableSeries(false, 1-4, 6)