EasyXLS™ library allows you to create Excel charts that can be positioned inside a worksheet. A chart can have two positions, as a distinct sheet or as an object in a worksheet. This chapter explains the second situation.
The Excel chart that is an object inside a worksheet has the position relative to sheet cells and the width and height of the Excel chart is specified in pixels.
EasyXLS also allows you to read Excel files that contain charts and extract chart information.
Concept in action
The below example shows how to export the chart to Excel and how the chart is placed inside a worksheet.
' Create Excel chart positioned at A10 cell with 600px width, 300px height
Dim xlsChart As ExcelChart = New ExcelChart("A10", 600, 300)
' Set chart data source
' Add chart to the worksheet
Dim xlsWorksheet As ExcelWorksheet = workbook.easy_getSheet("SourceData")
The screen shot provides an example of an exported column chart placed inside a worksheet.
EasyXLS™ library provides a large number of chart types, such as column chart, line chart, bar chart, pie chart, scatter chart, area chart, doughnut chart, radar chart, surface chart, bubble chart, stock chart, cylinder chart, cone chart and pyramid chart.