Interface IChartSerieDataFormat
Represents formatting options for the series data.
public interface IChartSerieDataFormat : IChartFillBorder
- Inherited Members
Properties
AreaProperties
Returns object, that represents aera properties. Read only.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set interior
IChartInterior interior = chart.Series[0].Format.AreaProperties;
//Set color
interior.ForegroundColor = Color.Red;
//Save to file
workbook.SaveToFile("Chart.xlsx");
IChartInterior AreaProperties { get; }
Property Value
BarTopType
Represents the top data format.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set chart type
chart.ChartType = ExcelChartType.Bar3DStacked;
//Set Bar shape base
chart.Series[0].Format.BarTopType = TopFormatType.Sharp;
//Save to file
workbook.SaveToFile("Chart.xlsx");
TopFormatType BarTopType { get; set; }
Property Value
BarType
Represents the base data format.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set chart type
chart.ChartType = ExcelChartType.Bar3DStacked;
//Set Bar shape base
chart.Series[0].Format.BarType = BaseFormatType.Circle;
//Save to file
workbook.SaveToFile("Chart.xlsx");
BaseFormatType BarType { get; set; }
Property Value
Is3DBubbles
True to draw bubbles with 3D effects.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set chart type
chart.ChartType = ExcelChartType.Bubble3D;
//Set serie format
IChartSerieDataFormat format = chart.Series[0].Format;
//Check type
Console.WriteLine(format.Is3DBubbles);
//Save to file
workbook.SaveToFile("Chart.xlsx");
bool Is3DBubbles { get; set; }
Property Value
IsAutoMarker
Automatic color.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:F2"];
//Set chart type
chart.ChartType = ExcelChartType.LineMarkers;
//Set serie data format
IChartSerieDataFormat format = chart.Series[0].DataPoints.DefaultDataPoint.DataFormat;
//Check auto marker
Console.Write(format.IsAutoMarker);
//Save to file
workbook.SaveToFile("Chart.xlsx");
bool IsAutoMarker { get; set; }
Property Value
IsMarkerSupported
Indicates whether marker is supported by this chart/series.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set chart type
chart.ChartType = ExcelChartType.Pie;
//Set serie format
IChartSerieDataFormat format = chart.Series[0].Format;
//Check marker support
Console.WriteLine(format.IsMarkerSupported);
//Save to file
workbook.SaveToFile("Chart.xlsx");
bool IsMarkerSupported { get; }
Property Value
MarkerBackgroundColor
Foreground color: RGB value (high byte = 0).
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set chart type
chart.ChartType = ExcelChartType.Line;
//Set serie format
IChartSerieDataFormat format = chart.Series[0].Format;
//Set marker style
format.MarkerStyle = ChartMarkerType.Circle;
//Set color
format.MarkerBackgroundColor = Color.Red;
format.MarkerForegroundColor = Color.Black;
//Save to file
workbook.SaveToFile("Chart.xlsx");
Color MarkerBackgroundColor { get; set; }
Property Value
MarkerBackgroundKnownColor
Index to color of marker XlsFill.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set chart type
chart.ChartType = ExcelChartType.Line;
//Set serie format
IChartSerieDataFormat format = chart.Series[0].Format;
//Set marker style
format.MarkerStyle = ChartMarkerType.Circle;
//Set color
format.MarkerBackgroundKnownColor = ExcelColors.Red;
format.MarkerForegroundKnownColor = ExcelColors.Black;
//Save to file
workbook.SaveToFile("Chart.xlsx");
ExcelColors MarkerBackgroundKnownColor { get; set; }
Property Value
MarkerForegroundColor
Background color: RGB value (high byte = 0).
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set chart type
chart.ChartType = ExcelChartType.Line;
//Set serie format
IChartSerieDataFormat format = chart.Series[0].Format;
//Set marker style
format.MarkerStyle = ChartMarkerType.Circle;
//Set color
format.MarkerBackgroundColor = Color.Red;
format.MarkerForegroundColor = Color.Black;
//Save to file
workbook.SaveToFile("Chart.xlsx");
Color MarkerForegroundColor { get; set; }
Property Value
MarkerForegroundKnownColor
Index to color of marker border.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set chart type
chart.ChartType = ExcelChartType.Line;
//Set serie format
IChartSerieDataFormat format = chart.Series[0].Format;
//Set marker style
format.MarkerStyle = ChartMarkerType.Circle;
//Set color
format.MarkerBackgroundKnownColor = ExcelColors.Red;
format.MarkerForegroundKnownColor = ExcelColors.Black;
//Save to file
workbook.SaveToFile("Chart.xlsx");
ExcelColors MarkerForegroundKnownColor { get; set; }
Property Value
MarkerSize
Size of line markers.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set chart type
chart.ChartType = ExcelChartType.Line;
//Set serie format
IChartSerieDataFormat format = chart.Series[0].Format;
//Set marker style
format.MarkerStyle = ChartMarkerType.Circle;
//Set marker size
format.MarkerSize = 10;
//Save to file
workbook.SaveToFile("Chart.xlsx");
int MarkerSize { get; set; }
Property Value
MarkerStyle
Type of marker.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set chart type
chart.ChartType = ExcelChartType.Line;
//Set serie format
IChartSerieDataFormat format = chart.Series[0].Format;
//Set marker style
format.MarkerStyle = ChartMarkerType.Star;
//Save to file
workbook.SaveToFile("Chart.xlsx");
ChartMarkerType MarkerStyle { get; set; }
Property Value
Options
Gets common serie options. Read-only.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set chart type
chart.ChartType = ExcelChartType.Column3DStacked;
//Set options
IChartFormat options = chart.Series[0].Format.Options;
//Set Gap width
options.GapWidth = 400;
//Save to file
workbook.SaveToFile("Chart.xlsx");
IChartFormat Options { get; }
Property Value
Percent
Distance of pie slice from center of pie.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["A1:C2"];
//Set chart type
chart.ChartType = ExcelChartType.Pie;
//Set percent
chart.Series[0].Format.Percent = 30;
//Save to file
workbook.SaveToFile("Chart.xlsx");
int Percent { get; set; }