|
|
|
|
|
Charts
Essential XlsIO has advanced support for creating and modifying MS 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 Chart
Essential XlsIO has APIs to create 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. This is similar to modifying chart properties using MS Excel.
There is also advanced support for formatting the Primary and Secondary chart Axis.
Sample Code-Embedded Chart
Embedded Chart-Output in MS Excel
Worksheet Chart
You can also create a 'Worksheet Chart', where a single chart is rendered on the entire worksheet. The IChart interface is the in-memory representation of a Worksheet Chart in an MS Excel workbook. Several formatting options are also available to customize the appearance of such charts.
Sample Code- Worksheet Chart
Worksheet Chart-Output in MS Excel
|
|
|
|
Essential XlsIO has several options to customize the appearance of chart elements like chart type, 3D effects, axis range, axis title format, and legend position.
Sample Code-Pie Chart and Area Chart
Pie Chart and Area Chart-Output in MS Excel
You can provide a 3D-effect to different chart types as illustrated below:
Sample Code-3D Effect
3D Effect-Output in MS Excel
Set up the range of the value axis as illustrated below:
Sample Code-Set Value Axis Range
Set Value Axis Range-Output in MS Excel
There are options to customize the chart title and axes titles.
Sample Code-Customize Chart and Axes Titles
Custom Chart and Axes Titles-Output in MS Excel
The chart legend can be positioned differently.
Sample Code-Position Chart Legend
Position Chart Legend-Output in MS Excel
|
|
|
|
Though Essential XlsIO provides several APIs to create a chart programatically, it still does not provide all customization capabilities of MS Excel.
However, you can create a template XLS file with a defined chart customized using MS Excel, and then Essential XlsIO can write content into this template file and preserve the chart.
|
|
|
|
|
|
|
|