Hi,
I recently upgraded a project that was using a fairly old version of Telerik controls (about 2 years ago). In this project there's a chart with an horizontal axis that contains DateTimes elements. This axis was configured with follpwing snippet
if
(chart.HorizontalAxis ==
null
)
{
chart.HorizontalAxis =
new
CategoricalAxis
{
LabelFitMode = AxisLabelFitMode.Rotate,
LabelRotationAngle = 45,
LabelFormat =
"dd/MM/yyyy\nHH:mm:ss"
,
PlotMode = AxisPlotMode.OnTicksPadded,
Padding =
new
System.Windows.Thickness(0.1),
GapLength = 0.1,
HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center,
LabelInterval = 1,
MajorTickInterval = 1,
#if SILVERLIGHT
LabelTemplateSelector =
new
HorizontalAxisTemplateSelector(series)
#endif
};
chart.HorizontalAxis.FontSize = chart.HorizontalAxis.FontSize - 2;
}
With the LabelFormat I could force xAxis to show labels in long datetimeformat in two lines. Since I've upgraded to latest telerik bits the label format does not longer work, I'm seeing the LabelFormat as the Label for each series value. Is there any way I can format the label as I wish?
Regards
DanĂ