problem showing data with null values in rad chart

Thread is closed for posting
2 posts, 0 answers
  1. Ali
    Ali avatar
    3 posts
    Member since:
    Apr 2012

    Posted 03 May 2012 Link to this post

    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">
    <FillStyle FillType="ComplexGradient">
    <telerik:GradientElement Color="26, 120, 179" />
    <telerik:GradientElement Color="35, 189, 254" Position="0.5" />
    <telerik:GradientElement Color="26, 120, 179" Position="1" />
    <Border Color="0, 66, 110" Width="5" />
    <Legend Visible="False">
    <Appearance Dimensions-Margins="1px, 2%, 12%, 1px" Visible="False">
    <ItemTextAppearance TextProperties-Color="White">
    <FillStyle GammaCorrection="False" MainColor="37, 255, 255, 255">
    <Border Color="76, 255, 255, 255" />
    <Appearance Position-AlignedPosition="Top" TextProperties-Color="LightSkyBlue">
    <Appearance Position-Auto="False" Position-X="0" Position-Y="0">
    <EmptySeriesMessage Visible="True">
    <Appearance Visible="True">
    <XAxis AutoScale="False" DataLabelsColumn="Date" MaxValue="7" MinValue="1"
    <Appearance Color="98, 183, 226" MajorTick-Color="98, 183, 226">
    <MajorGridLines Color="98, 183, 226" Width="0" />
    <TextAppearance TextProperties-Color="White">
     <Appearance Dimensions-Paddings="1px, 1px, 10%, 1px">
     <Appearance TextProperties-Color="LightSkyBlue">
     <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">
     <Appearance TextProperties-Color="LightSkyBlue">
     <Appearance Dimensions-Margins="19%, 90px, 12%, 9%">
     <FillStyle MainColor="50, 255, 255, 255" SecondColor="Transparent">
     <Border Color="97, 180, 223" />
     <Appearance Dimensions-Margins="4%, 10px, 14px, 6%">
     <FillStyle MainColor="">
     <Appearance TextProperties-Color="White" TextProperties-Font="Verdana, 14pt">

    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.

  2. Petar Marchev
    Petar Marchev avatar
    1021 posts

    Posted 08 May 2012 Link to this post

    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.
Back to Top