I was unable to get #key#, #x_label# or anything else to work, so I overrode the populateData method in BarDataProvider so that it did something like this:
Number n = getValue(m);
String s =...