 
     item.append("label")
       .attr("class", "title")
-      .text((d) -> d.key)
+      .text((d) -> d[labelAttr])
       # .on "click", ->  d3.select(this.parentElement).select("input")[0][0].click()
 
 

  chart.useLog10BandSplitting = (_) -> if (!arguments.length) then useLog10Bands else useLog10Bands = _; chart
  chart.showLegend = (_) -> if (!arguments.length) then showLegend else showLegend = _; chart
  chart.valueFormat = (_) -> if (!arguments.length) then valueFormat else valueFormat = _; chart

  # Supported events: "applyFilter", "ruleMoved"
  chart.on = (eventName, listener) -> 



        for d in data
          t = Math.round(tscale(d.date))
          v = d.value
          
          [band, limits] = valueToBand(v)
