Class XlsChartDataPoint
- Namespace
- Spire.Xls.Core.Spreadsheet.Charts
- Assembly
- Spire.XLS.dll
public class XlsChartDataPoint : XlsObject, IDisposable, IChartDataPoint, IExcelApplication
- Inheritance
-
XlsChartDataPoint
- Implements
- Derived
- Inherited Members
Properties
DataFormat
Gets / sets data format.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Line;//Set serie formatIChartSerieDataFormat format = chart.Series[0].DataFormat;//Set marker styleformat.MarkerStyle = ChartMarkerType.Star;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public IChartSerieDataFormat DataFormat { get; }
Property Value
DataLabels
Returns data labels object for the data point. Read-only.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["A1:C2"];//Get the chart serieIChartSerie serie = chart.Series[0];//Set data labels value visibilityserie.DataPoints.DefaultDataPoint.DataLabels.HasValue = true;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public IChartDataLabels DataLabels { get; }
Property Value
HasDataLabels
public bool HasDataLabels { get; }
Property Value
Index
Gets or sets index of the point in the points collection.
public int Index { get; }
Property Value
IsDefault
Indicates whether this data point is default data point. Read-only.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["A1:C2"];//Set serie formatIChartDataPoints dataPoints = chart.Series[0].DataPoints;//Check default DatapointConsole.WriteLine(dataPoints.DefaultDataPoint.IsDefault);Console.WriteLine(dataPoints[0].IsDefault);
public bool IsDefault { get; }
Property Value
SetAsTotal
True if the data point is considered as Subtotals or Totals. otherwise False.
public bool SetAsTotal { get; set; }
Property Value
Remarks
Applies only to Waterfall charts.
Methods
ClearDataFormats(XlsChartSerieDataFormat)
[Obsolete("the method is not implemented")]
public void ClearDataFormats(XlsChartSerieDataFormat format)
Parameters
format
XlsChartSerieDataFormat
CloneDataFormat(XlsChartSerieDataFormat)
[Obsolete("the method is not implemented")]
public void CloneDataFormat(XlsChartSerieDataFormat serieFormat)
Parameters
serieFormat
XlsChartSerieDataFormat