In order to hide all of the stack
Then push in order to display Series
for (int i = chartControl1.Series.Count; i > = 0; i--) {// hide all the stack order
chartControl1.Series [I] = .Visible to false;
}
for (int I = 0; I <chartControl1 .Series.Count; i ++) {// stack sequentially displayed selectively
if (showArr.Contains (i + 1) ) {// comprising (I +. 1)
chartControl1.Series [I] = .Visible to true;
}
}
otherwise
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
Additional information: Index was out of range. It must be non-negative and less than the set size.