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


    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?

    Sorry for my English
  2. Yavor
    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,
    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.

  4. Yavor
    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">
                   <telerikCharting:ChartTitle Content="Year 2009" HorizontalAlignment="Center"/>
                   <telerikCharting:ChartLegend x:Name="chartLegend" UseAutoGeneratedItems="True" />
                   <telerikCharting:ChartArea LegendName="chartLegend">
                           <!-- Line Chart -->
                           <!-- Bar Chart -->
                           <telerikCharting:DataSeries LegendLabel="Expenses">
                               <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 LegendLabel="Turnover">
                                        <telerikCharting:LineSeriesDefinition >
                                    <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"/>

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

    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
    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,
    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