| |||||
Introducing SharpPlot Your First Chart Recent Updates Tutorials General Tutorials Chart Tutorials Reference SharpPlot Class Properties Methods Structures Enumerations Style examples Glossaries Active Charts VectorMath Class DBUtil Class Get SharpPlot Download SharpPlot Buying SharpPlot SharpPlot Support Upgrading from GraPL Release notes |
Home > Sample Charts > StepChart > A Simple Stepchart A Simple StepchartStepcharts 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. 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); Worked Examples |