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

Convert Xaxis labels

1 Answer 96 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 08 Feb 2012, 12:02 PM
I have created a report, completely wihin the designer. This report contains several graphs, wiyh on the x-axis the month-nr's. To achieve better readability, I want to convert the month-numbers to month-names. I have created a method:

public static string NRToMonth(int nr)
{
  string month = "";          
  switch (nr)           
  {               
    case 1:                   
      month = 
"jan";
      break;
    case 2:
      month =
"feb";
      break;



This methods works fine when used in a table, but now I want to convert the x-axis labels of several graphs. 
At this moment i really don't know which code and where to put this code to change the x-axis?

I can change parameters like axis-labels programmatically, but not convert axis values?

i'm using Telerik Reporting 2011 Q3

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 11 Feb 2012, 03:44 PM
Hi Peter,

You need to set the custom values to the Chart.PlotArea.XAxis[0].TextBlock.Text property. You can see similar implementation in How Do I add Axis Labels Programmatically help article.

Kind regards,
Steve
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
Peter
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or