RadCartesianChart Questions

3 posts, 0 answers
  1. Willem
    Willem avatar
    12 posts
    Member since:
    Nov 2012

    Posted 11 Jan 2013 Link to this post


    I am currently moving a chart from RadChart to RadCartesian chart due to performance issues.  I am facing some issues in replicating some of the features available in RadChart.  Could you please advise how I can do the following :

    1) I want the vertical axis to display on the left and right of the chart.  Currently I am adding series programatically and the only way I have found to do this is to define the left axis in xaml and redefine the right axis on the first series I add,  this method doesn't work if I only have 1 series however.  Then I have to use binding to keep the two axes in sync as I add more series.

    Is there a simple way to do this?  Ideally the options for HorizontalPlacement should be Left, Right, Both.

    2) With RadChart I could add a sloping straight line using CustomLine in the chart annotations, specifying YIntercept and Slope.  Although I can add a CartesianCustomAnnotation in RadCartesianChart and can position the start of the line correctly relative to the underlying plot area, I cannot determine how to set the end point of the line as the X and Y values are relative to the CustomAnnotation Canvas not the plotted chart.

    This question was also asked in the post below but was answered with CartesianGridAnnotation which only provides a solution for a straight line with no slope to my knowledge.


    Below is my xaml for the custom annotation
         HorizontalValue="{Binding DriftLineStartDate}"
         VerticalValue="{Binding DriftLineStartValue}"
         HorizontalAxis="{Binding ElementName=HorizontalAxis}"
         VerticalAxis="{Binding ElementName=VerticalAxis}"
                 <Line StrokeThickness="1"
                     X2 ="{Binding DriftLineX2}"
                     Y2 ="{Binding DriftLineY2}"/>

  2. Petar Kirov
    Petar Kirov avatar
    425 posts

    Posted 15 Jan 2013 Link to this post

    Hello Willem,

    Let me address your questions one by one:

    1) Currently there is no easy way to achieve this. You can add a place holder series with one data point - PlotInfo { XVal = i, YVal = null } (so that it is not visualized) which will work with the additional axis. You can use the DataBindingComplete of the rest of the series to update the axis Minimum and Maximum in code, when this is required.

    2) You can consider using a LineSeries with two data points to emulate a CustomLine annotation. That way you can specify the start and end point in chart coordinates.

    I have forwarded your feature requests to our development team and have logged them in our Public Issue Tracker on these two links - feature 1, feature 2
    Petar Kirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
  4. Willem
    Willem avatar
    12 posts
    Member since:
    Nov 2012

    Posted 16 Jan 2013 Link to this post

    Hi Petar,

    Thanks for you reply.

    1) I have attached my extra axis to the custom line mentioned in point 2 as a work around. 
    2) Thanks for this suggestion,  worked perfectly!


Back to Top