def generate_coordinates(options = {})
        @bar_width = (width / points.size) * 0.9
        options[:point_distance] = (width - (width / points.size)) / (points.size - 1).to_f

        #TODO more array work with index, try to rework to be accepting of hashes
        coords = (0...points.size).map do |idx| 
          x_coord = (options[:point_distance] * idx) + (width / points.size * 0.5) - (@bar_width * 0.5)
          y_coords = []
          points[idx].each do |point| 
            relative_percent = ((point == min_value) ? 0 : ((point - min_value) / (max_value - min_value).to_f))
            y_coord = (height - (height * relative_percent))
            y_coords << y_coord
          end
          [x_coord, y_coords]
        end
        coords
      end
def generate_coordinates(options = {})
        @bar_width = (width / points.size) * 0.9
        options[:point_distance] = (width - (width / points.size)) / (points.size - 1).to_f

        #TODO more array work with index, try to rework to be accepting of hashes
        coords = (0...points.size).map do |idx| 
          x_coord = (options[:point_distance] * idx) + (width / points.size * 0.5) - (@bar_width * 0.5)
          y_coords = []
          points[idx].each do |point| 
            relative_percent = ((point == min_value) ? 0 : ((point - min_value) / (max_value - min_value).to_f))
            y_coord = (height - (height * relative_percent))
            y_coords << y_coord
          end
          [x_coord, y_coords]
        end
        coords
      end
Due to the size of the bar graph, X-axis coords must
 be squeezed so that the bars do not hang off the ends
 of the graph.

 Unfortunately this just mean that bar-graphs and most other graphs
 end up on different points.  Maybe adding a padding to the coordinates
 should be a graph-wide thing?

 Update : x-axis coords for lines and area charts should now line
 up with the center of bar charts.