We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to set shadows for plot area or axis in chart using XlsIO?

This article explains how to set shadow to plot area in chart using XlsIO.

 

What is Plot Area?

 

The plot area in a chart or graph refers to the area of the chart that graphically displays the data being charted. The plot area of a 2-D chart contains the data markers, gridlines, data labels, trendlines, and optional chart items placed in the chart area. Whereas the plot area of a 3-D chart contains all the above items along with walls, floor, axes, axis titles, and tick-mark labels in the chart.

 

C:\Users\kondurukeerthi.kondu\AppData\Local\Microsoft\Windows\INetCache\Content.Word\Set_Shadow.png

Shadow for plot area set using XlsIO

 

Code snippet to set shadow to plot area in chart using XlsIO

 

 

Steps to add shadow to plot area in chart

 

  1. Initialize chart

 

Create a chart object by calling the worksheet.Charts.Add method and specify the chart type to ExcelChartType.Line enum value.

 

 

  1. Assign data

 

Set a range of data from the worksheet to chart’s DataRange property. To plot the series values in column and categories in row, set chart’s IsSeriesInRows property to false.

 

 

  1. Apply chart elements

 

Add basic chart elements like chart title, legend and datalabels.

 

  • ChartTitle of chart object.
  • Set TRUE to chart’s HasLegend property, to show the legend.
  • Set TRUE to chart’s HasLegend property, to show the legend.

 

 

  1. Set shadow to plot area

 

Set shadow to plot area in chart using properties in IShadow.

 

 

Applicable properties for a shadow of plot area in chart

 

Basic properties applicable for a shadow of plot area in a chart

 

1.   Angle

2.   Blur

3.   Distance

4.   HasCustomShadowStyle

5.   ShadowColor

6.   ShadowInnerPresets

7.   ShadowOuterPresets

8.   ShadowPrespectivePresets

9.   Size

10. Transperency

 

Note : We can set shadow to plot area in chart using CustomShadowStyles method as well.

 

Download Complete Sample

 

Download input file with data

 

The following C#/VB complete code snippet explains how to set shadow to plot area in chart using XlsIO.

 

C#

 

 

VB

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
8511 02/28/2018 03/01/2018 Windows Forms XlsIO
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.