3

I have code that generates a chart from a data set. Some of the points in the data set are empty, however the charts plots these empty datapoints as 0. I want the chart to plot them as gaps in the chart. Below is my ASP code.

<asp:Chart ID="FailStatusChart" runat="server">
    <Series>
        <asp:Series Name="Series1" Color="#CC3300">
        <EmptyPointStyle BackImageTransparentColor="Transparent" 
            BackSecondaryColor="Transparent" 
            BorderColor="Transparent" 
            BorderDashStyle="NotSet" 
            Color="Transparent" 
            IsVisibleInLegend="False" 
            LabelBackColor="Transparent" 
            LabelBorderColor="Transparent" 
            LabelBorderDashStyle="NotSet" 
            LabelForeColor="Transparent" 
            BackGradientStyle="None" />


        </asp:Series>

    </Series>

    <ChartAreas>
        <asp:ChartArea Name="ChartArea1">
        </asp:ChartArea>

    </ChartAreas>

vb.net

For Each DataRow In ByteFailTable.Rows()
     If DataRow(1) = "" Then
        FailStatusChart.Series("Series1").Points.Item(DataRow(1)).IsEmpty = True
        FailStatusChart.Series("Series1").Points(DataRow(1)).Color = Drawing.Color.Transparent
        FailStatusChart.Series("Series1").Points.Remove(DataRow(1))
     End If
Next
John Saunders
  • 160,644
  • 26
  • 247
  • 397
user1096317
  • 55
  • 1
  • 2
  • 7

0 Answers0