No matter how wide you make a vertical bar chart, for some data sets there will be segments that are too short to fit a segment label. An always dependable alternative, or a complement if you willing to use both segment labels and the alternative, is an X axis table. If you color code the axis table as done here, the labels of its rows can serve as substitute for a legend. The axis table sits at the bottom of bars, making the eye travel from segment to identification shorter than looking for a legend. The axis table can support any number of segments in the stack.
Of course the advantage for segment labels is sitting right inside the segments, WHEN the segment is tall enough.
The example above shows both alternatives. Either alternative can be omitted, but the axis table is dependable for ANY data set. The example uses fake data, but for the same date range.
To turn off the segment labels, omit the SEGLABEL and SEGLABELFORMAT options.
To turn off the X axis table, omit the XAXISTABLE statement, omit the NOAUTOLEGEND option, and include a KEYLEGEND statement, for which I recommend:
keylegend / title='' /* Suppress the title.
Your graph recipient will be able to guess what it is. */
noborder /* a border on a legend has no value */
location=outside position=bottom
autooutline /* Prevent outlines on color swatches,
to match the VBAR NOOUTLINE option.
When this option is omitted,
the color swatches are always outlined.*/
fillheight=6pt /* I adjusted this
to approximately match the legend value height.
I usually use one point less than the value height. */
fillaspect=golden;
See the attached full code for the example. Its use of an custom ODS style to control the graph's text attributes is optional. If omitted, the results are unpredictable. Look elsewhere for my other work on visual data insights, communication-effective data visualization, and other charts, plots, and graphs used for visual communication of data.
... View more