我有一个包含 NULL 值的 RadHtmlChart,而不是跳过或插值这些值,它们被计为零。
这是我的图表:
<Telerik:RadHtmlChart ID="rhc" runat="server">
<PlotArea>
<Series>
<Telerik:ScatterLineSeries Name="Intl" DataFieldX="a1" DataFieldY="a2" MissingValues="Interpolate">
<TooltipsAppearance DataFormatString="{1:N}% on {0:MM/dd}" />
<MarkersAppearance Visible="true" />
</Telerik:ScatterLineSeries>
<< - I have 7 more entries following - >>
</Series>
<XAxis BaseUnit="Weeks" Step="1">
<LabelsAppearance DataFormatString="{0:MM/dd}" />
</XAxis>
<YAxis MaxValue="102" MinValue="0" Step="5">
<TitleAppearance Text="Percentage" />
</YAxis>
</PlotArea>
<Legend>
<Appearance Position="Bottom" />
</Legend>
</Telerik:RadHtmlChart>
我在后面的代码中设置图表的数据源。这是一个小样本:
a1 a2 b1 b2 c1 c2 d1 d2
5/02/2016 100 5/02/2016 96 5/02/2016 100 5/02/2016 (NULL)
5/09/2016 100 5/09/2016 100 5/09/2016 100 5/09/2016 (NULL)
5/16/2016 66 5/16/2016 100 5/16/2016 100 5/16/2016 100
5/23/2016 88 5/23/2016 80 5/23/2016 100 5/23/2016 100
5/30/2016 100 5/30/2016 100 5/30/2016 100 5/30/2016 (NULL)
e1 e2 f1 f2 g1 g2 h1 h2
5/02/2016 100 5/02/2016 100 5/02/2016 100 5/02/2016 98
5/09/2016 100 5/09/2016 5 5/09/2016 100 5/09/2016 83
5/16/2016 100 5/16/2016 (NULL) 5/16/2016 (NULL) 5/16/2016 80
5/23/2016 20 5/23/2016 66 5/23/2016 (NULL) 5/23/2016 63
5/30/2016 100 5/30/2016 100 5/30/2016 (NULL) 5/30/2016 100
A1 到 H2 是每个日期的所有 1 条记录。我检查了我是否在每个系列上设置了“MissingValues”参数。我在调试模式下跟踪我的数据源,并确保在将其分配给图表之前没有将值设置为零,但它仍然显示零。