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

Showing series name in the x axis items

1 Answer 30 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ofer
Top achievements
Rank 1
Ofer asked on 14 Oct 2013, 04:23 PM
Hey.
i have a bar chart which has several series. each series has several items.
i need the series name to be displayed in the x axis (instead of the step numbers).

whenever i add a a ChartAxisItem (see attached code), the display is massed up (massed up.png image vs' fine.png).

please provide help.

code:
HiveEventsChart.PlotArea.XAxis.RemoveAllItems();
foreach (var series in HiveEventsChart.Series)
{
	var axisItem = new ChartAxisItem();
	axisItem.TextBlock.Text = series.Name.ToShortString(2);
        axisItem.Appearance.RotationAngle = 30;
        HiveEventsChart.PlotArea.XAxis.AddItem(axisItem);
}

thanks.

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 17 Oct 2013, 09:21 AM
Hello Ofer,

You can find attached a sample report definition illustrating a Chart item with programmatically set X axis labels. For more details take a look at the How Do I add Axis Labels Programmatically? help article.

Notice the Chart item is now obsolete and it is highly recommended to switch to the new Graph item. The Graph item provides greater design-time support, unified approach for working with different chart types, options for styling, using expressions and adding interactivity.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

Tags
General Discussions
Asked by
Ofer
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or