Interface IOfficeChartFrameFormat
Represents the formatting settings of the chart element.
Inherited Members
Namespace: Syncfusion.OfficeChart
Assembly: Syncfusion.OfficeChart.NET.dll
Syntax
public interface IOfficeChartFrameFormat : IOfficeChartFillBorder
Properties
Border
Gets the border of the chart element. Read-only.
Declaration
IOfficeChartBorder Border { get; }
Property Value
Type |
---|
IOfficeChartBorder |
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 a new chart series with the name
IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
//Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData[2, 3, 4, 3];
//Format Chart Area.
IOfficeChartFrameFormat chartArea = chart.ChartArea;
//Chart Area Border Settings
//Style
chartArea.Border.LinePattern = OfficeChartLinePattern.Solid;
//Color
chartArea.Border.LineColor = System.Drawing.Color.Blue;
//Weight
chartArea.Border.LineWeight = OfficeChartLineWeight.Hairline;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Create a presentation instance
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = 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
Dim serieJan As IOfficeChartSerie = 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 a new chart series with the name
Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
'Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData(2, 3, 4, 3)
'Format Chart Area.
Dim chartArea As IOfficeChartFrameFormat = chart.ChartArea
'Chart Area Border Settings
'Style
chartArea.Border.LinePattern = OfficeChartLinePattern.Solid
'Color
chartArea.Border.LineColor = System.Drawing.Color.Blue
'Weight
chartArea.Border.LineWeight = OfficeChartLineWeight.Hairline
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
IsBorderCornersRound
Gets or sets flag if border corners is round.
Declaration
bool IsBorderCornersRound { get; set; }
Property Value
Type |
---|
System.Boolean |
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 borders with rounded corners
chart.ChartArea.IsBorderCornersRound = true;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Create a presentation instance
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = 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
Dim serieJan As IOfficeChartSerie = 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 borders with rounded corners
chart.ChartArea.IsBorderCornersRound = True
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
Layout
Gets or sets the Layout settings of TextArea of the chart element.
Declaration
IOfficeChartLayout Layout { get; set; }
Property Value
Type |
---|
IOfficeChartLayout |
Examples
//Open a presentation
IPresentation presentation = Presentation.Open("Template.pptx");
//Get a bubble chart from the slide
IPresentationChart chart = presentation.Slides[0].Charts[0];
//Format Plot Area
IOfficeChartFrameFormat plotArea = chart.PlotArea;
//Set the height mode
plotArea.Layout.Height = 150;
plotArea.Layout.HeightMode = LayoutModes.factor;
//Set the top mode
plotArea.Layout.Top = 100;
plotArea.Layout.TopMode = LayoutModes.edge;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Open a presentation
Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
'Get a bubble chart from the slide
Dim chart As IPresentationChart = presentation__1.Slides(0).Charts(0)
'Format Plot Area
Dim plotArea As IOfficeChartFrameFormat = chart.PlotArea
'Set the height mode
plotArea.Layout.Height = 150
plotArea.Layout.HeightMode = LayoutModes.factor
'Set the top mode
plotArea.Layout.Top = 100
plotArea.Layout.TopMode = LayoutModes.edge
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
Methods
Clear()
Clear current plot area.
Declaration
void Clear()
Examples
IPresentation presentation = Presentation.Create();
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, "2011");
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, "2009");
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, "2010");
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 a new chart series with the name
IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
//Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData[2, 3, 4, 3];
//Create a new chart series with the name
IOfficeChartSerie serieMarch = chart.Series.Add("March");
//Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData[2, 4, 4, 4];
//Set border settings
chart.PlotArea.Border.AutoFormat = false;
//Set the auto line color
chart.PlotArea.Border.IsAutoLineColor = false;
//Set the border line color
chart.PlotArea.Border.LineColor = System.Drawing.Color.Blue;
//Set the border line pattern
chart.PlotArea.Border.LinePattern = OfficeChartLinePattern.DashDot;
//Set the border line weight
chart.PlotArea.Border.LineWeight = OfficeChartLineWeight.Wide;
//Set the border transparency
chart.PlotArea.Border.Transparency = 0.6;
//Set the plot area�s fill type
chart.PlotArea.Fill.FillType = OfficeFillType.SolidColor;
//Set the plot area�s fill color
chart.PlotArea.Fill.ForeColor = System.Drawing.Color.LightPink;
//Set the plot area shodow presence
chart.PlotArea.Shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalTopLeft;
//Reset the plotarea
chart.PlotArea.Clear();
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation__1 As IPresentation = Presentation.Create()
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = 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, "2011")
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, "2009")
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, "2010")
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
Dim serieJan As IOfficeChartSerie = 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 a new chart series with the name
Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
'Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData(2, 3, 4, 3)
'Create a new chart series with the name
Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
'Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData(2, 4, 4, 4)
'Set border settings
chart.PlotArea.Border.AutoFormat = False
'Set the auto line color
chart.PlotArea.Border.IsAutoLineColor = False
'Set the border line color
chart.PlotArea.Border.LineColor = System.Drawing.Color.Blue
'Set the border line pattern
chart.PlotArea.Border.LinePattern = OfficeChartLinePattern.DashDot
'Set the border line weight
chart.PlotArea.Border.LineWeight = OfficeChartLineWeight.Wide
'Set the border transparency
chart.PlotArea.Border.Transparency = 0.6
'Set the plot area�s fill type
chart.PlotArea.Fill.FillType = OfficeFillType.SolidColor
'Set the plot area�s fill color
chart.PlotArea.Fill.ForeColor = System.Drawing.Color.LightPink
'Set the plot area shodow presence
chart.PlotArea.Shadow.ShadowInnerPresets = Office2007ChartPresetsInner.InsideDiagonalTopLeft
'Reset the plotarea
chart.PlotArea.Clear()
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()