Issue with multi-series Bar Chart

3 posts, 0 answers
  1. Brian Seay
    Brian Seay avatar
    4 posts
    Member since:
    Aug 2012

    Posted 12 May 2009 Link to this post

    Hi,

    I seem to have a problem with a multiple-series bar chart.  I have a custom X-Axis, which works fine.   The Y-Axis is simply a number of phone calls figure, so the auto-scale axis would be fine.  However, the values do not seem to marry up with those in the bar series.  The image below illustrates this (flickr link, not sure if you can embed pics on here) :


    As you can see, the rightmost green bar = 111, which seems to line up with the Y-axis - however, none of the others do. 

    The XAML for the chart is as follows (incomplete, the remainder is legend name, title etc):
    <control:RadChart x:Name="skillBarChart"   
                    telerik:Theming.Theme="Office_Black"  > 
                           <control:RadChart.DefaultView> 
                             <chart:ChartDefaultView > 
                                <chart:ChartDefaultView.ChartArea > 
                                    <chart:ChartArea    x:Name="BarChartArea"  
                                                        LegendName="CustomLegend"  
                                                        FontFamily="Arial" FontSize="18"  
                                                        Height="446.848" Width="985"
                                        <chart:ChartArea.AxisX> 
                                            <chart:AxisX    MajorGridLinesVisibility="Collapsed" 
                                                            Title="Skill" /> 
                                        </chart:ChartArea.AxisX> 
                                        <chart:ChartArea.AxisY> 
                                            <chart:AxisY    MajorGridLinesVisibility="Collapsed" 
                                                            MinorGridLinesVisibility="Hidden"  
                                                            Title="Calls" AutoScale="True"  
                                                            MinValue="0" MaxValue="500"/> 
                                        </chart:ChartArea.AxisY> 
                                        <chart:ChartArea.Background> 
                                            <LinearGradientBrush    EndPoint="0.5,1" StartPoint="0.5,0"
                                                    <GradientStop           Color="#FF000000" Offset="0"/> 
                                                    <GradientStop           Color="#FF63B2DE" Offset="1"/> 
                                            </LinearGradientBrush> 
                                        </chart:ChartArea.Background> 
                                    </chart:ChartArea> 
                                </chart:ChartDefaultView.ChartArea> 

    I'm populating the chart as follows (again a snippet) :

     
                     
                                foreach (string s in skillname) 
                                { 
                                    DataPoint Idp = new DataPoint(); 
                                    Idp.YValue = noOfInCalls[Array.IndexOf(skillname, s)]; 
                                    Idp.XValue = Array.IndexOf(skillname, s); 
                                    series1.Add(Idp); 
                                     
     
                                    DataPoint Odp = new DataPoint(); 
                                    Odp.YValue = noOfOutCalls[Array.IndexOf(skillname, s)]; 
                                    Odp.XValue = Array.IndexOf(skillname, s); 
                                    series2.Add(Odp); 
                                } 
                        skillBarChart.DefaultView.ChartArea.DataSeries.Add(series1); 
                        skillBarChart.DefaultView.ChartArea.DataSeries.Add(series2); 


    I then reformat the X-Axis with specific values for the 'skillname' to which each Y value corresponds, but do not do anything with the Y-Axis.   However,  I still get the issue as shown in the image.  The '120' marker in the image is also cut off by the chart title area which I cannot seem to resolve.

    Any assistance gratefully received!  Thanks!

    Richard

  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 14 May 2009 Link to this post

    Hello Brian,

    This is my reply to your support ticket on the same matter:

    It seems you have hit a bug in RadChart - the Y axis ticks are not positioned correctly when a custom defaultview is provided. While our developers investigate the issue, you can use the approach shown in the attached example -- configure the default Axis in code.

    Please accept our apologies for the inconvenience caused by this problem.
    Your Telerik points have been updated.

    Kind regards,
    Ves
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Brian Seay
    Brian Seay avatar
    4 posts
    Member since:
    Aug 2012

    Posted 14 May 2009 Link to this post

    Hi - thanks, I'll try this out and close the ticket when I have confirmed it has resolved the issue.

    Richard

Back to Top