This is a migrated thread and some comments may be shown as answers.

problem showing data with null values in rad chart

1 Answer 30 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Ali
Top achievements
Rank 1
Ali asked on 03 May 2012, 11:28 AM

i have rad chart with the following sql datasource

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Cnn_StatisticsSql %>"
 SelectCommand="SELECT COUNT(Title) AS Title_Count,
 Title AS Account_Type,
 LEFT(BankingDate, 7) AS Date
 FROM Extracted.Sepordeh_EftetahShodeh
 WHERE LEFT(BankingDate, 4) IN ( '1388' )
 GROUP BY Title , LEFT(BankingDate, 7) ORDER BY 3 "></asp:SqlDataSource>
<telerik:RadChart ID="RadChart1" runat="server" AutoLayout="True" AutoTextWrap="True"
IntelligentLabelsEnabled="True" Width="945px" Height="285px" Skin="DeepBlue"
DataGroupColumn="Account_Type" DataSourceID="SqlDataSource1">
<Appearance>
<FillStyle FillType="ComplexGradient">
<FillSettings>
<ComplexGradient>
<telerik:GradientElement Color="26, 120, 179" />
<telerik:GradientElement Color="35, 189, 254" Position="0.5" />
<telerik:GradientElement Color="26, 120, 179" Position="1" />
</ComplexGradient>
</FillSettings>
</FillStyle>
<Border Color="0, 66, 110" Width="5" />
</Appearance>
<Series>
</Series>
<Legend Visible="False">
<Appearance Dimensions-Margins="1px, 2%, 12%, 1px" Visible="False">
<ItemTextAppearance TextProperties-Color="White">
</ItemTextAppearance>
<FillStyle GammaCorrection="False" MainColor="37, 255, 255, 255">
</FillStyle>
<Border Color="76, 255, 255, 255" />
</Appearance>
<TextBlock>
<Appearance Position-AlignedPosition="Top" TextProperties-Color="LightSkyBlue">
</Appearance>
</TextBlock>
</Legend>
<PlotArea>
<DataTable>
<Appearance Position-Auto="False" Position-X="0" Position-Y="0">
</Appearance>
</DataTable>
<EmptySeriesMessage Visible="True">
<Appearance Visible="True">
</Appearance>
</EmptySeriesMessage>
<XAxis AutoScale="False" DataLabelsColumn="Date" MaxValue="7" MinValue="1"
Step="1">
<Appearance Color="98, 183, 226" MajorTick-Color="98, 183, 226">
<MajorGridLines Color="98, 183, 226" Width="0" />
<TextAppearance TextProperties-Color="White">
</TextAppearance>
</Appearance>
<AxisLabel>
 <Appearance Dimensions-Paddings="1px, 1px, 10%, 1px">
 </Appearance>
 <TextBlock>
 <Appearance TextProperties-Color="LightSkyBlue">
 </Appearance>
 </TextBlock>
 </AxisLabel>
 </XAxis>
 <YAxis>
 <Appearance Color="98, 183, 226" MajorTick-Color="98, 183, 226"
MinorTick-Color="98, 183, 226">
 <MajorGridLines Color="120, 209, 248" />
 <MinorGridLines Color="120, 209, 248" Width="0" />
 <TextAppearance TextProperties-Color="White">
 </TextAppearance>
 </Appearance>
 <AxisLabel>
 <TextBlock>
 <Appearance TextProperties-Color="LightSkyBlue">
 </Appearance>
 </TextBlock>
 </AxisLabel>
 </YAxis>
 <Appearance Dimensions-Margins="19%, 90px, 12%, 9%">
 <FillStyle MainColor="50, 255, 255, 255" SecondColor="Transparent">
 </FillStyle>
 <Border Color="97, 180, 223" />
 </Appearance>
 </PlotArea>
 <ChartTitle>
 <Appearance Dimensions-Margins="4%, 10px, 14px, 6%">
 <FillStyle MainColor="">
 </FillStyle>
 </Appearance>
 <TextBlock>
 <Appearance TextProperties-Color="White" TextProperties-Font="Verdana, 14pt">
 </Appearance>
 </TextBlock>
 </ChartTitle>
 </telerik:RadChart>


I have sorted the chart by date. the problem is when there is no data for a specific date the bar chart is not left empty but it is filled with the next available data that belongs to the following dates.

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 08 May 2012, 07:47 AM
Hello Ali,

Have you sent us all of the code for the chart? Do you add series to it in code?

The reason I am asking is because you have not added any series. And for this scenario to work you need to add a bar series for each property (column) you need to show.

So as a first suggestion I recommend you create appropriate series.

If this is not of much help to you and you need further assistance I will need more details on the incoming data. I need to know how it is structured. Do you have a table with a Date and one property Title_Count, or do you have a table with a Date and 5 numeric columns (a column for each of the 5 bars).
 
All the best,
Petar Marchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Chart (Obsolete)
Asked by
Ali
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or