0
我有一个图表是从代码隐藏的SQL数据库获取数据。所有内容都能正确显示,并且系列在悬停时显示正确的编号。telerik RAD HTMLChart标签显示NaN(非数字)
这是一个堆叠酒吧,显示总计工作在这个网站上发现一回合。
我知道,从SQL传来的数据是多少,因为我浇铸成十进制。
的gTotal表示: “TL桶:NAN”
如果我只是做TL桶:#= dataItem.TotalRed#它显示未定义 什么想法?
后面的代码:
Dim daFMChart As New SqlDataAdapter(SQLFM, Conn)
daFMChart.Fill(DTFMChart)
Me.ColumnChart.DataSource = DTFMChart
Me.ColumnChart.DataBind()
的SQL数据是这样的
+-------------------------------------------------+
| DateTime TotalRed TotalWhite gTotal |
+-------------------------------------------------+
| 2016-03-25 20000 3 0.0001 |
| 2016-03-24 30000 2601 0.0001 |
| 2016-03-23 50000 45626 0.0001 |
| 2016-03-22 10000 55568 0.0001 |
| 2016-03-21 30000 54098 0.0001 |
| 2016-03-20 10000 51351 0.0001 |
| 2016-03-19 20000 21973 0.0001 |
+-------------------------------------------------+
<ChartTitle Text="Daily Volume Total Per Meter">
<Appearance Align="Right" Position="Top">
<TextStyle Color="#999999" />
</Appearance>
</ChartTitle>
<Legend>
<Appearance Position="Right" Visible="true">
<TextStyle Color="#999999" />
</Appearance>
</Legend>
<PlotArea>
<Series>
<telerik:ColumnSeries Name="FM Red" DataFieldY="TotalRed" Stacked="true">
<LabelsAppearance Visible="false"></LabelsAppearance>
<Appearance>
<FillStyle BackgroundColor="#ff1a1a"></FillStyle>
</Appearance>
</telerik:ColumnSeries>
<telerik:ColumnSeries Name="FM White" DataFieldY="TotalWhite">
<LabelsAppearance Visible="false"></LabelsAppearance>
<Appearance>
<FillStyle BackgroundColor="#bfbfbf"></FillStyle>
</Appearance>
</telerik:ColumnSeries>
<telerik:ColumnSeries DataFieldY="gTotal" Stacked="true">
<Appearance FillStyle-BackgroundColor="#DDD9C3"></Appearance>
<LabelsAppearance Position="OutsideEnd">
<TextStyle Color="#999999" />
<TextStyle Margin="0" />
<ClientTemplate>
TL bbls: #=dataItem.TotalRed + dataItem.TotalWhite#
</ClientTemplate>
</LabelsAppearance>
<TooltipsAppearance Visible="false">
</TooltipsAppearance>
</telerik:ColumnSeries>
</Series>
<XAxis DataLabelsField="DateTime"></XAxis>
<XAxis>
<MajorGridLines Visible="false" />
<MinorGridLines Visible="false" />
<LabelsAppearance Step="1">
<TextStyle Color="#999999" />
</LabelsAppearance>
</XAxis>
<YAxis>
<MajorGridLines Visible="true" Color="#555555" />
<MinorGridLines Visible="false" />
<LabelsAppearance Step="1">
<TextStyle Color="#999999" />
</LabelsAppearance>
</YAxis>
</PlotArea>
<ChartTitle Text=""></ChartTitle>
你能不能把它绑定在你面前的背后格式化您的VB代码日期列数据,以您的RAD HtmlChart?而不是在中执行 –
zgood