Edit this page

StepAreaSeries

The StepAreaSeries is visualized on the screen as a horizontal and vertical line instead of straight line which connects all data points. The area between the line is colored in an arbitrary way. By default the colors of the line and the area are the same.

Declaratively defined series

You can use the definition from Example 1 to display an StepAreaSeries.

Example 1: Declaring a StepAreaSeries in XAML

<telerik:RadCartesianChart Palette="Windows8">
<telerik:RadCartesianChart.HorizontalAxis>
    <telerik:CategoricalAxis/>
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:RadCartesianChart.VerticalAxis>
    <telerik:LinearAxis />
</telerik:RadCartesianChart.VerticalAxis>
<telerik:RadCartesianChart.Series>
    <telerik:StepAreaSeries>
        <telerik:StepAreaSeries.DataPoints>
            <telerik:CategoricalDataPoint Category="January" Value="2" />
            <telerik:CategoricalDataPoint Category="February" Value="5" />
            <telerik:CategoricalDataPoint Category="March" Value="3" />
            <telerik:CategoricalDataPoint Category="April" Value="10" />
            <telerik:CategoricalDataPoint Category="May" Value="9" />
            <telerik:CategoricalDataPoint Category="June" Value="7" />
            <telerik:CategoricalDataPoint Category="July" Value="1" />
        </telerik:StepAreaSeries.DataPoints>
    </telerik:StepAreaSeries>
</telerik:RadCartesianChart.Series>
</telerik:RadCartesianChart>

Figure 1: StepAreaSeries visual appearance

radchartview-series-stepareaseries

Properties

  • CategoryBinding: A property of type DataPointBinding that gets or sets the property path that determines the category value of the data point.
  • ValueBinding: A property of type DataPointBinding that gets or sets the property path that determines the value of the data point.
  • Fill: A property of type Brush that gets or sets the color of the StepAreaSeries area.
  • DashArray: A property of type DoubleCollection that gets or sets the dash pattern applied to the stroke of the area.
  • Stroke: A property of type Brush that gets or sets the outline stroke of the StepAreaSeries area.
  • AreaShapeStyle: A property of type Style that gets or sets the appearance of the area shape. The property excepts a style that targets an object of type Path.
  • StrokeShapeStyle: A property of type Style that gets or sets the style of the stroke of the area shape. The property accepts a style that targets an object of type Path.
  • OriginValue: A property of type double which controls the origin value from which the series should start drawing on the numeric axis (LinearAxis or LogarithmicAxis).
  • StrokeMode: A property of type AreaSeriesStrokeMode that gets or sets the mode that determines what part of the series will be stroked. The stroke mode is an enumeration and it allows the following values:
    • None: No outlining.
    • LeftLine: The left line (from plotline to the first point) is outlined.
    • Points: The line that connects all points is outlined. This is the default mode.
    • LeftAndPoints: The left line and the line that connects all points are outlined.
    • RightLine: The right line (from plotline to the last point) is outlined.
    • RightAndPoints: The right line and the line that connects all points is outlined.
    • AllButPlotLine: All members except the PlotLine are specified..
    • PlotLine: The plotline is outlines.
    • All: All sides of the area is outlined.

Data Binding

You can use the ValueBinding and CategoryBinding properties of the StepAreaSeries to bind the DataPoints’ properties to the properties from your view models.

Example 2: Defining the view model

public class PlotInfo
{   
    public string Category { get; set; }
    public double Value { get; set; }
}

//.......
this.DataContext = new ObservableCollection<PlotInfo>
{
    new PlotInfo() { Category = "January", Value = 2},
    //....
};

Example 3: Specify a StepAreaSeries in XAML

 <telerik:StepAreaSeries ItemsSource="{Binding}" CategoryBinding="Category" ValueBinding="Value"/>

See the Create Data-Bound Chart for more information on data binding in the RadChartView suite.

Styling the Series

You can see how to style spline area series using different properties in the StepAreaSeries section of the Customizing CartesianChart Series help article.

Additionally, you can use the Palette property of the chart to change the colors of the StepAreaSeries on a global scale. You can find more information about this feature in the Palettes section in our help documentation.

See Also

Was this article helpful? Yes No

Give article feedback

Tell us how we can improve this article

Dummy