protovis part 2: lines and labels

Creating Months

Now lets add labels beneath the bars. Scroll down to below the baseline rule and type example.add(pv.Label). Add a data array for the labels with initials for months. The initials have to be in quotes because they are text and the array must be inside square brackets.

Set the bottom to 0 and the letters show up in the bottom left corner of the graphic.

We want the months to be positioned directly under the bars so copy the left property from the bar and paste after bottom. Change the font by copying the font property from the bars and pasting it after the labels' left property. Change the point size to 7.