Null and "0" values in line chart

6 posts, 0 answers
  1. Alexey
    Alexey avatar
    1 posts
    Member since:
    Oct 2010

    Posted 12 Nov 2010 Link to this post

    Hello!

    I have data for line chart in which "0" value and Null value (no data). How can i don't show items and line with null value?
    Thanks.

    Sorry for my English
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 17 Nov 2010 Link to this post

    Hi Alexey,

    At present, there is no support for empty values. You can replace all null occurrences with 0's, or whatever values are appropriate in your case. The control can easily be bound to accurately represent the data in this case. I hope that this is a feasible approach in your case. Let me know if I am leaving something out.

    All the best,
    Yavor
    the Telerik team
    See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
  3. Rüdiger
    Rüdiger avatar
    6 posts
    Member since:
    Nov 2010

    Posted 02 Dec 2010 Link to this post

    Is that true that 0-values cannot be suppressed???
    I need to show a LineSeries in the middle of the chart above some other column series. This line series may not be connected to 0, i.e. it only has values, but it is shorter than the other series.

    RüdiActivity
  4. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 03 Dec 2010 Link to this post

    Hi Rüdiger,

    Basically, in such a scenario the dataseries' points must match.
    One option would be to use a setup similar to this one:

    <telerikChart:RadChart VerticalAlignment="Top">
       <telerikChart:RadChart.DefaultView>
           <telerikCharting:ChartDefaultView>
      
               <telerikCharting:ChartDefaultView.ChartTitle>
                   <telerikCharting:ChartTitle Content="Year 2009" HorizontalAlignment="Center"/>
               </telerikCharting:ChartDefaultView.ChartTitle>
      
               <telerikCharting:ChartDefaultView.ChartLegend>
                   <telerikCharting:ChartLegend x:Name="chartLegend" UseAutoGeneratedItems="True" />
               </telerikCharting:ChartDefaultView.ChartLegend>
      
               <telerikCharting:ChartDefaultView.ChartArea>
                   <telerikCharting:ChartArea LegendName="chartLegend">
                       <telerikCharting:ChartArea.DataSeries>
      
                           <!-- Line Chart -->
                     
                           <!-- Bar Chart -->
                           <telerikCharting:DataSeries LegendLabel="Expenses">
                               <telerikCharting:DataSeries.Definition>
                                   <telerikCharting:BarSeriesDefinition>
                                   </telerikCharting:BarSeriesDefinition>
                               </telerikCharting:DataSeries.Definition>
      
                               <telerikCharting:DataPoint YValue="45" XCategory="Jan"/>
                               <telerikCharting:DataPoint YValue="48" XCategory="Feb"/>
                               <telerikCharting:DataPoint YValue="53" XCategory="Mar"/>
                               <telerikCharting:DataPoint YValue="41" XCategory="Apr"/>
                               <telerikCharting:DataPoint YValue="32" XCategory="May"/>
                               <telerikCharting:DataPoint YValue="28" XCategory="Jun"/>
                               <telerikCharting:DataPoint YValue="63" XCategory="Jul"/>
                               <telerikCharting:DataPoint YValue="74" XCategory="Aug"/>
                               <telerikCharting:DataPoint YValue="77" XCategory="Sep"/>
                               <telerikCharting:DataPoint YValue="85" XCategory="Oct"/>
                               <telerikCharting:DataPoint YValue="89" XCategory="Nov"/>
                               <telerikCharting:DataPoint YValue="80" XCategory="Dec"/>
                           </telerikCharting:DataSeries>
      
                                <telerikCharting:DataSeries LegendLabel="Turnover">
                                    <telerikCharting:DataSeries.Definition>
                                        <telerikCharting:LineSeriesDefinition >
                                        </telerikCharting:LineSeriesDefinition>
                                    </telerikCharting:DataSeries.Definition>
      
      
                                    <telerikCharting:DataPoint YValue="135" XCategory="May"/>
                                    <telerikCharting:DataPoint YValue="125" XCategory="Jun"/>
                                    <telerikCharting:DataPoint YValue="179" XCategory="Jul"/>
                                    <telerikCharting:DataPoint YValue="170" XCategory="Aug"/>
                                    <telerikCharting:DataPoint YValue="198" XCategory="Sep"/>
                                    <telerikCharting:DataPoint YValue="187" XCategory="Oct"/>
                                    <telerikCharting:DataPoint YValue="193" XCategory="Nov"/>
                                    <telerikCharting:DataPoint YValue="176" XCategory="Dec"/>
                                </telerikCharting:DataSeries>
      
      
                            </telerikCharting:ChartArea.DataSeries>
                   </telerikCharting:ChartArea>
               </telerikCharting:ChartDefaultView.ChartArea>
           </telerikCharting:ChartDefaultView>
       </telerikChart:RadChart.DefaultView>
    </telerikChart:RadChart>

    In this case the second series (the line) will be positioned above the bars.
    I hope this helps.

    Greetings,
    Yavor
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  5. Raj
    Raj avatar
    34 posts
    Member since:
    Aug 2009

    Posted 14 Jan 2011 Link to this post

    This is pretty big... null value is very different from 0 and representing both the same way is misleading on a chart. Any idea when this will be addressed?
  6. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 19 Jan 2011 Link to this post

    Hello Alexey,

    Although I cannot commit to a definite timeframe, enhancing this behavior is in our ToDo list, and it will be available in one of the future versions of the control.

    All the best,
    Yavor
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top