DevExpress ChartControl StackedBarSeriesView 显示隐藏series | System.ArgumentOutOfRangeException

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.

Guess you like

Origin blog.csdn.net/cxu123321/article/details/92382764