Syntax
[C/C++:]
void ggAddBarChartValues(int nbars, GBARCHART *bars, float frac, int sfl);
[F90:]
subroutine ggAddBarChartValues(nbars, bars, frac, sfl)
type(GBARCHART), intent(in) :: bars(*)
integer, intent(in) :: nbars, sfl
real, intent(in) :: frac
Arguments
nbars
The number of bars
bars
Array of structures giving data for the Bar Chart values
frac
Value between 0.0 and 1.0 inclusive which specifies the fraction of the interval occupied by each column for compatibility with Bar Chart outline
sfl
Flag determining which value is to be output
Description
The routine ggAddBarChartValues() annotates a Bar Chart data set with start, finish or length values as defined in array of structures
bars, with respect to the current axes. The routine requires one of the axes to be defined as a discrete axis. This can be done by using ggSetAxesScaling() (with
scale=GDISCRETE) or through a previous call to ggPlotBarChart(). If no discrete axis has been defined or both axes have been defined as discrete axes, the discrete axis is assumed to be the X axis. Linear scaling is assumed as the default for the Y axis.
The most recent call to ggSetValueAttribs() determines the position of the annotation about each bar as well as the angle, justification and offset of the value string. The default is to position the required value at the centre of each bar. The format of the numerical output is determined by the settings for the current non-discrete axis annotation set by the most recent call to ggSetAxesAnnotation(). Prefix and suffix strings defined by the most recent call to ggSetValueTags() are appended to the numerical output.
If
sfl is out of range, a warning message is output and the length of the bar is displayed.
See Also
ggAddBarChartValues UsageggSetAxesAnnotationggSetAxesScalingggPlotBarChartggSetValueAttribsggSetValueTags