DevExpress.XtraSpreadsheet.v13.2.6 插入统计图

如题,Dev控件DevExpress.XtraSpreadsheet.SpreadsheetControl或者DevExpress.Spreadsheet.SpreadsheetControl这两个控件(类似)中,如何选定Range然后对选定的Range生成统计图。

                        spreadsheetControl1.BeginUpdate();
            Worksheet worksheet = spreadsheetControl1.ActiveWorksheet;
            Chart chart = worksheet.Charts.Add(ChartType.Line);
            chart = spreadsheetControl1.SelectedShape as Chart;
            ChartData argumentChartData = new ChartData();
            argumentChartData.RangeValue = WorkSheets[0]["A3:A393"];
            ChartData valueChartData = new ChartData();
            valueChartData.RangeValue = WorkSheets[0]["H3:H393"];
            Series series = _currentChart.Series.Add("title", argumentChartData, valueChartData);
            series.Outline.Width = 2;

            series.AxisGroup = AxisGroup.Secondary;

            spreadsheetControl1.EndUpdate();


以上代码无法使用.

1个回答

图片说明
官方说版本太低

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问