Class ChartSerieImpl
This class represents ChartSeries object.
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Charts
Assembly: Syncfusion.XlsIO.Portable.dll
Syntax
public class ChartSerieImpl : CommonObject, IDisposable, IChartSerie, IParentApplication, ISerializableNamedObject, INamedObject, IReparse
  Constructors
ChartSerieImpl(IApplication, Object)
Creates series and set its Application and Parent properties to specified values.
Declaration
public ChartSerieImpl(IApplication application, object parent)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IApplication | application | Application object for the chart.  | 
      
| System.Object | parent | Parent object for the chart.  | 
      
ChartSerieImpl(IApplication, Object, IList<BiffRecordRaw>, ref Int32)
Creates series from the array of BiffRecords.
Declaration
public ChartSerieImpl(IApplication application, object parent, IList<BiffRecordRaw> data, ref int iPos)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IApplication | application | Application object for the series.  | 
      
| System.Object | parent | Parent object for the series.  | 
      
| System.Collections.Generic.IList<Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRaw> | data | Array of BiffRecords with series data.  | 
      
| System.Int32 | iPos | Position of the first series record.  | 
      
Fields
DEF_CHART_GROUP
Represents default chart group.
Declaration
public const int DEF_CHART_GROUP = -1
  Field Value
| Type | 
|---|
| System.Int32 | 
DEF_FALSE
Represents false as string.
Declaration
public const string DEF_FALSE = "FALSE"
  Field Value
| Type | 
|---|
| System.String | 
DEF_FORMAT_ALLPOINTS_INDEX
Index for format that corresponds to all points in the Series.
Declaration
public const int DEF_FORMAT_ALLPOINTS_INDEX = 65535
  Field Value
| Type | 
|---|
| System.Int32 | 
DEF_TRUE
Represents true as string.
Declaration
public const string DEF_TRUE = "TRUE"
  Field Value
| Type | 
|---|
| System.String | 
Properties
Bubbles
Bubble sizes for the series.
Declaration
public IRange Bubbles { get; set; }
  Property Value
| Type | 
|---|
| IRange | 
CategoryLabels
Category labels for the series.
Declaration
public IRange CategoryLabels { get; set; }
  Property Value
| Type | 
|---|
| IRange | 
ChartGroup
Index of the chart group.
Declaration
public int ChartGroup { get; set; }
  Property Value
| Type | 
|---|
| System.Int32 | 
DataPoints
Returns data points collection for the chart series. Read-only.
Declaration
public IChartDataPoints DataPoints { get; }
  Property Value
| Type | 
|---|
| IChartDataPoints | 
EnteredDirectlyBubbles
Represents bubble values as entered directly.
Declaration
public object[] EnteredDirectlyBubbles { get; set; }
  Property Value
| Type | 
|---|
| System.Object[] | 
EnteredDirectlyCategoryLabels
Represents category values as entered directly.
Declaration
public object[] EnteredDirectlyCategoryLabels { get; set; }
  Property Value
| Type | 
|---|
| System.Object[] | 
EnteredDirectlyValues
Represents value as entered directly.
Declaration
public object[] EnteredDirectlyValues { get; set; }
  Property Value
| Type | 
|---|
| System.Object[] | 
ErrorBarsX
Represents X error bars. Read-only.
Declaration
public IChartErrorBars ErrorBarsX { get; }
  Property Value
| Type | 
|---|
| IChartErrorBars | 
ErrorBarsY
Represents Y error bars. Read-only.
Declaration
public IChartErrorBars ErrorBarsY { get; }
  Property Value
| Type | 
|---|
| IChartErrorBars | 
FilteredCategory
Represent the filtered category label range
Declaration
public string FilteredCategory { get; set; }
  Property Value
| Type | 
|---|
| System.String | 
FilteredValue
Represent the Filtered Category value
Declaration
public string FilteredValue { get; set; }
  Property Value
| Type | 
|---|
| System.String | 
HasErrorBarsX
Indicates if Series contains X error bars.
Declaration
public bool HasErrorBarsX { get; set; }
  Property Value
