function addReferenceValues(sel, svg, referenceValues, c, line) {

    if (line) {
      return addReferenceValuesDefault(sel, svg, referenceValues, c);
    }
    var len = 10;
    var shiftSpan = 8;
    var rectHeight = 30;
    var data = referenceValues.map(function (d) {
      return c.y(d.value) - shiftSpan;
    });
    var positions = getPositions(data, rectHeight, c.height);
    var gRef = void 0;

    referenceValues.forEach(function (ref, i) {
      gRef = svg.append("g").attr("class", "reference question-referenceValues controls");

      gRef.append("line").attr("x1", 0).attr("y1", c.y(ref.value)).attr("x2", len / 2).attr("y2", c.y(ref.value));

      gRef.append("line").attr("x1", len / 2).attr("y1", c.y(ref.value)).attr("x2", len).attr("y2", positions[i] + shiftSpan);

      sel.append("span").style("left", len + 3 + "px").style("top", positions[i] + "px").append("div").attr("class", "question-referenceValues update-font").text(ref.text);
    });
  }
/*
   * params:
   * sel: DOM selection for the text label of the reference value. A <span> is added with the text
   * svg: SVG for the lines connecting the graph with the label
   * referenceValues: question.referenceValues
   * c: object constant with graphical DOM selections as properties
   * line: true or false (= ticks)
   */
DOM selection for the text label of the reference value. A  is added with the text
svg: SVG for the lines connecting the graph with the label
referenceValues: question.referenceValues
c: object constant with graphical DOM selections as properties
line: true or false (= ticks)
DOM selection for the text label of the reference value . A is added with the text svg : SVG for the lines connecting the graph with the label referenceValues : question . referenceValues c : object constant with graphical DOM selections as properties line : true or false ( = ticks )
function addReferenceValues(sel, svg, referenceValues, c, line) {
    if (line) {
      return addReferenceValuesDefault(sel, svg, referenceValues, c);
    }
    var len = 10;
    var shiftSpan = 8;
    var rectHeight = 30;
    var data = referenceValues.map(function (d) {
      return c.y(d.value) - shiftSpan;
    });
    var positions = getPositions(data, rectHeight, c.height);
    var gRef = void 0;
    referenceValues.forEach(function (ref, i) {
      gRef = svg.append("g").attr("class", "reference question-referenceValues controls");
      gRef.append("line").attr("x1", 0).attr("y1", c.y(ref.value)).attr("x2", len / 2).attr("y2", c.y(ref.value));
      gRef.append("line").attr("x1", len / 2).attr("y1", c.y(ref.value)).attr("x2", len).attr("y2", positions[i] + shiftSpan);
      sel.append("span").style("left", len + 3 + "px").style("top", positions[i] + "px").append("div").attr("class", "question-referenceValues update-font").text(ref.text);
    });
  }
function addReferenceValues ( sel , svg , referenceValues , c , line ) { if ( line ) { return addReferenceValuesDefault ( sel , svg , referenceValues , c ) ; } var len = 10 ; var shiftSpan = 8 ; var rectHeight = 30 ; var data = referenceValues . map ( function ( d ) { return c . y ( d . value ) - shiftSpan ; } ) ; var positions = getPositions ( data , rectHeight , c . height ) ; var gRef = void 0 ; referenceValues . forEach ( function ( ref , i ) { gRef = svg . append ( "g" ) . attr ( "class" , "reference question-referenceValues controls" ) ; gRef . append ( "line" ) . attr ( "x1" , 0 ) . attr ( "y1" , c . y ( ref . value ) ) . attr ( "x2" , len / 2 ) . attr ( "y2" , c . y ( ref . value ) ) ; gRef . append ( "line" ) . attr ( "x1" , len / 2 ) . attr ( "y1" , c . y ( ref . value ) ) . attr ( "x2" , len ) . attr ( "y2" , positions [ i ] + shiftSpan ) ; sel . append ( "span" ) . style ( "left" , len + 3 + "px" ) . style ( "top" , positions [ i ] + "px" ) . append ( "div" ) . attr ( "class" , "question-referenceValues update-font" ) . text ( ref . text ) ; } ) ; }
params:
 sel: DOM selection for the text label of the reference value.
params : sel : DOM selection for the text label of the reference value .