u013553804
XML火柴
采纳率50%
2018-11-15 08:55

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条回答

  • u013553804 XML火柴 3年前

    图片说明
    官方说版本太低

    点赞 评论 复制链接分享

为你推荐