| Type | 
|---|
| System.Boolean | 
HasErrorBarsY
Indicates if Series contains Y error bars.
Declaration
public bool HasErrorBarsY { get; set; }
  Property Value
| Type | 
|---|
| System.Boolean | 
HasLeaderLines
Gets or Set the ShowLeaderLines if true.
Declaration
public bool HasLeaderLines { get; set; }
  Property Value
| Type | 
|---|
| System.Boolean | 
Index
Represents index of the series.
Declaration
public int Index { get; set; }
  Property Value
| Type | 
|---|
| System.Int32 | 
InnerChart
Returns parent chart. Read-only.
Declaration
public ChartImpl InnerChart { get; }
  Property Value
| Type | 
|---|
| ChartImpl | 
InnerWorkbook
Returns parent workbook. Read-only.
Declaration
public WorkbookImpl InnerWorkbook { get; }
  Property Value
| Type | 
|---|
| WorkbookImpl | 
InvertIfNegative
This element specifies the series to invert its colors if the value is negative.
Declaration
public Nullable<bool> InvertIfNegative { get; set; }
  Property Value
| Type | 
|---|
| System.Nullable<System.Boolean> | 
Examples
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet sheet = workbook.Worksheets[0];
            //Add data
            sheet.Range["A1"].Text = "Jan";
            sheet.Range["B1"].Text = "Feb";
            sheet.Range["C1"].Text = "Mar";
            sheet.Range["A2"].Value = "-10";
            sheet.Range["B2"].Value = "20";
            sheet.Range["C2"].Value = "30";
            //Create chart
            IChart chart = sheet.Charts.Add();
            //Set range
            chart.DataRange = sheet.Range["A1:C2"];
            //Set chart type
            chart.Series[0].SerieType = ExcelChartType.Column_Cluster;
            chart.Series[0].InvertIfNegative =true;
            //Save and Dispose
            workbook.SaveAs("Chart.xlsx");
            workbook.Close();
        }
  
  
  
  InvertIfNegativeColor
Gets or sets a value to specify the series to invert its colors if the value is negative.
Declaration
public ColorObject InvertIfNegativeColor { get; set; }
  Property Value
| Type | 
|---|
| ColorObject | 
Examples
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet sheet = workbook.Worksheets[0];
            //Add data
            sheet.Range["A1"].Text = "Jan";
            sheet.Range["B1"].Text = "Feb";
            sheet.Range["C1"].Text = "Mar";
            sheet.Range["A2"].Value = "-10";
            sheet.Range["B2"].Value = "20";
            sheet.Range["C2"].Value = "30";
            //Create chart
            IChart chart = sheet.Charts.Add();
            //Set range
            chart.DataRange = sheet.Range["A1:C2"];
            //Set chart type
            chart.Series[0].SerieType = ExcelChartType.Column_Cluster;
            chart.Series[0].InvertIfNegative =true;
            chart.Series[0].InvertIfNegativeColor= Color.Red;
            //Save and Dispose
            workbook.SaveAs("Chart.xlsx");
            workbook.Close();
        }
  
  
  
  IsDefaultName
Indicates whether series has default title.
Declaration
public bool IsDefaultName { get; set; }
  Property Value
| Type | 
|---|
| System.Boolean | 
IsFiltered
Represent series is Filter
Declaration
public bool IsFiltered { get; set; }
  Property Value
| Type | 
|---|
| System.Boolean | 
IsPie
Indicates whether this is pie series.
Declaration
public bool IsPie { get; }
  Property Value
| Type | 
|---|
| System.Boolean | 
LeaderLines
Gets or Set the LeaderLines border settings.
Declaration
public IChartBorder LeaderLines { get; }
  Property Value
| Type | 
|---|
| IChartBorder | 
Name
Name of the series.
Declaration
public string Name { get; set; }
  Property Value
| Type | 
|---|
| System.String | 
NameOrFormula
Gets series name or formula value (not actual string value).
Declaration
public string NameOrFormula { get; }
  Property Value
| Type | 
|---|
| System.String | 
NameRange
Series Name range for the series.
Declaration
public IRange NameRange { get; }
  Property Value
| Type | 
|---|
| IRange | 
Number
Series drawing/settings order.//Number of the series.
Declaration
public int Number { get; set; }
  Property Value
