Interface IOfficeFill
Represents fill formatting for a shape.
Namespace: Syncfusion.OfficeChart
Assembly: Syncfusion.OfficeChart.Portable.dll
Syntax
public interface IOfficeFill
Properties
BackColor
Gets or sets a Color value that represents background color of the specified fill.This property is only for the pattern type fill.
Declaration
Color BackColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type of the chart area
chart.ChartArea.Fill.FillType = OfficeFillType.Pattern;
//Set the back anf fore color of the pattern
chart.ChartArea.Fill.BackColor = System.Drawing.Color.Green;
chart.ChartArea.Fill.ForeColor = System.Drawing.Color.Blue;
//Set the pattern
chart.ChartArea.Fill.Pattern = OfficeGradientPattern.Pat_30_Percent;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
BackColorIndex
Gets or sets a index value that represents a background color of the specified fill or patterned line.
Declaration
OfficeKnownColors BackColorIndex { get; set; }
Property Value
Type | Description |
---|---|
OfficeKnownColors |
FillType
Gets or sets the fill type for the shape.
Declaration
OfficeFillType FillType { get; set; }
Property Value
Type | Description |
---|---|
OfficeFillType |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type of the chart area
chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
//Set the gradient color type
chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.TwoColor;
//Set the Back and fore colors
chart.ChartArea.Fill.BackColor = System.Drawing.Color.FromArgb(205, 217, 234);
chart.ChartArea.Fill.ForeColor = System.Drawing.Color.White;
//Set the gradient style
chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.FromCorner;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
ForeColor
Gets or sets a Color value that represents foreground color of the specified fill.
Declaration
Color ForeColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type of the chart area
chart.ChartArea.Fill.FillType = OfficeFillType.Pattern;
//Set the back anf fore color of the pattern
chart.ChartArea.Fill.BackColor = System.Drawing.Color.Green;
chart.ChartArea.Fill.ForeColor = System.Drawing.Color.Blue;
//Set the pattern
chart.ChartArea.Fill.Pattern = OfficeGradientPattern.Pat_30_Percent;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
ForeColorIndex
Gets or sets a index value that represents a foreground color of the specified fill or patterned line.
Declaration
OfficeKnownColors ForeColorIndex { get; set; }
Property Value
Type | Description |
---|---|
OfficeKnownColors |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type of the chart area
chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
//Set the gradient color type
chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.OneColor;
//Set the gradient degree
chart.ChartArea.Fill.GradientDegree = 0.67;
//Set the gradient style
chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.Horizontal;
//Set the fore color index of the fill
chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Blue_grey;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
GradientColorType
Gets or sets the gradient color type for the specified fill.
Declaration
OfficeGradientColor GradientColorType { get; set; }
Property Value
Type | Description |
---|---|
OfficeGradientColor |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type of the chart area
chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
//Set the gradient color type
chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.TwoColor;
//Set the Back and fore colors
chart.ChartArea.Fill.BackColor = System.Drawing.Color.FromArgb(205, 217, 234);
chart.ChartArea.Fill.ForeColor = System.Drawing.Color.White;
//Set the gradient style
chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.FromCorner;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
GradientDegree
Gets or sets the value that represents gradient degree of the specified one-color shaded fill as a floating-point value from 0.0 (dark) through 1.0 (light)
Declaration
double GradientDegree { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type of the chart area
chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
//Set the gradient color type
chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.OneColor;
//Set the gradient degree
chart.ChartArea.Fill.GradientDegree = 0.67;
//Set the gradient style
chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.Horizontal;
//chart.ChartArea.Fill.BackColorIndex = OfficeKnownColors.Blue;
chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Blue_grey;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
GradientStyle
Gets or sets the gradient style for the specified fill.
Declaration
OfficeGradientStyle GradientStyle { get; set; }
Property Value
Type | Description |
---|---|
OfficeGradientStyle |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type of the chart area
chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
//Set the gradient color type
chart.ChartArea.Fill.GradientColorType = OfficeGradientColor.TwoColor;
//Set the Back and fore colors
chart.ChartArea.Fill.BackColor = System.Drawing.Color.FromArgb(205, 217, 234);
chart.ChartArea.Fill.ForeColor = System.Drawing.Color.White;
//Set the gradient style
chart.ChartArea.Fill.GradientStyle = OfficeGradientStyle.FromCorner;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
GradientVariant
Gets or sets the gradient variant type for the specified fill.
Declaration
OfficeGradientVariants GradientVariant { get; set; }
Property Value
Type | Description |
---|---|
OfficeGradientVariants |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type of the chart area
chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
//Set the fore color index of the fill
chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Brown;
//Set the gradient variant
chart.ChartArea.Fill.GradientVariant = OfficeGradientVariants.ShadingVariants_2;
//Set the preset gradient type
chart.ChartArea.Fill.PresetGradientType = OfficeGradientPreset.Grad_Desert;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Pattern
Gets or sets a value that represents the pattern applied to the specified fill.
Declaration
OfficeGradientPattern Pattern { get; set; }
Property Value
Type | Description |
---|---|
OfficeGradientPattern |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type of the chart area
chart.ChartArea.Fill.FillType = OfficeFillType.Pattern;
//Set the back anf fore color of the pattern
chart.ChartArea.Fill.BackColor = System.Drawing.Color.Green;
chart.ChartArea.Fill.ForeColor = System.Drawing.Color.Blue;
//Set the pattern
chart.ChartArea.Fill.Pattern = OfficeGradientPattern.Pat_30_Percent;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Picture
Gets a Image instance that represents user defined picture or texture. Read-only.
Declaration
Image Picture { get; }
Property Value
Type | Description |
---|---|
Image |
PictureName
Gets a user defined picture or texture name. Read-only.
Declaration
string PictureName { get; }
Property Value
Type | Description |
---|---|
System.String |
PresetGradientType
Gets or sets the preset gradient type for the specified fill.
Declaration
OfficeGradientPreset PresetGradientType { get; set; }
Property Value
Type | Description |
---|---|
OfficeGradientPreset |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type of the chart area
chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
//Set the fore color index of the fill
chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Brown;
//Set the gradient variant
chart.ChartArea.Fill.GradientVariant = OfficeGradientVariants.ShadingVariants_2;
//Set the preset gradient type
chart.ChartArea.Fill.PresetGradientType = OfficeGradientPreset.Grad_Desert;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Texture
Gets or sets texture of the specified fill.
Declaration
OfficeTexture Texture { get; set; }
Property Value
Type | Description |
---|---|
OfficeTexture |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type as texture
chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
//Set the texture type
chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
//Set the horizontal scale
chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
//Set the offset X
chart.ChartArea.Fill.TextureOffsetX = 50.40F;
//Set the offset Y
chart.ChartArea.Fill.TextureOffsetY = 67.54F;
//Set the vertical scale
chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
TextureHorizontalScale
Gets or sets the horizontal scaling factor for the texture fill.
Declaration
float TextureHorizontalScale { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type as texture
chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
//Set the texture type
chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
//Set the horizontal scale
chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
//Set the offset X
chart.ChartArea.Fill.TextureOffsetX = 50.40F;
//Set the offset Y
chart.ChartArea.Fill.TextureOffsetY = 67.54F;
//Set the vertical scale
chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
TextureOffsetX
Gets or sets the horizontal offset of the texture from the origin in points.
Declaration
float TextureOffsetX { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type as texture
chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
//Set the texture type
chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
//Set the horizontal scale
chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
//Set the offset X
chart.ChartArea.Fill.TextureOffsetX = 50.40F;
//Set the offset Y
chart.ChartArea.Fill.TextureOffsetY = 67.54F;
//Set the vertical scale
chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
TextureOffsetY
Gets or sets the vertical offset of the texture from the origin in points.
Declaration
float TextureOffsetY { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type as texture
chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
//Set the texture type
chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
//Set the horizontal scale
chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
//Set the offset X
chart.ChartArea.Fill.TextureOffsetX = 50.40F;
//Set the offset Y
chart.ChartArea.Fill.TextureOffsetY = 67.54F;
//Set the vertical scale
chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
TextureVerticalScale
Gets or sets the vertical scaling factor for the texture fill.
Declaration
float TextureVerticalScale { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type as texture
chart.ChartArea.Fill.FillType = OfficeFillType.Texture;
//Set the texture type
chart.ChartArea.Fill.Texture = OfficeTexture.Blue_Tissue_Paper;
//Set the horizontal scale
chart.ChartArea.Fill.TextureHorizontalScale = 6.7F;
//Set the offset X
chart.ChartArea.Fill.TextureOffsetX = 50.40F;
//Set the offset Y
chart.ChartArea.Fill.TextureOffsetY = 67.54F;
//Set the vertical scale
chart.ChartArea.Fill.TextureVerticalScale = 4.5F;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Transparency
Gets or sets a value that represents transparency level of the specified Solid color shaded fill as a floating-point value from 0.0 (Clear) through 1.0(Opaque)
Declaration
double Transparency { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type of the chart area
chart.ChartArea.Fill.FillType = OfficeFillType.SolidColor;
//chart.ChartArea.Fill.BackColorIndex = OfficeKnownColors.Blue;
chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.Blue_grey;
//Set the transparency of the fill
chart.ChartArea.Fill.Transparency = 0.5;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
TransparencyColor
Gets or Sets the Transparency for specified picture_only.
Declaration
float TransparencyColor { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
TransparencyFrom
Gets or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear).
Declaration
double TransparencyFrom { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
TransparencyTo
Gets or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear).
Declaration
double TransparencyTo { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Visible
Gets or sets a value that indicates whether the fill style is visible or not.
Declaration
bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
OneColorGradient()
Sets the specified fill to a one-color gradient.
Declaration
void OneColorGradient()
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type as texture
chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
//Se the specified fill to one color gradient
chart.ChartArea.Fill.OneColorGradient();
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
OneColorGradient(OfficeGradientStyle)
Sets the specified fill to a one-color gradient.
Declaration
void OneColorGradient(OfficeGradientStyle style)
Parameters
Type | Name | Description |
---|---|---|
OfficeGradientStyle | style | Represents shading style. |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type as texture
chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
//Se the specified fill to one color gradient
chart.ChartArea.Fill.OneColorGradient(OfficeGradientStyle.Vertical, OfficeGradientVariants.ShadingVariants_2);
//Set the fill type for plot area
chart.PlotArea.Fill.FillType = OfficeFillType.Gradient;
//Set the fore color for plot area
chart.PlotArea.Fill.ForeColor = System.Drawing.Color.PowderBlue;
//Se the specified fill to one color gradient
chart.PlotArea.Fill.OneColorGradient(OfficeGradientStyle.Diagonl_Up);
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
OneColorGradient(OfficeGradientStyle, OfficeGradientVariants)
Sets the specified fill to a one-color gradient.
Declaration
void OneColorGradient(OfficeGradientStyle style, OfficeGradientVariants variant)
Parameters
Type | Name | Description |
---|---|---|
OfficeGradientStyle | style | Represents shading style. |
OfficeGradientVariants | variant | Represents shading variant. |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the fill type as texture
chart.ChartArea.Fill.FillType = OfficeFillType.Gradient;
//Se the specified fill to one color gradient
chart.ChartArea.Fill.OneColorGradient(OfficeGradientStyle.Vertical, OfficeGradientVariants.ShadingVariants_2);
//Set the fill type for plot area
chart.PlotArea.Fill.FillType = OfficeFillType.Gradient;
//Set the fore color for plot area
chart.PlotArea.Fill.ForeColor = System.Drawing.Color.PowderBlue;
//Se the specified fill to one color gradient
chart.PlotArea.Fill.OneColorGradient(OfficeGradientStyle.Diagonl_Up);
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Patterned(OfficeGradientPattern)
Sets the specified fill to a pattern.
Declaration
void Patterned(OfficeGradientPattern pattern)
Parameters
Type | Name | Description |
---|---|---|
OfficeGradientPattern | pattern | The pattern to be used for the specified fill. |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the pattern fill for chart area
chart.ChartArea.Fill.Patterned(OfficeGradientPattern.Pat_50_Percent);
//Set the fore color
chart.ChartArea.Fill.ForeColor = System.Drawing.Color.PowderBlue;
//Set the back color
chart.ChartArea.Fill.BackColor = System.Drawing.Color.Pink;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
PresetGradient(OfficeGradientPreset)
Sets the specified fill to a preset gradient.
Declaration
void PresetGradient(OfficeGradientPreset grad)
Parameters
Type | Name | Description |
---|---|---|
OfficeGradientPreset | grad | Represents preset gradient type. |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the preset gradient
chart.ChartArea.Fill.PresetGradient(OfficeGradientPreset.Grad_Early_Sunset);
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
PresetGradient(OfficeGradientPreset, OfficeGradientStyle)
Sets the specified fill to a preset gradient.
Declaration
void PresetGradient(OfficeGradientPreset grad, OfficeGradientStyle shadStyle)
Parameters
Type | Name | Description |
---|---|---|
OfficeGradientPreset | grad | Represents preset gradient type. |
OfficeGradientStyle | shadStyle | Represents gradient style, for preset gradient. |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the preset gradient
chart.ChartArea.Fill.PresetGradient(OfficeGradientPreset.Grad_Parchment, OfficeGradientStyle.Horizontal);
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
PresetGradient(OfficeGradientPreset, OfficeGradientStyle, OfficeGradientVariants)
Sets the specified fill to a preset gradient.
Declaration
void PresetGradient(OfficeGradientPreset grad, OfficeGradientStyle shadStyle, OfficeGradientVariants shadVar)
Parameters
Type | Name | Description |
---|---|---|
OfficeGradientPreset | grad | Represents preset gradient type. |
OfficeGradientStyle | shadStyle | Represents gradient style, for preset gradient. |
OfficeGradientVariants | shadVar | Represents gradient variant for preset gradient. |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the preset gradient
chart.ChartArea.Fill.PresetGradient(OfficeGradientPreset.Grad_Fire, OfficeGradientStyle.FromCorner, OfficeGradientVariants.ShadingVariants_1);
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
PresetTextured(OfficeTexture)
Sets the specified fill format to a preset texture.
Declaration
void PresetTextured(OfficeTexture texture)
Parameters
Type | Name | Description |
---|---|---|
OfficeTexture | texture | Represents texture to set. |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the preset texture
chart.ChartArea.Fill.PresetTextured(OfficeTexture.Canvas);
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Solid()
Sets the specified fill to a uniform color.
Declaration
void Solid()
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the solid fill for chart area
chart.ChartArea.Fill.Solid();
//Set the fore color for chart area
chart.ChartArea.Fill.ForeColor = System.Drawing.Color.PowderBlue;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
TwoColorGradient()
Sets the specified fill to a two-color gradient.
Declaration
void TwoColorGradient()
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the gradient color
chart.ChartArea.Fill.TwoColorGradient();
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
TwoColorGradient(OfficeGradientStyle)
Sets the specified fill to a two-color gradient.
Declaration
void TwoColorGradient(OfficeGradientStyle style)
Parameters
Type | Name | Description |
---|---|---|
OfficeGradientStyle | style | Represents shading style. |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the gradient color
chart.ChartArea.Fill.TwoColorGradient(OfficeGradientStyle.Horizontal);
//Set the fore color index
chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.BlueCustom;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
TwoColorGradient(OfficeGradientStyle, OfficeGradientVariants)
Sets the specified fill to a two-color gradient.
Declaration
void TwoColorGradient(OfficeGradientStyle style, OfficeGradientVariants variant)
Parameters
Type | Name | Description |
---|---|---|
OfficeGradientStyle | style | Represents shading style. |
OfficeGradientVariants | variant | Represents shading variant. |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Set the gradient color
chart.ChartArea.Fill.TwoColorGradient(OfficeGradientStyle.Vertical, OfficeGradientVariants.ShadingVariants_2);
//Set the fore color index
chart.ChartArea.Fill.ForeColorIndex = OfficeKnownColors.BlueCustom;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
UserPicture(Image, String)
Fills the specified shape with one large image.
Declaration
void UserPicture(Image im, string name)
Parameters
Type | Name | Description |
---|---|---|
Image | im | Represents user defined image. |
System.String | name | The name of the picture file. |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Create instance for image
System.Drawing.Image image = System.Drawing.Image.FromFile("Image.gif");
//Set the picture fill type for chart area
chart.ChartArea.Fill.UserPicture(image, "Image");
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
UserTexture(Image, String)
Fills the specified shape with small tiles of an image.
Declaration
void UserTexture(Image im, string name)
Parameters
Type | Name | Description |
---|---|---|
Image | im | Represents user defined texture. |
System.String | name | Represents name of user defined texture. |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Create instance for image
System.Drawing.Image image = System.Drawing.Image.FromFile("Image.gif");
//Set the texture fill type for chart area
chart.ChartArea.Fill.UserTexture(image, "Image");
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();