title: I have this d3 code but Iwould like to insert lable number on the top of the yAixes here is my code
body: <p>Generate an array of data with random values bounded between 0 and 100.<br>
  I need to Add text objects to place labels above each rect svg object which shows the "Y" value of the entry   </p>
  
  <pre><code>function generate_random_ints( opts) {
  var num_possible_ints =  opts.max_value
              - opts.min_value
              +1;
  
  var data = [];
  for ( var i = 0; i &lt; opts.num_values; i++ ) {
      var value = Math.random()
      * num_possible_ints
      + opts.min_value;
      data.push( Math.floor( value) );
  }
  return data;
  }
  
  var data_option = {
  min_value: 0,
  max_value:50,
  num_values: 30
  };
  // we generate rect objects within an svg object for each entry in the array of data which are sized and positioned to create a simple bar graph.   
  
  var svg = d3.select("body")
      .append("svg")
      .attr("width", "700px")
      .attr("height", "700px") ;
      //set width and height of div 
  var svg_width = 700;
  var svg_height = 700;
  var yTextPadding = 20;
  
  var dataset = generate_random_ints(data_option);
  //console.log(dataset);
  var x_scale = 3;// Our x scale
  
  var y_scale = svg_height / data_option.max_value; // Our y scale
  
  
  var rects = svg.selectAll("rect")
                      .data( dataset )
      .enter()
      .append("rect")
      .attr("x", 5)
      .attr("y", 6)
      .attr({
  "x": function(d, i) {
      return ( svg_width / dataset. length)
          * i + x_scale / 4;// Our X scale
      },
  
  "y":  function(d, i) {
      return svg_height - ( d * y_scale )
      },
  "width":  function(d, i) {
      return ( svg_width / dataset.length )
          - x_scale / 2;
      },
  
  
  "height":  function(d, i) {
      return d * y_scale;
      },
      "fill": "red"
      })  // Our color bands
      ;
  </code></pre>