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

Issue in scrolling x-axis with string value

1 Answer 44 Views
Chart
This is a migrated thread and some comments may be shown as answers.
sunita
Top achievements
Rank 1
sunita asked on 24 Aug 2012, 11:20 AM
Hello team,

In my chart x-axis contains string values like 'Q1 11',Q2 11,Q3 11,Q4 11,Q1 12 like this and on y axis double values i am not able to get zooming and scrolling to this.please have look at the code .

please help me ih this regards.


Thanks,
Sunita
public void DrawRangechart()
       {
           List<List<strChartData>> lstData = new List<List<strChartData>>();
           lstData = GetRangeSeriesData();
           radConcensusChart.DefaultView.ChartArea = new ChartArea();
           for (int Icnt = 0; Icnt < lstData.Count(); Icnt++)
           {
               SeriesMapping ValMapping = new SeriesMapping();
               RangeSeriesDefinition lineDefinition = new RangeSeriesDefinition();
               lineDefinition.ShowItemLabels = false;
               lineDefinition.ShowItemToolTips = true;
               ValMapping.SeriesDefinition = lineDefinition;
               ValMapping.ItemMappings.Add(new ItemMapping("XValue", DataPointMember.XCategory));
               ValMapping.ItemMappings.Add(new ItemMapping("YValue", DataPointMember.Low));
               ValMapping.ItemMappings.Add(new ItemMapping("YValue1", DataPointMember.High));
               ValMapping.CollectionIndex = Icnt;              
               radConcensusChart.SeriesMappings.Add(ValMapping);
                 
               
           }
           radConcensusChart.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.ScrollAndZoom;
           radConcensusChart.DefaultView.ChartArea.ZoomScrollSettingsY.ScrollMode = ScrollMode.ScrollAndZoom;
           radConcensusChart.VerticalAlignment = VerticalAlignment.Top;
           radConcensusChart.ItemsSource = lstData;
            
            
       }

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 29 Aug 2012, 08:41 AM
Hi Sunita,

It is not clear from the code provided what might be causing the issue. This is why I have attached a sample project similar to your scenario demonstrating how to set Zooming and Scrolling. If this does not help, could you please reproduce the issue in the attached example or provide us with a sample runnable copy of yours demonstrating this behavior. As this is a forum thread, you could use a third party web site for uploading and sharing the app with us, so we could download it and debug it locally.

Hope this helps.

Regards,
Peshito
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart
Asked by
sunita
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or