SharpPlot Reference > SharpPlot Methods > DrawXBarChart Method SharpPlot.DrawXBarChart Method
Create Barchart (vertical only) with given rather than logical X-axis.
Example
sp = new SharpPlot(180,120);
sp.SetMargins(12,12,18,4);
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
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 ...X Bar charts for positioned bars | SharpPlot Members | SharpPlot.XBarChartStyle Property | SharpPlot.SetBarWidths Method
Send comments on this topic © Dyalog Ltd 2021
|