Class XlsChartSerieDataFormat
- Namespace
- Spire.Xls.Core.Spreadsheet.Charts
- Assembly
- Spire.XLS.dll
public class XlsChartSerieDataFormat : XlsObject, IExcelApplication, IDisposable, IChartSerieDataFormat, IChartFillBorder
- Inheritance
-
XlsChartSerieDataFormat
- Implements
- Derived
- Inherited Members
Properties
AreaProperties
Returns object, that represents aera properties. Read only.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set interiorIChartInterior interior = chart.Series[0].Format.AreaProperties;//Set colorinterior.ForegroundColor = Color.Red;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public IChartInterior AreaProperties { get; }
Property Value
BackGroundColor
Represents background color.
public Color BackGroundColor { get; set; }
Property Value
BackGroundColorObject
Represents background color.
public OColor BackGroundColorObject { get; }
Property Value
BackGroundKnownColor
Represents background excel color.
public ExcelColors BackGroundKnownColor { get; set; }
Property Value
BarTopType
Represents the top data format.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Bar3DStacked;//Set Bar shape basechart.Series[0].Format.BarTopType = TopFormatType.Sharp;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public TopFormatType BarTopType { get; set; }
Property Value
BarType
Represents the base data format.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Bar3DStacked;//Set Bar shape basechart.Series[0].Format.BarType = BaseFormatType.Circle;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public BaseFormatType BarType { get; set; }
Property Value
Fill
Represents XlsFill options. Read-only.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeIChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["B2:C6"];//Set chart typechart.ChartType = ExcelChartType.Column3DClustered;//Gets fill options for the chart elementIShapeFill fillChart = chart.ChartArea.Fill;fillChart.FillType = ShapeFillType.Gradient;fillChart.BackColor = Color.FromArgb(205, 217, 234);fillChart.ForeColor = Color.White;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public IShapeFill Fill { get; }
Property Value
ForeGroundColor
Represents foreground color.
public Color ForeGroundColor { get; set; }
Property Value
ForeGroundColorObject
Represents foreground color object.
public OColor ForeGroundColorObject { get; }
Property Value
ForeGroundKnownColor
Represents foreground color.
public ExcelColors ForeGroundKnownColor { get; set; }
Property Value
Format3D
public Format3D Format3D { get; }
Property Value
HasBorder
Indicates whether chart has border.
public bool HasBorder { get; }
Property Value
HasBorderLine
Indicates whethers chart has border line.
public bool HasBorderLine { get; }
Property Value
HasFormat3D
public bool HasFormat3D { get; }
Property Value
HasInterior
This property indicates whether interior object was created. Read-only.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeIChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["B2:C6"];//Set chart typechart.ChartType = ExcelChartType.Column3DClustered;//Create a fill border and set interior valueIChartFillBorder fillBorder = chart.ChartArea;chart.ChartArea.Interior.ForegroundColor = Color.Yellow;//True if the chart element has interior formattingif (fillBorder.HasInterior){//Your Code Here}//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool HasInterior { get; }
Property Value
HasLineProperties
This property indicates whether line formatting object was created. Read-only.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeIChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["B2:C6"];//Set chart typechart.ChartType = ExcelChartType.Column3DClustered;//Create a fill border and set line border valueIChartFillBorder fillBorder = chart.ChartArea;chart.ChartArea.Border.Color = Color.Yellow;//True if the chart element has line formattingif (fillBorder.HasLineProperties){//Your Code Here}//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool HasLineProperties { get; }
Property Value
HasShadow
public bool HasShadow { get; }
Property Value
Has_dPtPieExplosion
Indicates whether dataformat has PieExplosion.
public bool Has_dPtPieExplosion { get; set; }
Property Value
Interior
Returns object, that represents area properties. Read-only.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeIChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["B2:C6"];//Set chart typechart.ChartType = ExcelChartType.Column3DClustered;//Gets interior formatting properties for the chart elementIChartInterior chartInterior = chart.ChartArea.Interior;chartInterior.BackgroundColor = Color.Beige;chartInterior.Pattern = ExcelPatternType.DarkDownwardDiagonal;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public IChartInterior Interior { get; }
Property Value
Is3DBubbles
True to draw bubbles with 3D effects.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Bubble3D;//Set serie formatIChartSerieDataFormat format = chart.Series[0].Format;//Check typeConsole.WriteLine(format.Is3DBubbles);//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool Is3DBubbles { get; set; }
Property Value
IsAutoMarker
Automatic color.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:F2"];//Set chart typechart.ChartType = ExcelChartType.LineMarkers;//Set serie data formatIChartSerieDataFormat format = chart.Series[0].DataPoints.DefaultDataPoint.DataFormat;//Check auto markerConsole.Write(format.IsAutoMarker);//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool IsAutoMarker { get; set; }
Property Value
IsAutomaticFormat
Indicates, if automatic format is used.
public bool IsAutomaticFormat { get; set; }
Property Value
IsBorderSupported
Indicates whether border object is supported. Read-only.
public bool IsBorderSupported { get; }
Property Value
IsFormatted
Indicate if data format is formatted.
public bool IsFormatted { get; }
Property Value
IsInteriorSupported
Indicates whether interior object is supported. Read-only.
public bool IsInteriorSupported { get; }
Property Value
IsMarker
If true - format has marker; otherwise false. Read-only.
public bool IsMarker { get; }
Property Value
IsMarkerSupported
Indicates whether marker is supported by this chart/series.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Pie;//Set serie formatIChartSerieDataFormat format = chart.Series[0].Format;//Check marker supportConsole.WriteLine(format.IsMarkerSupported);//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool IsMarkerSupported { get; }
Property Value
IsShadow
[Obsolete("get and set are not implemented")]
public bool IsShadow { get; set; }
Property Value
IsShowBackground
True = "background = none".
public bool IsShowBackground { get; }
Property Value
IsShowForeground
True = "foreground = none".
public bool IsShowForeground { get; }
Property Value
IsSmoothed
If true - format has smothed line; otherwise false. Read-only.
public bool IsSmoothed { get; }
Property Value
IsSmoothedLine
True if the line series has a smoothed line.
public bool IsSmoothedLine { get; set; }
Property Value
IsSupportFill
Indicats whether chart supports transparency.
public bool IsSupportFill { get; }
Property Value
LineProperties
Returns object, that represents line properties. Read-only.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeIChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["B2:C6"];//Set chart typechart.ChartType = ExcelChartType.Column3DClustered;//Gets line formatting properties for the chart elementIChartBorder border = chart.PlotArea.Border;border.Pattern = ChartLinePatternType.DashDotDot;border.Color = Color.Orange;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public ChartBorder LineProperties { get; }
Property Value
MarkerBackColorObject
Gets object that holds marker background color.
public OColor MarkerBackColorObject { get; }
Property Value
MarkerBackgroundColor
Foreground color: RGB value (high byte = 0).
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Line;//Set serie formatIChartSerieDataFormat format = chart.Series[0].Format;//Set marker styleformat.MarkerStyle = ChartMarkerType.Circle;//Set colorformat.MarkerBackgroundColor = Color.Red;format.MarkerForegroundColor = Color.Black;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public Color MarkerBackgroundColor { get; set; }
Property Value
MarkerBackgroundKnownColor
Index to color of marker XlsFill.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Line;//Set serie formatIChartSerieDataFormat format = chart.Series[0].Format;//Set marker styleformat.MarkerStyle = ChartMarkerType.Circle;//Set colorformat.MarkerBackgroundKnownColor = ExcelColors.Red;format.MarkerForegroundKnownColor = ExcelColors.Black;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public ExcelColors MarkerBackgroundKnownColor { get; set; }
Property Value
MarkerBorderWidth
Marker border weight(unit pt).
public double MarkerBorderWidth { get; set; }
Property Value
MarkerFill
Get fill object of the marker.
The following code illustrates how to fill a marker .
var markerFill = chart.Series[0].Format.MarkerFill;
//fill by defined Texture
markerFill.Texture = GradientTextureType.GreenMarble;
//fill by defined Pattern
markerFill.Pattern = GradientPatternType.PatLargeCheckerBoard;
//Pattern need set fore/background color
markerFill.ForeColor = Color.Blue;
markerFill.BackColor = Color.Red;
//fill by a picture
markerFill.CustomPicture("type1.png")
//set transparency: value from 0.0 (Clear) through 1.0(Opaque)
markerFill.Transparency = 0.5;
public IShapeFill MarkerFill { get; }
Property Value
MarkerForeColorObject
Gets object that holds marker foreground color.
public OColor MarkerForeColorObject { get; }
Property Value
MarkerForegroundColor
Background color: RGB value (high byte = 0).
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Line;//Set serie formatIChartSerieDataFormat format = chart.Series[0].Format;//Set marker styleformat.MarkerStyle = ChartMarkerType.Circle;//Set colorformat.MarkerBackgroundColor = Color.Red;format.MarkerForegroundColor = Color.Black;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public Color MarkerForegroundColor { get; set; }
Property Value
MarkerForegroundKnownColor
Index to color of marker border.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Line;//Set serie formatIChartSerieDataFormat format = chart.Series[0].Format;//Set marker styleformat.MarkerStyle = ChartMarkerType.Circle;//Set colorformat.MarkerBackgroundKnownColor = ExcelColors.Red;format.MarkerForegroundKnownColor = ExcelColors.Black;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public ExcelColors MarkerForegroundKnownColor { get; set; }
Property Value
MarkerSize
Size of line markers.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Line;//Set serie formatIChartSerieDataFormat format = chart.Series[0].Format;//Set marker styleformat.MarkerStyle = ChartMarkerType.Circle;//Set marker sizeformat.MarkerSize = 10;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public int MarkerSize { get; set; }
Property Value
MarkerStyle
Type of marker.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Line;//Set serie formatIChartSerieDataFormat format = chart.Series[0].Format;//Set marker styleformat.MarkerStyle = ChartMarkerType.Star;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public ChartMarkerType MarkerStyle { get; set; }
Property Value
MarkerTransparencyValue
Gets or sets the transparency of the line marker.
public double MarkerTransparencyValue { get; set; }
Property Value
- double
The transparency.
Options
Gets common serie options. Read-only.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Column3DStacked;//Set optionsIChartFormat options = chart.Series[0].Format.Options;//Set Gap widthoptions.GapWidth = 400;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public IChartFormat Options { get; }
Property Value
ParentSerie
public XlsChartSerie ParentSerie { get; }
Property Value
Pattern
Represents pattern.
public ExcelPatternType Pattern { get; set; }
Property Value
Percent
Distance of pie slice from center of pie.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Pie;//Set percentchart.Series[0].Format.Percent = 30;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public int Percent { get; set; }
Property Value
QuartileCalculationType
Gets / Sets whether the Quartile calculation is Exclusive or Inclusive
public ExcelQuartileCalculation QuartileCalculationType { get; set; }
Property Value
Remarks
Applies only to Box and Whisker Charts
SeriesNumber
[Obsolete("get and set are not implemented")]
public int SeriesNumber { get; set; }
Property Value
Shadow
public ChartShadow Shadow { get; }
Property Value
ShowActiveValue
[Obsolete("get and set are not implemented")]
public bool ShowActiveValue { get; set; }
Property Value
ShowBubble
[Obsolete("get and set are not implemented")]
public bool ShowBubble { get; set; }
Property Value
ShowCategoryLabel
[Obsolete("get and set are not implemented")]
public bool ShowCategoryLabel { get; set; }
Property Value
ShowConnectorLines
Gets or sets a boolean value indicating whether to display Connector Lines between data points
public bool ShowConnectorLines { get; set; }
Property Value
Remarks
Applies only to Waterfall Charts
ShowInnerPoints
Gets or sets a boolean value indicating whether to display Inner Points in Box and Whisker chart
public bool ShowInnerPoints { get; set; }
Property Value
ShowMeanLine
Gets or sets a boolean value indicating whether to display Mean Line in Box and Whisker chart
public bool ShowMeanLine { get; set; }
Property Value
ShowMeanMarkers
Gets or sets a boolean value indicating whether to display Mean Marker in Box and Whisker chart
public bool ShowMeanMarkers { get; set; }
Property Value
ShowOutlierPoints
Gets or sets a boolean value indicating whether to display Outlier Points in Box and Whisker chart
public bool ShowOutlierPoints { get; set; }
Property Value
ShowPieCategoryLabel
[Obsolete("get and set are not implemented")]
public bool ShowPieCategoryLabel { get; set; }
Property Value
ShowPieInPercents
[Obsolete("get and set are not implemented")]
public bool ShowPieInPercents { get; set; }
Property Value
SmoothLine
[Obsolete("get and set are not implemented")]
public bool SmoothLine { get; set; }
Property Value
TreeMapLabelOption
Gets / Sets the Display label position in Tree map chart
public ExcelTreeMapLabelOption TreeMapLabelOption { get; set; }
Property Value
Remarks
By Default the Label is overlapped
Visible
Represents visiblity.
public bool Visible { get; set; }