Problems with RadChart & AdditionalYAxes & unaligned values

3 posts, 0 answers
  1. Enill
    Enill avatar
    41 posts
    Member since:
    Apr 2010

    Posted 21 Apr 2010 Link to this post

    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. Enill
    Enill avatar
    41 posts
    Member since:
    Apr 2010

    Posted 21 Apr 2010 Link to this post

    Nevermind i was actually looking at the wrong axis(my bad).

    I still have a problem with adding a AxisY.
  3. Enill
    Enill avatar
    41 posts
    Member since:
    Apr 2010

    Posted 21 Apr 2010 Link to this post

    Ignore this post.

    I thought the AxisY would show up even without data.
Back to Top