StepArea Chart
StepArea graphs are very similar to the regular area chart, except that instead of a straight line, all values are connected by continuous vertical and horizontal lines forming a step. This type of chart is useful when you need to show what extent values have changed for different points in the same series.

The chart from the image above is created with the following code:
<shield:ShieldChart ID="ShieldChart1" Width="100%" Height="400px" runat="server"
OnTakeDataSource="ShieldChart1_TakeDataSource"
CssClass="chart">
<PrimaryHeader Text="Site Usage Statistics"></PrimaryHeader>
<Axes>
<shield:ChartAxisX AxisType="Datetime" FixedEnd="false"></shield:ChartAxisX>
<shield:ChartAxisY EndOffset="0">
</shield:ChartAxisY>
</Axes>
<DataSeries>
<shield:ChartStepAreaSeries CollectionAlias="Site1" DataFieldY="Site1Value">
</shield:ChartStepAreaSeries>
<shield:ChartStepAreaSeries CollectionAlias="Site2" DataFieldY="Site2Value">
</shield:ChartStepAreaSeries>
</DataSeries>
</shield:ShieldChart>
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
(ShieldChart1.DataSeries[0] as Shield.Web.UI.ChartStepAreaSeries).DataStart = (decimal)(new DateTime(2010, 1, 1) -
new DateTime(1970, 1, 1).ToUniversalTime()).TotalMilliseconds;
(ShieldChart1.DataSeries[0] as Shield.Web.UI.ChartStepAreaSeries).DataStep = 24 * 3600 * 1000;
(ShieldChart1.DataSeries[1] as Shield.Web.UI.ChartStepAreaSeries).DataStart = (decimal)(new DateTime(2010, 1, 1) -
new DateTime(1970, 1, 1).ToUniversalTime()).TotalMilliseconds;
(ShieldChart1.DataSeries[1] as Shield.Web.UI.ChartStepAreaSeries).DataStep = 24 * 3600 * 1000;
}
protected void ShieldChart1_TakeDataSource(object sender, Shield.Web.UI.ChartTakeDataSourceEventArgs e)
{
List datasource = new List()
{
new ExampleData() { Site1Value = 29.9, Site2Value=20.9},
new ExampleData() { Site1Value = 71.5, Site2Value= 31.5},
new ExampleData() { Site1Value = 106.4, Site2Value= 98.4 },
new ExampleData() { Site1Value = 129.2, Site2Value= 101.2},
new ExampleData() { Site1Value = 144.0, Site2Value= 104.0},
new ExampleData() { Site1Value = 176.0, Site2Value= 26.0},
new ExampleData() { Site1Value = 135.6, Site2Value= 105.6},
new ExampleData() { Site1Value = 148.5, Site2Value= 48.5},
new ExampleData() { Site1Value = 216.4, Site2Value= 206.4 },
new ExampleData() { Site1Value = 194.1, Site2Value= 114.1 },
new ExampleData() { Site1Value = 195.6, Site2Value= 145.6 },
new ExampleData() { Site1Value = 154.4, Site2Value= 164.4 },
new ExampleData() { Site1Value = 145, Site2Value= 175 },
new ExampleData() { Site1Value = 133, Site2Value= 103 },
new ExampleData() { Site1Value = 145, Site2Value= 115 },
new ExampleData() { Site1Value = 127, Site2Value= 107 }
};
ShieldChart1.DataSource = datasource;
}
private class ExampleData
{
public double Site1Value { get; set; }
public double Site2Value { get; set; }
}
- When the chart is bound to collection of objects the X values are got by the field which name is set into the
DataFieldXproperty of theChartStepAreaSeries. The Y values are got by the field which name is set into theDataFieldYproperty. - The name that is shown in the legend is chosen via the
CollectionAliasproperty of theChartStepAreaSeries. - By default all X values are sorted in order area chart to be shown appropriately, however this behavior is controlled by the
EnableValueXSortingproperty of theChartStepAreaSeries. DataStartandDataStepproperties control the start value of the x axis and explicit value for the interval between a data series member values.- All points from the
ChartStepAreaSeriesare represented withChartSeriesItemwhich belongs to theChartStepAreaSeries.Itemscollection.- The
ChartStepAreaSeries.Itemscan be added declarative without data binding. - The data binding and declarative approach can be mixed. However in order declarative items to be appended to the items created from the datasource the
ShieldChart.AppendDataBoundItemsproperty need to be set to"true".
- The
- All setting related to
ChartStepAreaSeriesare contained into theChartStepAreaSeries.Settingsobject.- The background and line color can be set via
ColorandInnerColorproperties. - If the
AddToLegendis set to false the series is not added into the legend. - The animation of the series can be controlled by
ChartStepAreaSeries.Settings.EnableAnimationandChartStepAreaSeries.Settings.AnimationDurationproperties. - If some values are missing (i.e. they are null/Nothing) from the series data you can have the chart work around this by setting the
DrawNullValuesproperty. - The series of multiline area chart can be stacked by setting the
StackModeproperty toNormalorPercent. - Each point from the series can be selected if the
EnablePointSelectionproperty is set to true. - All selected points can be customized by
Settings.PointMark.ActiveSettings.PointSelectedStateobject properties. - Each series has related tooltip which can be customized via the
Settings.Tooltipobject. - Each point from the series can have related text, which appearance is controlled by
Settings.DataPointTextproperty. You can changeBackgroundColor,BorderColor,Color,Padding, andTextAngleof the corresponding data point text.
- The background and line color can be set via
