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

On UI getting unwanted X and Y axis lines

1 Answer 18 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Dhruv
Top achievements
Rank 1
Dhruv asked on 05 Mar 2014, 02:10 PM
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;

        }

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 10 Mar 2014, 07:37 AM
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.

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