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

Multiple line series with ScrollAndZoom range problem

6 Answers 70 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Minh
Top achievements
Rank 1
Minh asked on 17 Nov 2011, 02:05 AM
I have a chart with multiple line series, dynamically bound from WCF services. The chart has Y-axis zoom and scroll, and I already set the MinZoomRange. The problem is even with the MinZoomRange set to 0.05, I still can move the zooming bar all the way down where the two ends of the bar touch each other and thus zoomrange is now 0, this crashes the application.

I read somewhere on this forum that zooming has some issues with multiple line series? Please find a solution for this problem soon, it is critical to our business partners.

The telerik version we are using is RadControls for Silverlight Q2 2011 SP1

<telerik:RadChart HorizontalAlignment="Left" Margin="12,98,0,7" Name="radChart1" Width="913" Grid.ColumnSpan="3">
                   <telerik:RadChart.DefaultView>
                       <telerik:ChartDefaultView>
                           <telerik:ChartDefaultView.ChartArea>
                               <telerik:ChartArea LegendName="chartLegend">
                                   <telerik:ChartArea.ZoomScrollSettingsY>
                                       <telerik:ZoomScrollSettings ScrollMode="ScrollAndZoom" MinZoomRange="0.05"/>
                                   </telerik:ChartArea.ZoomScrollSettingsY>
                               <telerik:ChartArea.AxisY>
                                   <telerik:AxisY AutoRange="True"/>
                               </telerik:ChartArea.AxisY>
                               <telerik:ChartArea.AxisX>
                                   <telerik:AxisX AutoRange="True"/>
                               </telerik:ChartArea.AxisX>
                                   <telerik:ChartArea.DataSeries>
                                       <telerik:DataSeries>
                                       </telerik:DataSeries>
                                   </telerik:ChartArea.DataSeries>
                               </telerik:ChartArea>
                           </telerik:ChartDefaultView.ChartArea>
                           <telerik:ChartDefaultView.ChartLegend>
                               <telerik:ChartLegend x:Name="chartLegend" UseAutoGeneratedItems="True"/>
                           </telerik:ChartDefaultView.ChartLegend>
                       </telerik:ChartDefaultView>
                   </telerik:RadChart.DefaultView>
               </telerik:RadChart>
private SeriesMapping AddSeriesMapping(ISeriesDefinition seriesDefinition, string legendLabel, string fieldName, Color color)
       {
           // add mapping for the series
           SeriesMapping mapping = new SeriesMapping()
           {
               SeriesDefinition = seriesDefinition,
               LegendLabel = legendLabel,
           };
 
           if(color != Colors.Transparent)
               mapping.SeriesDefinition.Appearance.Stroke = new SolidColorBrush(color);
 
           InteractivitySettings interactive = new InteractivitySettings();
           interactive.HoverScope = InteractivityScope.Series;
           interactive.SelectionScope = InteractivityScope.Series;
 
           mapping.SeriesDefinition.InteractivitySettings = interactive;
 
           // add item mapping for each property in the item
           mapping.ItemMappings.Add(new ItemMapping()
           {
               DataPointMember = DataPointMember.LegendLabel,
           });
 
           mapping.ItemMappings.Add(new ItemMapping()
           {
               DataPointMember = DataPointMember.YValue,
               FieldName = fieldName
           });
 
           return mapping;
       }
 
 
void MetricService_GetAllConsolidatedMetricsCompleted(object sender, GetAllConsolidatedMetricsCompletedEventArgs e)
       {
           radChart1.SeriesMappings.Clear();
 
           //setting up chart default values
           //radChart1.DefaultView.ChartArea.AxisY.Step = 100000.00;
           //radChart1.DefaultView.ChartLegend.UseAutoGeneratedItems = false;
           //radChart1.DefaultView.ChartArea.ZoomScrollSettingsY.MinZoomRange = 5000.00;
 
           List<Stat> stats = (List<Stat>)e.Result;
           radChart1.DefaultView.ChartTitle.Content = "Consolidated Metrics";
           radChart1.ItemsSource = stats;
           radChart1.DefaultView.ChartLegend.Header = "Metrics Legend";
           radChart1.SeriesMappings.Add(AddSeriesMapping(new SplineSeriesDefinition(), "One", "One", Colors.Red));
           radChart1.SeriesMappings.Add(AddSeriesMapping(new SplineSeriesDefinition(), "Two", "Two", Colors.Blue));
           radChart1.SeriesMappings.Add(AddSeriesMapping(new SplineSeriesDefinition(), "Three", "Three", Colors.Green));
           radChart1.SeriesMappings.Add(AddSeriesMapping(new SplineSeriesDefinition(), "Total", "Total", Colors.Orange));
 
           this.radChart1.CreateItemStyleDelegate = CreateAllConsolidatedCustomColors;
           
           CreateXAxisLabels(stats);
           busyIndicator.IsBusy = false;
       }

6 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 18 Nov 2011, 03:01 PM
Hi Minh,

I can confirm that there is a bug in the control. Indeed, currently it is not possible to limit the Y axis zoom range when using the slider. Our developers have fixed it and the fix will be available in the next internal build. Internal builds are made public usually on Mondays, so please check your account and give it a try once available.

I have updated your Telerik points for pointing this to us.

Best regards,
Ves
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Minh
Top achievements
Rank 1
answered on 21 Nov 2011, 07:18 PM
Hi Ves,

Do you know if the fix is available now? I am new to telerik so I'm not sure where to get the fix for this? My company has full license to the product already so licensing will not be a problem.

Thanks,
Minh
0
Ves
Telerik team
answered on 22 Nov 2011, 05:09 PM
Hello Minh,

I am afraid we did not release an internal build yesterday. It should go public later today. To download it, please follow the next steps (note, that you should do this using the license holder's account):
  • Click on "Your Account" in the left upper corner of the page.
  • Click on "Download and Manage Your Products".
  • Click on "Download installer and other resources".
  • Click on "Latest Internal Builds" link in the RadControls for Silverlight section.

Kind regards,
Ves
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Minh
Top achievements
Rank 1
answered on 23 Nov 2011, 12:57 AM
Ves,

I used our production account and got the latest internal build, but I did not see the fix in the release note. I tried the new DLL anyway, and it is not fixed. Would you please work with your development team to make sure this get included in the next release cycle? Our production application is using this currently. Thank you for your help.

Minh
0
Ves
Telerik team
answered on 23 Nov 2011, 04:13 PM
Hello Minh,

Our local tests show that the fix is included and the problem is resolved. Please, make sure the references in your project are correct and point to the new assemblies. If this seems to be fine, please open a formal support ticket and send us a small runnable application, which demonstrates the problem, so we can investigate it and get back to you with our findings. Thank you.

Best regards,
Ves
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Minh
Top achievements
Rank 1
answered on 23 Nov 2011, 08:26 PM
Hi Ves,

I had my team replaced the DLL's again and it is working now. Thanks for the fix.

Minh
Tags
Chart
Asked by
Minh
Top achievements
Rank 1
Answers by
Ves
Telerik team
Minh
Top achievements
Rank 1
Share this question
or