     ylab = value
     chart
 
+  chart.lodvarname = (value) ->
+    if !argments.length
+      return lodvarname
+    lodvarname = value
+    chart
+
   chart.yscale = () ->
     return yscale
 

  d3.format(".#{ndig}f")

# reorganize lod/pos in data by chromosome
reorgData = (data) ->
  data.posByChr = {}
  data.lodByChr = {}
  for chr,i in data.chrnames

    data.lodByChr[chr] = []
    for pos,j in data.pos
      data.posByChr[chr].push(pos) if data.chr[j] == chr
      data.lodByChr[chr].push(data[lodvarname][j]) if data.chr[j] == chr
  data.markers = []
  for marker,i in data.markernames
    if marker != ""
      data.markers.push({name:marker, chr:data.chr[i], pos:data.pos[i], lod:data[lodvarname][i]}) 
  data

# calculate chromosome start/end + scales
