Chart axis and points

2 posts, 0 answers
  1. NS
    NS avatar
    189 posts
    Member since:
    Jan 2007

    Posted 03 Nov 2008 Link to this post


    I've implemented a chart with multiple areas (i get the percentages of the cpu's and add it to the chart data) but i have some problems:

    1. How can i add a fixed Y-axis (0-100 major tick 10 minor 5) because now it's dynamic (changes if value is greater or smaller then axis)
    2. How can i make the X-axis start at 0 because now i've got a gap between the first value and the Y-axis (because Y is always 1 as start)
    3. How can i remove the label on the points displaying the value

    Code for populating the chart:

            DataSeries splineAreaSeriesCPU1 = null;  
            DataSeries splineAreaSeriesCPU2 = null;  
            public void fillProcessorChart()  
                splineAreaSeriesCPU1 = new DataSeries();  
                splineAreaSeriesCPU2 = new DataSeries();  
                splineAreaSeriesCPU1.Definition = new SplineAreaSeriesDefinition();  
                splineAreaSeriesCPU2.Definition = new SplineAreaSeriesDefinition();  
            public static void FillWithSampleData(DataSeries series, double PcValue)  
                series.Add(new DataPoint { XValue = series.Count() , YValue = PcValue });  
                if (series.Count()>10)  

                    <telerik:RadChart x:Name="RadChart1" Margin="8,8,8,8" Grid.Row="3" Grid.Column="2"  UseDefaultLayout="False" VirtualizingStackPanel.VirtualizationMode="Recycling">  
                        <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">  
                                <RowDefinition Height="0.5*" /> 
                                <RowDefinition Height="0.5*" /> 
                                <ColumnDefinition Width="*" /> 
                            <telerik:ChartArea Grid.Row="0" x:Name="ChartArea1" > 
                                    <telerik:AxisY MajorGridLinesVisibility="Collapsed" 
                                                   Title="CPU 1" /> 
                            <telerik:ChartArea Grid.Row="1" x:Name="ChartArea2" > 
                                    <telerik:AxisY MajorGridLinesVisibility="Collapsed" 
                                                   Title="CPU 2" /> 

    Any ideas?
  2. Ves
    Ves avatar
    2926 posts

    Posted 06 Nov 2008 Link to this post

    Hi NS,

    Straight to your questions:
    1. Unfortunately, this is not supported. For the moment RadChart supports only auto-scaled axes.
    2. Sorry to say it again - not supported. Both these are already in our TODO list and your feedback counts when considering their priority.
    3. This has been added to RadChart and with the official version, which will be available today, you will be able to add these lines:
    splineAreaSeriesCPU1.Definition.ShowItemLabels = false;
    splineAreaSeriesCPU2.Definition.ShowItemLabels = false;

    I have updated your Telerik points for the valuable feedback.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top