| ||
Introducing SharpPlot Your First Chart Recent Updates Sample Charts Tutorials General Tutorials Chart Tutorials SharpPlot Class Properties Structures Enumerations Style examples Glossaries Active Charts VectorMath Class DBUtil Class Get SharpPlot Download SharpPlot Buying SharpPlot SharpPlot Support Upgrading from GraPL Release notes |
Reference > Methods > DrawStepChart Method SharpPlot.DrawStepChart MethodConstruct step chart from data and step start-points. Examplesp.SetMargins(12,12,18,4); sp.SetPenWidths(3); sp.SetColors(Color.OrangeRed); ydata = new int[] {190,270,310,120,190,230}; xdata = new int[] {17,31,49,54,66,84,100}; sp.DrawStepChart(ydata,xdata); The short tutorial shows a few of the possibilities and some sample code. Overloads
DescriptionStepcharts 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. Note that you often give on more X-value that Y-value here as the X-values give the start-point for each step and there is usually an extra point at the right-hand end to determine how far to draw the final horizontal segment. See also ...Stepcharts for Discontinuous Data | SharpPlot Members | StepChartStyle Property |