Thank you for writing.
This type of functionality is not provided out of the box. However this can be easily achieved by subscribing to the LabelFormatting
event and in the handler manually move the label downwards the labels of the bars having negative values. This can be achieved by setting a proper value to the BarLabelElement.PosittionOffset
property, this can be calculated through the RadRect
object contained in the LayoutSlot
property. Please see my code snippet below:
Form1 : Form
BarSeries barSeries =
barSeries.LabelMode = BarLabelModes.Top;
sender, ChartViewLabelFormattingEventArgs e)
BarLabelElement barLabel = e.LabelElement
(value < 0 )
RadRect rect = e.LabelElement.DataPoint.LayoutSlot;
)rect.Height + 30);
I would like to note that this solution will work for the case you describe, if you decide to use this approach in another scenario you might need to slightly change it.
I am also sending you screenshot of the result on my end.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.