StepLine and Marking Annotation Issue

2 posts, 0 answers
  1. Sivakumar
    Sivakumar avatar
    29 posts
    Member since:
    Dec 2015

    Posted 20 Dec 2016 Link to this post

    Hi Telerik,
      
    We are facing two issues when we are using Stepline series.
      
    ISSUE 1 :
      
    When there is only one category / data point then chart is not drawing . We have such cases  and we need solution or workaround for this case
              
            <telerik:StepLineSeries>
                <telerik:StepLineSeries.DataPoints>
                    <telerik:CategoricalDataPoint Category="1" Value="1.0" />
                    <!--<telerik:CategoricalDataPoint Category="2" Value=1.1" />
                    <telerik:CategoricalDataPoint Category="3" Value="1.0" />
                    <telerik:CategoricalDataPoint Category="4" Value="1.1" />-->
                </telerik:StepLineSeries.DataPoints>
            </telerik:StepLineSeries>
    ISSUE 2 :
    We are using marked zone but marking falling in between and not from beginning so we used margin workaround from telerik to fix (Please see code from attached xaml.cs file)
      
    Before Shifting
    See image
     
    After Shifting
    See image
     
        BELOW CODE USED TO ALIGN MARGIN
    int categoriesCount = this.horizontalAxis.Categories.Count();
    double categorySlotSize = this.chart.PlotAreaClip.Width *    this.chart.Zoom.Width / categoriesCount;
      
                    var margin = new Thickness(-(categorySlotSize / 2), 0, 0, 0);
                    if (!margin.ToString().Contains("Infinity"))
                    {
                        this.chart.Annotations.Where(x => x is CartesianMarkedZoneAnnotation).ToList()
                            .ForEach(m => { m.Margin = margin; });
      
                    }
    But we are facing issue when we zoom the chart.The marking going out of actual area.Please help to resolve it.
          
    After Zooming 
    See Image
              
    ISSUE 3 :
      
    When we are using marking for last category then the marking done for half way only.Please help to draw until end (Need to support while zooming as well)
      
                <telerik:StepLineSeries>
                <telerik:StepLineSeries.DataPoints>
                    <telerik:CategoricalDataPoint Category="1" Value="1.0" />
                    <telerik:CategoricalDataPoint Category="2" Value="1.1" />
                    <telerik:CategoricalDataPoint Category="3" Value="1.0" />
                    <telerik:CategoricalDataPoint Category="4" Value="1.1" />
                </telerik:StepLineSeries.DataPoints>
            </telerik:StepLineSeries>
      
    <telerik:CartesianMarkedZoneAnnotation VerticalFrom="1.0" VerticalTo="1.1" HorizontalFrom="4" Fill="Red"/>
  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    1337 posts

    Posted 22 Dec 2016 Link to this post

    Hi Sivakumar,

    I already answered your question in this forum. I would ask you to keep the communication for a specific topic in a single thread.

    Regards,
    Martin
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top