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

Problems with RadChart & AdditionalYAxes & unaligned values

2 Answers 33 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Enill
Top achievements
Rank 1
Enill asked on 21 Apr 2010, 08:03 PM
Hi,
i have a little problem(bugs?) when trying to add another AxisY to my RadChart.

Also for some reason i have unaligned AxisX value with the BarSeriesDefinitions.

He is the code, and thanks in advance!

        public MainPage() 
        { 
            InitializeComponent(); 
 
            RadChart rc = new RadChart(); 
            ChartArea ca = new ChartArea(); 
            ChartTitle ct = new ChartTitle(); 
            Grid gridChart = new Grid(); 
            gridChart.RowDefinitions.Add(new RowDefinition { Height = new GridLength(25, GridUnitType.Auto) }); 
            gridChart.RowDefinitions.Add(new RowDefinition { }); 
 
            ca.LegendName = "ChartLegend"
            ca.AdditionalYAxes.Add(new Telerik.Windows.Controls.Charting.AxisY() { AxisName = "testAxis" }); 
 
            ct.SetValue(Grid.RowProperty, 0); 
            ca.SetValue(Grid.RowProperty, 1); 
 
            gridChart.Children.Add(ct); 
            gridChart.Children.Add(ca); 
             
            DataSeries ds = new DataSeries(); 
 
            for (int i = 0; i < 20; i++) 
            { 
                ds.Add(new DataPoint(i)); 
            } 
 
            ca.DataSeries.Add(ds); 
            ct.Content = "TestTitle"
 
            rc.Content = gridChart; 
            rc.UseDefaultLayout = false
 
            LayoutRoot.Children.Add(rc); 
 
        } 

2 Answers, 1 is accepted

Sort by
0
Enill
Top achievements
Rank 1
answered on 21 Apr 2010, 08:09 PM
Nevermind i was actually looking at the wrong axis(my bad).

I still have a problem with adding a AxisY.
0
Enill
Top achievements
Rank 1
answered on 21 Apr 2010, 08:32 PM
Ignore this post.

I thought the AxisY would show up even without data.
Tags
Chart
Asked by
Enill
Top achievements
Rank 1
Answers by
Enill
Top achievements
Rank 1
Share this question
or