| Contents > SharpPlot > Methods | Index |
SharpPlot.DrawXBarChart Method
Create Barchart (vertical only) with given rather than logical X-axis.
Example
sp.XAxisStyle = XAxisStyles.ForceZero; data = new int[] {18,27,31,12,19,23}; xdata = new int[] {4,7,8,13,14,17}; sp.DrawXBarChart(data,xdata);
The short tutorial shows a few of the possibilities and some sample code.
Overloads
- public void DrawXBarChart(int[] yValues,int[] xValues);
- public void DrawXBarChart(double[] yValues,int[] xValues);
- public void DrawXBarChart(int[] yValues,double[] xValues);
- public void DrawXBarChart(double[] yValues,double[] xValues);
- public void DrawXBarChart(int[][] yValues,int[] xValues);
- public void DrawXBarChart(double[][] yValues,int[] xValues);
- public void DrawXBarChart(int[][] yValues,double[] xValues);
- public void DrawXBarChart(double[][] yValues,double[] xValues);
Description
Conventional barcharts have a purely notional X-axis the bars are equally spaced and the bar widths are calculated from the required inter-bar spacing. In the XBar chart, you have full control over the placement of the bars and the widths this chart would typically be used to show time on the X-axis and occasional major events (say hurricanes or earthquakes) using the bars to indicat the severity.
The widths of the bars may also be individually controlled, so it is possible to indicate more than one feature of the event using both the height and width of the bar.
See also ...
SharpPlot Members | XBarChartStyle Property | SetBarWidths Method | Barcharts with an X-Axis

