legendText (legendText) {
        if (!arguments.length) {
            return this._legendText;
        }
        this._legendText = legendText;
        return this;
    }
Set or get the legend text function. The legend widget uses this function to render the legend
text for each item. If no function is specified the legend widget will display the names
associated with each group.
@param  {Function} [legendText]
@returns {Function|HtmlLegend}
@example
// default legendText
legend.legendText(pluck('name'))

// create numbered legend items
chart.legend(new HtmlLegend().legendText(function(d, i) { return i + '. ' + d.name; }))

// create legend displaying group counts
chart.legend(new HtmlLegend().legendText(function(d) { return d.name + ': ' d.data; }))