|
|
|
|
|
Charts
Essential XlsIO has advanced support for creating and modifying Excel charts inside a workbook. There is an option to choose between creating a chart as an embedded chart or as a worksheet chart.
|
|
|
|
Embedded Charts
Essential XlsIO has APIs for creating an embedded chart. The IChartShape interface represents the embedded chart in-memory and this object can be used to format and modify the chart settings similar to modifying the chart properties using MS Excel.
There is also advanced support for formatting the Primary and Secondary chart Axis.
Output in Excel
Chart Worksheets
Instead, you can also create "Chart Worksheets" where a single chart is rendered in the whole worksheet. The IChart interface represents the in-memory representation of a Chart Worksheet in an Excel workbook. Several formatting options are also available to customize the look and feel of such charts.
Output in Excel
|
|
|
|
Essential XlsIO lets you several options to customize the look and feel of the chart elements like chart type, 3D effects, axis range, axis title format, legend position, etc.
The below code sets up two charts of type Pie and Area.
You can provide a 3D-effect to different chart types.
Setting up the range for the value axis.
There are options to customize the chart title and axis titles.
The chart legend can be positioned differently.
|
|
|
|
Though XlsIO provides several APIs to create a chart programatically, it's still does not expose all the customization capabilities like MS Excel does.
So, you could optionally create a template XLS file with a chart defined and customized using MS Excel. XlsIO can then write content into this template file and preserve the chart while saving the updated workbook.
|
|
|
|
|
|
|
|