Show large AMount of Data On Graph

4 posts, 0 answers
  1. charu
    charu avatar
    7 posts
    Member since:
    Jun 2010

    Posted 27 Jul 2010 Link to this post

    Hi

    I am using Bar Graph & Scatter Plot Graph but if the no of values in a graph increases then , the X-Axis data is not visible clearly.
    My requirement is to show Large amount of data , I want to hide the X-Axis data .
    I have not defined X-Axis but graph automatically shows 1,2,3...
    I want to hide these vales ,I don't want to use scrolling feature. Please refer snapshot for this.

    Thanks & Regards,
    Charu Pahuja
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 29 Jul 2010 Link to this post

    Hi charu,

    There are two possible ways to handle this functionality. The first option is to alter the roration angle of the XAxis label, in order to improve readability:

    Telerik.Windows.Controls.RadChart radChart = new Telerik.Windows.Controls.RadChart();
    SeriesMapping seriesMapping = new SeriesMapping();
    seriesMapping.LegendLabel = "MSFT";
    seriesMapping.SeriesDefinition = new LineSeriesDefinition();
    seriesMapping.ItemMappings.Add( new ItemMapping( "FromDate", DataPointMember.XValue ) );
    seriesMapping.ItemMappings.Add( new ItemMapping( "Close", DataPointMember.YValue ) );
    radChart.SeriesMappings.Add( seriesMapping );
    radChart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "dd-MMM";
    radChart.DefaultView.ChartArea.AxisX.LabelRotationAngle = 45;

    Alternatively, if this setting is not enough, you may choose to hide some of the elements, by using the LabelStep property for the X-Axis. Additional information on this is available in the following article:

    http://www.telerik.com/help/silverlight/radchart-features-axes-x-axis.html

    I hope this information gets you started properly.

    Sincerely yours,
    Yavor
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. charu
    charu avatar
    7 posts
    Member since:
    Jun 2010

    Posted 01 Aug 2010 Link to this post

    Hi,

    No i have data of like 2000 + records but the space of graph is limited so i don't want to show the X-Axis lables (1,2,3...)


    Please tell me how to hide this.

    Thanks & Regards,
    Charu Pahuja
  4. Sia
    Admin
    Sia avatar
    745 posts

    Posted 04 Aug 2010 Link to this post

    Hello Charu,

    Here is one possible solution of your issue.

    You can set the following style in your resources:
    <UserControl.Resources>
        <Style x:Key="CustomLabel" TargetType="TextBlock">
            <Setter Property="Foreground" Value="Transparent" />
        </Style>
    </UserControl.Resources>

    and apply it in your code-behind:
    RadChart1.DefaultView.ChartArea.AxisX.AxisStyles.ItemLabelStyle = this.Resources["CustomLabel"] as Style;

    Regards,
    Sia
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top