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

Show large AMount of Data On Graph

3 Answers 85 Views
Chart
This is a migrated thread and some comments may be shown as answers.
charu
Top achievements
Rank 1
charu asked on 27 Jul 2010, 05:49 PM
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

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 29 Jul 2010, 11:41 AM
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
0
charu
Top achievements
Rank 1
answered on 01 Aug 2010, 01:18 PM
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
0
Sia
Telerik team
answered on 04 Aug 2010, 05:48 PM
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
Tags
Chart
Asked by
charu
Top achievements
Rank 1
Answers by
Yavor
Telerik team
charu
Top achievements
Rank 1
Sia
Telerik team
Share this question
or