This is a migrated thread and some comments may be shown as answers.

Zoom in/out bug with multiple series with multiple Y axis

1 Answer 83 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Felipe
Top achievements
Rank 1
Felipe asked on 28 Aug 2010, 07:17 PM
I put together this sample:
http://donelo.com/TelerikRadChartTestPage.html

(Project source code here: http://donelo.com/TelerikRadChart.zip)

Noticed that if you start zoom in (by dragging your mouse), and then zoom out with the scroll, you end up with situations like this:

http://donelo.com/Why-gap1.png
or
http://donelo.com/Why-gap2.png

even though when you are fully zoomed out, you can see that it is a line series with no gaps.

I am using the latest trial version available: 2010.2.812.1040

Can someone please take a look at the sample solution provided and see if there is a bug on the SL radchart version I have or in the implementation itself?

Thanks,

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 01 Sep 2010, 03:00 PM
Hi Felipe,

Different time ranges are not supported using the CollectionIndex  property. This is because when the user is zooming and scrolling the axis he is actually zooming the date time range for the axis (affecting all series ). If you have two different data sources for date time these can result in an unpredictable range which is impossible to visualize. There are two ways to fix this:

  • Make sure all the lists share the same X axis range -- in the example this can be achieved like this:
for (int i = 0; i < 1501; i++)
            {
                _data.Add(new GraphPoint() { X = startTime.Add(TimeSpan.FromMinutes(i * 2)), Y = i % 120 });
                if (i % 50 == 0)
                {
                    _ratedItems.Add(new GraphPoint() { X = startTime.Add(TimeSpan.FromMinutes(i * 2)), Y = 40 });
                }
                if (i % 20 == 0)
                {
                    _unRatedItems.Add(new GraphPoint() { X = startTime.Add(TimeSpan.FromMinutes(i * 2)), Y = 60 });
                }
            }

Note that the number of items is now 1501 so that all collections have an item for the min and for the max X value. For this purpose I have also removed the "else" for the unrated items.

Alternatively, you can compose a single list of items, which hold information for all the series in the chart. Again, you will use 3 SeriesMapping objects, but no CollectionIndex will be set. I have attached an updated version of your example, showing this.

Best regards,
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
Tags
Chart
Asked by
Felipe
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or