//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets[0]; GrapeCity.Documents.Excel.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Excel.Drawing.ChartType.ColumnClustered, 250, 20, 360, 230); worksheet.Range["A1:D2"].Value = new object[,] { {100, 200, 300, 400}, {100, 200, 300, 400} }; shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D2"], GrapeCity.Documents.Excel.Drawing.RowCol.Columns); shape.Chart.ChartTitle.Text = "Column Clustered Chart"; // Save to an excel file workbook.Save("ColumnClusteredChart.xlsx");
' Create a new Workbook Dim workbook As New Workbook Dim worksheet As IWorksheet = workbook.Worksheets(0) Dim shape As IShape = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 250, 20, 360, 230) worksheet.Range("A1:D2").Value = New Object(,) { {100, 200, 300, 400}, {100, 200, 300, 400} } shape.Chart.SeriesCollection.Add(worksheet.Range("A1:D2"), RowCol.Columns) shape.Chart.ChartTitle.Text = "Column Clustered Chart" ' save to an excel file workbook.Save("ColumnClusteredChart.xlsx")