New to Telerik UI for WinUI? Download free 30-day trial

Properties

This topic aims to get you familiar with the specific properties of each data bar type.

DataBinding

  • Value (a property of RadDataBar): Expects a value which will be used to determine the size of the bar.

  • ValuePath (a property of RadStackedDataBar and RadStacked100DataBar) - expects the name of the property from the underlying data item, which will determine the value of each bar in the stack.

RadDataBar

  • LabelPosition: It's an enum with several options that you may choose from: Left, Right, EndOfBarInside or EndOfBarOutside. If LabelPosition is set to EndOfBarOutside/EndOfBarInside - the LabelDistance is the maximum distance in pixels between the bar and the textblock. If LabelPosition is set to Left/Right - LabelDistance is the margin of the text block.

  • LabelFormat: used to specify a label format expression custom numeric format string to customize the labels.

  • LabelVisibility: Controls whether the label should appear or not.

  • LabelStyle: Customize the RadDataBar labels.

  • BorderBrush: Provides a Brush to customize the border of the databar. Note that you'll also need to specify a BorderThickness.

  • ValueBrush and NegativeValueBrush: Provides a Brush to customize the appearance of the positive and negative bars respectively.

  • ValueBorderBrush and NegativeValueBorderBrush: Provides a Brush to customize the border of the positive and negative bars respectively.

  • ShowOutOfRangeIndicators: Boolean property that controls the visibility of the out-of-range indicators. By default it's value is true. You can read more about it in our Overflow and UnderOverflow templates topic.

  • OriginValue: Defines an origin for the databar to start at.

RadStackedDataBar and RadStacked100DataBar

  • BarBrushes: A Brush collection that is to be used with the bars.

You can access the RadDataBar controls through an alias pointing to the Telerik.UI.Xaml.Controls.DataVisualization namespace: xmlns:dataVisualization="using:Telerik.UI.Xaml.Controls.DataVisualization"

Example 2: RadStackedDataBar BarBrushes property

<dataVisualization:RadStackedDataBar.BarBrushes> 
    <dataVisualization:BrushCollection> 
        <SolidColorBrush Color="Black" /> 
        <SolidColorBrush Color="Green" /> 
        <SolidColorBrush Color="Blue" /> 
    </dataVisualization:BrushCollection> 
</dataVisualization:RadStackedDataBar.BarBrushes> 
  • BarBorderBrushes: A Border Brush collection that is to be used with the bars.

  • ShowToolTips: Controls the visibility of the tooltips.

  • ToolTipFormat: Used to specify a format expression custom numeric format string to customize the tooltips.

  • AxisVisibility: controls the visibility of the axis that will appear at the start of the first bar.

  • AxisStroke: Sets stroke for the axis.

  • ToolTipPath: Sets the name of the property from the underlying data item, which will determine what to be displayed with the tooltip.

  • ValuePath: Sets the name of the property from the underlying data item, which will determine what the value of the bar is.

  • ValueBrush and NegativeValueBrush: Provides a Brush to customize the appearance of the positive and negative bars respectively.

  • ValueBorderBrush and NegativeValueBorderBrush: Provides a Brush to customize the border of the positive and negative bars respectively.

RadHorizontalAxis

  • LabelStep: Indicates that one out of n ticks should have a label where n is the value of the property.

  • MajorTickLength: Controls the size of the major ticks.

  • Minimum and Maximum: Tshe start and end value for the axis.

  • MinorTickLength: Controls the size of the minor ticks.

  • Step: Indicates the step of the ticks. For instance - if the minumum is "-20" and the maximum is "10" and the step is "3" - ticks will be visualized to indicate -20, -17, -14 .. 4, 7, 10.

  • Stroke: The stroke brush for the Axis.

  • TicksDistance: Specifies a value indicating that every axis tick should be placed at least n pixels away from the next one, where n is the value of the property. Use when you have too much data to display on the axis to control the number of ticks shown.

    The TickDitance property has a smaller priority than Step. If both Step and TickDistance are set - the axis algorithm that distributes the ticks will only take into consideration the Step property. These two properties should not be used in conjunction.

See Also

In this article
Not finding the help you need?