| Type | 
|---|
| System.Int32 | 
ParentChart
Represents parent chart. Read - only.
Declaration
public ChartImpl ParentChart { get; }
  Property Value
| Type | 
|---|
| ChartImpl | 
ParentSeries
Gets parent series collection. Read - only.
Declaration
public ChartSeriesCollection ParentSeries { get; }
  Property Value
| Type | 
|---|
| ChartSeriesCollection | 
ParetoLineFormat
Gets the Pareto line on the Pareto charts. Read-only.
Declaration
public IChartFrameFormat ParetoLineFormat { get; }
  Property Value
| Type | 
|---|
| IChartFrameFormat | 
ParseSerieNotDefaultText
Represents not default series text for first series. Read-only.
Declaration
public string ParseSerieNotDefaultText { get; }
  Property Value
| Type | 
|---|
| System.String | 
PointNumber
Returns number of points in the series. Read-only.
Declaration
public int PointNumber { get; }
  Property Value
| Type | 
|---|
| System.Int32 | 
RealIndex
Synonym for Index property.
Declaration
public int RealIndex { get; set; }
  Property Value
| Type | 
|---|
| System.Int32 | 
SerieFormat
Returns format of current Series.
Declaration
public IChartSerieDataFormat SerieFormat { get; }
  Property Value
| Type | 
|---|
| IChartSerieDataFormat | 
SerieType
Represents Series type.
Declaration
public ExcelChartType SerieType { get; set; }
  Property Value
| Type | 
|---|
| ExcelChartType | 
StartType
Returns series start type. Read-only.
Declaration
public string StartType { get; }
  Property Value
| Type | 
|---|
| System.String | 
StrRefFormula
Gets or sets the string reference formula
Declaration
public string StrRefFormula { get; set; }
  Property Value
| Type | 
|---|
| System.String | 
TrendLines
Represents Series trend lines collection. Read-only.
Declaration
public IChartTrendLines TrendLines { get; }
  Property Value
| Type | 
|---|
| IChartTrendLines | 
UsePrimaryAxis
Indicates whether to use primary axis for series drawing.
Declaration
public bool UsePrimaryAxis { get; set; }
  Property Value
| Type | 
|---|
| System.Boolean | 
Values
Values range for the series.
Declaration
public IRange Values { get; set; }
  Property Value
