A Simple Stepchart

Stepcharts are used for two main purposes – timeseries where the values change discontinuously (interest rates are typical) and summary data where the groups are of variable width (monthly totals). SharpPlot can draw the steps with risers from the X-axis (which has the effect of abutted bars) and with shading down to either the axis or a given reference line.

This chart-type is unusual in that the x-data typically has one more value than the y-data, giving the endpoint of the final plateau in the data.

StepChart1
SharpPlot sp = new SharpPlot();
ydata = new int[] {4,8,12,6};
steps = new int[] {1,5,7,9,14};

sp.YAxisStyle = YAxisStyles.ForceZero;
sp.Heading = "Simple Stepchart";

sp.DrawStepChart(ydata,steps);

See also

StepChart1 StepChart2 StepChart3 StepChart4