Hiding null or empty value in RadChart

Thread is closed for posting
9 posts, 0 answers
  1. SoD
    SoD avatar
    8 posts
    Member since:
    Nov 2008

    Posted 17 Dec 2008 Link to this post

    Hi, everyone

    I want to hide null or empty data in RadChart, but when I use Charting DataTable I cannot hide the null or empty values.

    I hide null or empty values in Chart Picture like that 

        if

     

    (!_showNullValues)

     

        {

     

            foreach (ChartSeries series in chart.Series)

     

            {

     

                    if (series.Items.Count == 0)

     

                    {

                        series.Appearance.EmptyValue.Line.Width = 0.0f;

                        series.Appearance.EmptyValue.Mode = Telerik.Charting.Styles.

    EmtyValuesMode.Zero;

     

                    }

            }

        }

    I set emptyvalue is zero to write datatable  zero rather than first non-empty value for empty value.

    How can I hide empty value in datatable in RadChart?

  2. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 19 Dec 2008 Link to this post

    Hi Fatih,

    The datatable in RadChart closely matches the chart state, so if there is an empty series it will be shown in the datatable too. However, if there are no items in a certain series, you can simply remove it from the RadChart.Series collection:

    RadChart1.Series.Remove(series);

    All the best,
    Ves
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. SoD
    SoD avatar
    8 posts
    Member since:
    Nov 2008

    Posted 03 Jan 2009 Link to this post

    unfortunately my series included some null data and some normal data. I want to highlight or remove in datatable the null or empty data in the dataGrid.
  5. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 05 Jan 2009 Link to this post

    Hello Fatih,

    Unfortunately, the datatable content cannot be customized, it matches the ChartSeriesItems for each ChartSeries.

    Best regards,
    Ves
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Hiren Savjiyani
    Hiren Savjiyani avatar
    13 posts
    Member since:
    May 2008

    Posted 09 Oct 2009 Link to this post

    Hi All,

    I have also faced the same problem.. NULL values in series was making my chart series line ugly..
    Finally i tried one trick and was successful...

    In the ItemDataBound event, i have added these lines:

     if (e.SeriesItem.YValue == 0.0)
                e.SeriesItem.Parent.Items.Remove(e.SeriesItem);

    Hope that will resolve issue

    Regards,
    WebDataDesign

    http://www.webdatadesign.com.au
  7. Jason
    Jason avatar
    19 posts
    Member since:
    Mar 2009

    Posted 20 Nov 2009 Link to this post

    Hiren,

    That is a good solution but the only problem is if data becomes null and gets a value after it has been removed the line or bar does not reappear.  I tried added the code below to bring it back but it doesn't work. 

    if

     

    (e.SeriesItem.YValue >= 1)

     

    {

    e.SeriesItem.Parent.Items.Add(e.SeriesItem);

    }



    There must be some time of way to loop through it to check to see if the value is null, if not then display it on the chart.
  8. chandu mahi
    chandu mahi avatar
    23 posts
    Member since:
    Jul 2009

    Posted 18 Dec 2009 Link to this post

    Hi,
    Even i am also facing with same issue. can you suggest me. i tried with above code . eventhough its not showing radchart data.
    I can see the data in datatable but output is coming with Empty series "There is No or Empty Series ".
    why?
    I am using Q1 2009 version
  9. Ravi Keshwani
    Ravi Keshwani avatar
    30 posts
    Member since:
    Jul 2009

    Posted 08 Jul 2010 Link to this post

    Please help i am also facing this issue
  10. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 13 Jul 2010 Link to this post

    Hi Ravi Keshwani,

    Can you please attach a small example, demonstrating the problem? Thanks.

    Greetings,
    Ves
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017