chart drawing with null Yvalue

8 posts, 0 answers
  1. hyojung kwon
    hyojung kwon avatar
    6 posts
    Member since:
    Jan 2010

    Posted 12 Jul 2010 Link to this post

    Hello,

    I am using Radchart Silverlight Latest version.
    I am wondering it is possible to express null Yvalue in Line chart and bubble chart, etc like a attached picture.

    In my attached picture there are two options, first option is skipping null Yvalue with drawing line between two Y values throughout null Yvalue, second option is skipping null yvalue without any connection line and item mark.

    Which one is possible? If possible can you show me how to do that?

    If not possible Is there any solution for this challenge?

    Thanks in advance
    Kwon
  2. Alexey Oyun
    Alexey Oyun avatar
    74 posts
    Member since:
    Mar 2010

    Posted 13 Jul 2010 Link to this post

    Hi, I have asked similar question at Missing point charts

    If you will skip point for null value line will connect to next available point.
    In linked post I gave screen-shot of possible lines.

    I got 3 solutions that may fit your needs.

    1: If you have only one line, you may skip those points and line will join rest. As I wrote above. But this solution will not work for multiple lines with empty values. See attached picture to get idea what may go wrong with multiple lines with missing values.
    2: is to set fake value ex: 0 and try to show that point differently. For example setting different label like in Meteo Chart with devil icons for fake data.
    3: Try to split one line with missing values into several lines. This will work only if you have another point in category that has empty value.

    As you can see all of above solutions have their limitations. Easiest is 2, but than you may mislead user with fake data.

    To Telerik Team, please open this issue or task so that we can vote for that. Otherwise we will have to write hack code to get desired charts.

    Thanks, Alexey.
  3. Alexey Oyun
    Alexey Oyun avatar
    74 posts
    Member since:
    Mar 2010

    Posted 13 Jul 2010 Link to this post

    Could not attach picture to previous post, so here another try.
  4. hyojung kwon
    hyojung kwon avatar
    6 posts
    Member since:
    Jan 2010

    Posted 14 Jul 2010 Link to this post

    Thanks for your reply, Alexey

    As you mentioned, all your possible solutions still have weak point.
    I hope Telerik team start working on this as soon as possible.

    Thanks
    Kwon
  5. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 15 Jul 2010 Link to this post

    Hello Guys,

    I just tried to reproduce the problem, however, RadChart seems to correctly draw lines with missing values. Please take a look at the code attached. Can you please post some code too that will help us reproduce the problem and fix it?

    Best wishes,
    Vladimir Milev
    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
  6. Alexey Oyun
    Alexey Oyun avatar
    74 posts
    Member since:
    Mar 2010

    Posted 15 Jul 2010 Link to this post

    Try this one: as you can see second line has category "C01" which is first in the list. But it will be shown last.

    <my:RadChart>
        <Charting:ChartArea LegendName="CustomLegend">
            <Charting:ChartArea.DataSeries>
                <Charting:DataSeries LegendLabel="L1">
                    <Charting:DataSeries.Definition>
                        <Charting:LineSeriesDefinition/>
                    </Charting:DataSeries.Definition>
                    <Charting:DataPoint YValue="10" XCategory="C02"  />
                    <Charting:DataPoint YValue="10" XCategory="C03" />
                    <Charting:DataPoint YValue="10" XCategory="C04"/>
                </Charting:DataSeries>
                <Charting:DataSeries LegendLabel="L2">
                    <Charting:DataSeries.Definition>
                        <Charting:LineSeriesDefinition/>
                    </Charting:DataSeries.Definition>
                    <Charting:DataPoint YValue="20" XCategory="C01" />
                    <Charting:DataPoint YValue="20" XCategory="C03"/>
                    <Charting:DataPoint YValue="20" XCategory="C04"/>
                </Charting:DataSeries>
            </Charting:ChartArea.DataSeries>
        </Charting:ChartArea>
    </my:RadChart>
  7. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 20 Jul 2010 Link to this post

    Hi Alexey Oyun,

    Indeed in the scenario you described, the C01 category will be displayed last but this is the category behavior by design -- as C01 is not present in the first series, it cannot be displayed first as the first displayed category is always the first category in the first data series (RadChart cannot "know" why semantically C01 should be placed before C02 in this case).

    Note, however, that generally you should be able to achieve the desired effect in a databound chart by using SortDescriptors but currently there is an open issue preventing this -- we have logged it in our public issue tracking system and we will forward it to our developers for further review.


    Sincerely yours,
    Freddie
    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
  8. Alexey Oyun
    Alexey Oyun avatar
    74 posts
    Member since:
    Mar 2010

    Posted 21 Jul 2010 Link to this post

    Hi,

    Last post was regarding sorting. There should be ability to merge categories.
    Because client may want to see Serie A to be the first, and if it does not have value for the last category should not worry him.
    Anyway nice to see that this problem is logged to PITS.

    For the original issue of this post. Here is PITS link for null value for Y http://www.telerik.com/support/pits.aspx#/public/silverlight/2696 I think it is very important feature or as I see must have feature for any visualization control. So I encourage everybody to vote for it :)

    Sincerely, Alexey.
Back to Top