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

how to load X-axis label?

3 Answers 77 Views
Chart
This is a migrated thread and some comments may be shown as answers.
mathieu ferlay
Top achievements
Rank 1
mathieu ferlay asked on 10 Aug 2010, 04:18 PM
Hello,
I try to show a string like a X-axis label but I don't manage to find my error. Could you help me?(This a 3D bar)

graphChartDataSeries.LegendLabel =

 

"values A";

 

graphChartDataSeries2.LegendLabel =

 

"values B";

 

graphChartDataSeries3.LegendLabel =

 

"values C";

 

graphChartDataSeries.Add(

 

new DataPoint(10000) { LegendLabel = "values 1" });

 

graphChartDataSeries2.Add(

 

new DataPoint(11000) { LegendLabel = "values 1" });

 

graphChartDataSeries3.Add(

 

new DataPoint(12000) { LegendLabel = "values 1" });

 

graphChartDataSeries.Add(

 

new DataPoint(80000) { LegendLabel = "values 2" });

 

graphChartDataSeries2.Add(

 

new DataPoint(82000) { LegendLabel = "values 2" });

 

graphChartDataSeries3.Add(

 

new DataPoint(84000) { LegendLabel = "values 2" });

 

graphChartDataSeries.Add(

 

new DataPoint(40000) { LegendLabel = "values 3" });

 

graphChartDataSeries2.Add(

 

new DataPoint(42000) { LegendLabel = "values 3" });

 

graphChartDataSeries3.Add(

 

new DataPoint(45000) { LegendLabel = "values 3" });

 

graphChartDataSeries.Add(

 

new DataPoint(55000) { LegendLabel = "values 4" });

 

graphChartDataSeries2.Add(

 

new DataPoint(57000) { LegendLabel = "values 4" });

 

graphChartDataSeries3.Add(

 

new DataPoint(60000) { LegendLabel = "values 4" });

 

graphChartDataSeries.Add(

 

new DataPoint(205000) { LegendLabel = "values 5" });

 

graphChartDataSeries2.Add(

 

new DataPoint(207000) { LegendLabel = "values 5" });

 

graphChartDataSeries3.Add(

 

new DataPoint(209000) { LegendLabel = "values 5" });

 

chart1.DefaultView.ChartArea.AxisX.DefaultLabelFormat=//???? <-----I don't know which format I need to put here

 

 

chart1.DefaultView.ChartArea.AxisX.LabelRotationAngle = 45;

 

chart1.DefaultView.ChartArea.DataSeries.Add(graphChartDataSeries);

chart1.DefaultView.ChartArea.DataSeries.Add(graphChartDataSeries2);

chart1.DefaultView.ChartArea.DataSeries.Add(graphChartDataSeries3);


The other question is, I want to hide values on 3d Bars but I also don't how...

regards, 
        Mat

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 13 Aug 2010, 07:45 AM
Hello mathieu,

To see more information along the lines of the requested functionality, please refer to the following topic:

http://www.telerik.com/help/silverlight/chart-custom-labels.html

It contains two options to choose from. Also, with respect to hiding the values - do you need to hide the label value(s) along the x-axis, or the values on the point mark(s). Any additional information will help me better address the question at hand.

Greetings,
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
mathieu ferlay
Top achievements
Rank 1
answered on 16 Aug 2010, 07:29 AM
Hello,
to answer at your question, I'm not sure but I think it's  values on the point mark(s). I try to hide values on the top of the bar in the diagram. I'm sure it's a little property but I don't manage to find it.

thx, Mat
0
Accepted
Yavor
Telerik team
answered on 17 Aug 2010, 03:40 PM
Hello mathieu,

You can set the "ShowItemLabels" property of the series definition to false. This is demonstrated in the sample code below:

<telerikChart:RadChart.SeriesMappings>          
           <telerikCharting:SeriesMapping>                              
               <telerikCharting:SeriesMapping.SeriesDefinition>                    
                   <telerikCharting:Bar3DSeriesDefinition ShowItemLabels="False">                        
                   </telerikCharting:Bar3DSeriesDefinition>
               </telerikCharting:SeriesMapping.SeriesDefinition>                 
               <telerikCharting:SeriesMapping.ItemMappings>                    
                   <telerikCharting:ItemMapping FieldName="Sales" DataPointMember="YValue" />                    
                   <telerikCharting:ItemMapping FieldName="Date" DataPointMember="XCategory" />
               </telerikCharting:SeriesMapping.ItemMappings>                                
           </telerikCharting:SeriesMapping>            
       </telerikChart:RadChart.SeriesMappings>

I hope this information helps.

All the best,
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
Tags
Chart
Asked by
mathieu ferlay
Top achievements
Rank 1
Answers by
Yavor
Telerik team
mathieu ferlay
Top achievements
Rank 1
Share this question
or