Document Solutions for Excel, .NET Edition | Document Solutions
Features / Chart / Customize Chart Objects / Series / Display #N/A Values
In This Topic
    Display #N/A Values
    In This Topic

    DsExcel.NET provides support to display #N/A cells as empty cells in charts. The DisplayNaAsBlank property of IChart interface, when set to true, considers the cells containing #N/A values as empty cells. When DisplayNaAsBlank property is set to true, the display of empty cells, when plotted on a chart depends on the value of DisplayBlanksAs property. The property accepts values from DisplayBlankAs enumeration and can have following three values:

    The below screenshot depicts a chart created from data containing #N/A cells which is displayed as zero because value of DisplayBlankAs is set to 'Zero'.

    Following code demonstrates a line chart showing values plotted with DisplayNaAsBlank set to true.

    Copy Code
    // Set show blank as zero.
    shape.Chart.DisplayBlanksAs = DisplayBlanksAs.Zero;
    // Set show #N/A as empty cell.
    shape.Chart.DisplayNaAsBlank = true;
    shape.Chart.ChartTitle.Text = "DisplayNaAsBlank:True";


    When DisplayNaAsBlank property is set to false, chart plots the #N/A values depending on the chart type.