On UI getting unwanted X and Y axis lines

2 posts, 0 answers
  1. Dhruv
    Dhruv avatar
    15 posts
    Member since:
    Nov 2011

    Posted 05 Mar 2014 Link to this post

    Hi,

    Extra X and Y axis lines shows up on RadChart. For fixing this issue we need to write extra code to remove these extra lines.
    Please refer document attached for more details.



    To solve this issue we need to remove that extra line in code for X axis and Y axis separately.
    (Code Snippet Below)

    private void
    HideUnusedAdditionalAxis()

            {

                FrameworkElement lastAxisObject =
    null;

                FrameworkElement
    notZeroItemAxisObject = null;

                var axisX2DObjects =
    RelationshipSummaryDepositMonthlyBalanceChart.ChildrenOfType<AxisX2D>();

     

                foreach (var axisX2D in
    axisX2DObjects)

                {

                    axisX2D.Visibility =
    System.Windows.Visibility.Hidden;

                    lastAxisObject = axisX2D;

                    if (axisX2D.Items.Count != 0)

                    {

                        notZeroItemAxisObject =
    axisX2D;

                    }

                }

                if (lastAxisObject != null)

                    (notZeroItemAxisObject ??
    lastAxisObject).Visibility = System.Windows.Visibility.Visible;

            }

  2. Peshito
    Admin
    Peshito avatar
    497 posts

    Posted 10 Mar 2014 Link to this post

    Hello Dhruv,

    Thank you for the code snipped provided. I am glad you managed to handle this behavior on your own. We are aware of this axis behavior, however I cannot commit to a specific time frame whether or when it will be fixed. We are currently focused on our newer chart control - ChartView. If you haven't checked it out, please do so and you may give it a try.

    Regards,
    Peshito
    Telerik

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top