Issue in scrolling x-axis with string value

2 posts, 0 answers
  1. sunita
    sunita avatar
    9 posts
    Member since:
    Feb 2011

    Posted 24 Aug 2012 Link to this post

    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.

    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.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.ScrollAndZoom;
               radConcensusChart.DefaultView.ChartArea.ZoomScrollSettingsY.ScrollMode = ScrollMode.ScrollAndZoom;
               radConcensusChart.VerticalAlignment = VerticalAlignment.Top;
               radConcensusChart.ItemsSource = lstData;
  2. Peshito
    Peshito avatar
    493 posts

    Posted 29 Aug 2012 Link to this post

    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.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top