| Type | 
|---|
| IRange | 
Methods
add_NameChanged(ValueChangedEventHandler)
Declaration
public void add_NameChanged(ValueChangedEventHandler value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Syncfusion.XlsIO.Implementation.ValueChangedEventHandler | value | 
add_ValueRangeChanged(ValueChangedEventHandler)
Declaration
public void add_ValueRangeChanged(ValueChangedEventHandler value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Syncfusion.XlsIO.Implementation.ValueChangedEventHandler | value | 
AddEnteredRecord(Int32, ICellPositionFormat)
Add entered record by si index.
Declaration
public void AddEnteredRecord(int siIndex, ICellPositionFormat record)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | siIndex | si index.  | 
      
| ICellPositionFormat | record | Record to add.  | 
      
CheckLimits()
Checks whether number of items inside single series is correct.
Declaration
public void CheckLimits()
  Clone(Object, Dictionary<String, String>, Dictionary<Int32, Int32>)
Clone current instance.
Declaration
public ChartSerieImpl Clone(object parent, Dictionary<string, string> hashNewNames, Dictionary<int, int> dicFontIndexes)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | parent | Parent object.  | 
      
| System.Collections.Generic.Dictionary<System.String, System.String> | hashNewNames | Dictionary with new worksheet names.  | 
      
| System.Collections.Generic.Dictionary<System.Int32, System.Int32> | dicFontIndexes | Dictionary with new font indexes.  | 
      
Returns
| Type | Description | 
|---|---|
| ChartSerieImpl | Cloned series.  | 
      
DetectSerieType()
Detects Series type.
Declaration
public ExcelChartType DetectSerieType()
  Returns
| Type | Description | 
|---|---|
| ExcelChartType | Extracted series type.  | 
      
DetectSerieTypeStart()
Detects Series type.
Declaration
public string DetectSerieTypeStart()
  Returns
| Type | Description | 
|---|---|
| System.String | Extracted series type.  | 
      
DetectSerieTypeString()
Detects Series type.
Declaration
public string DetectSerieTypeString()
  Returns
| Type | Description | 
|---|---|
| System.String | Detected string representationg of the series type.  | 
      
ErrorBar(Boolean)
Creates error bar object.
Declaration
public IChartErrorBars ErrorBar(bool bIsY)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | bIsY | If true - on Y axis; otherwise on X axis.  | 
      
Returns
| Type | Description | 
|---|---|
| IChartErrorBars | Return error bar object.  | 
      
ErrorBar(Boolean, ExcelErrorBarInclude)
Creates error bar object.
Declaration
public IChartErrorBars ErrorBar(bool bIsY, ExcelErrorBarInclude include)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | bIsY | If true - on Y axis; otherwise on X axis.  | 
      
| ExcelErrorBarInclude | include | Represents include type.  | 
      
Returns
| Type | Description | 
|---|---|
| IChartErrorBars | Return error bar object.  | 
      
ErrorBar(Boolean, ExcelErrorBarInclude, ExcelErrorBarType)
Creates error bar object.
Declaration
public IChartErrorBars ErrorBar(bool bIsY, ExcelErrorBarInclude include, ExcelErrorBarType type)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | bIsY | If true - on Y axis; otherwise on X axis.  | 
      
| ExcelErrorBarInclude | include | Represents include type.  | 
      
| ExcelErrorBarType | type | Represents error bar type.  | 
      
Returns
| Type | Description | 
|---|---|
| IChartErrorBars | Return error bar object.  | 
      
ErrorBar(Boolean, ExcelErrorBarInclude, ExcelErrorBarType, Double)
Creates error bar object.
Declaration
public IChartErrorBars ErrorBar(bool bIsY, ExcelErrorBarInclude include, ExcelErrorBarType type, double numberValue)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | bIsY | If true - on Y axis; otherwise on X axis.  | 
      
| ExcelErrorBarInclude | include | Represents include type.  | 
      
| ExcelErrorBarType | type | Represents error bar type.  | 
      
| System.Double | numberValue | Represents number value.  | 
      
Returns
| Type | Description | 
|---|---|
| IChartErrorBars | Returns error bar object.  | 
      
ErrorBar(Boolean, IRange, IRange)
Sets custom error bar type.
Declaration
public IChartErrorBars ErrorBar(bool bIsY, IRange plusRange, IRange minusRange)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | bIsY | If true - on Y axis; otherwise on X axis.  | 
      
| IRange | plusRange | Represents plus range.  | 
      
| IRange | minusRange | Represents minus range.  | 
      
Returns
| Type | Description | 
|---|---|
| IChartErrorBars | Returns error bar object.  | 
      
FindIntimateFormatByType(ExcelChartType, Boolean, Boolean)
Finds intimate format by type.
Declaration
public ChartFormatImpl FindIntimateFormatByType(ExcelChartType type, bool bPrimaryAxis, bool bPreferSameAxis)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ExcelChartType | type | Type to find.  | 
      
| System.Boolean | bPrimaryAxis | |
| System.Boolean | bPreferSameAxis | 
Returns
| Type | Description | 
|---|---|
| ChartFormatImpl | Returns found format or null.  | 
      
Get3DDataFormat()
Return Chart3DDataFormat record for this series.
Declaration
public Chart3DDataFormatRecord Get3DDataFormat()
  Returns
| Type | Description | 
|---|---|
| Chart3DDataFormatRecord | Chart3DDataFormat record for this series.  | 
      
GetArray(Int32)
Gets array by siIndex.
Declaration
public List<BiffRecordRaw> GetArray(int siIndex)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | siIndex | Si index.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.List<Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRaw> | Returns array by si index.  | 
      
GetCommonSerieFormat()
Gets common series format.
Declaration
public ChartFormatImpl GetCommonSerieFormat()
  Returns
| Type | Description | 
|---|---|
| ChartFormatImpl | Returns common series format.  | 
      
GetEnteredDirectlyValues(List<BiffRecordRaw>)
Gets values of entered directly values.
Declaration
public object[] GetEnteredDirectlyValues(List<BiffRecordRaw> array)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Collections.Generic.List<Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRaw> | array | Record storage.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Object[] | Returns just created array of values.  | 
      
GetRange(ChartAIRecord)
Returns range from ChartAi record.
Declaration
public IRange GetRange(ChartAIRecord chartAi)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ChartAIRecord | chartAi | ChartAi record that contains range.  | 
      
Returns
| Type | Description | 
|---|---|
| IRange | Parsed range.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | When chartAi is NULL.  | 
      
GetSerieNameRange()
Gets Series name range.
Declaration
public IRange GetSerieNameRange()
  Returns
| Type | Description | 
|---|---|
| IRange | Returns range, that represents Series name range. Can be null.  | 
      
MarkUsedReferences(Boolean[])
Sets items with used reference indexes to true.
Declaration
public void MarkUsedReferences(bool[] usedItems)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean[] | usedItems | Array to mark used references in.  | 
      
OnDispose()
This method is called during dispose operation.
Declaration
protected override void OnDispose()
  Overrides
ParseErrorBars(IList<BiffRecordRaw>)
Parses error bars.
Declaration
public void ParseErrorBars(IList<BiffRecordRaw> data)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Collections.Generic.IList<Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRaw> | data | Represents data holder.  | 
      
remove_NameChanged(ValueChangedEventHandler)
Declaration
public void remove_NameChanged(ValueChangedEventHandler value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Syncfusion.XlsIO.Implementation.ValueChangedEventHandler | value | 
remove_ValueRangeChanged(ValueChangedEventHandler)
Declaration
public void remove_ValueRangeChanged(ValueChangedEventHandler value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Syncfusion.XlsIO.Implementation.ValueChangedEventHandler | value | 
Reparse()
Reparses method.
Declaration
public void Reparse()
  Serialize(OffsetArrayList)
Serializes series to the OffsetArrayList.
Declaration
public void Serialize(OffsetArrayList records)
  Parameters
| Type | Name | Description | 
|---|---|---|
| OffsetArrayList | records | OffsetArrayList that will receive records.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | When specified OffsetArrayList is NULL.  | 
      
SerializeDataLabels(OffsetArrayList)
Serializes data labels data.
Declaration
public void SerializeDataLabels(OffsetArrayList records)
  Parameters
| Type | Name | Description | 
|---|---|---|
| OffsetArrayList | records | List of biff records to serialize into.  | 
      
SetDefaultName(String, Boolean)
Sets default Series name.
Declaration
public void SetDefaultName(string strName, bool isClearNameRange)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | strName | Represents Series name.  | 
      
| System.Boolean | isClearNameRange | boolean value indicates whether to clear the name range of series  | 
      
UpdateFormula(Int32, Int32, Rectangle, Int32, Rectangle)
Updates formulas after copy operation.
Declaration
public void UpdateFormula(int iCurIndex, int iSourceIndex, Rectangle sourceRect, int iDestIndex, Rectangle destRect)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | iCurIndex | Current worksheet index.  | 
      
| System.Int32 | iSourceIndex | Source worksheet index.  | 
      
| Rectangle | sourceRect | Source rectangle.  | 
      
| System.Int32 | iDestIndex | Destination worksheet index.  | 
      
| Rectangle | destRect | Destination rectangle.  | 
      
UpdateReferenceIndexes(Int32[])
Updates reference indexes.
Declaration
public void UpdateReferenceIndexes(int[] arrUpdatedIndexes)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32[] | arrUpdatedIndexes | Array with updated indexes.  | 
      
Events
NameChanged
This event is raised when name of the series changes.
Declaration
public event ValueChangedEventHandler NameChanged
  Event Type
| Type | 
|---|
| Syncfusion.XlsIO.Implementation.ValueChangedEventHandler | 
ValueRangeChanged
This event is raised when ValueRange was changed.
Declaration
public event ValueChangedEventHandler ValueRangeChanged
  Event Type
| Type | 
|---|
| Syncfusion.XlsIO.Implementation.ValueChangedEventHandler |