     ar2.push ',' if i && !( i % 3 )
     ar2.push v
   ar2.reverse().join ''
-create = (tag, cz) ->
+create = (tag, cz, id) ->
   e = document.createElement(tag)
-  e.setAttribute( 'class', cz ) if cz
+  e.setAttribute( 'class', cz ) if cz?
+  e.id = id if id?
   e
 chartType = 'options'
 [ u, makeCharts, loaded ] = [ null, false, false ]

    sp.innerHTML = s.value
    values[0] = Number.parseInt s.value
madeGeneCharts = false
makeUniverse = ->
  p = convertParams()
  p.callback = collectData

  unless madeGeneCharts
    for type in [ 'plant', 'herbivore', 'carnivore' ]
      tab = byId "#{type}-chart"
      charts = evoData.charts[type] = {}
      id = chartDiv tab, "#{type}-babies"
      charts.babies =
        id:        id
        type:      'interval'
        htitle:    'Time (ticks)'
        vtitle:    'Offspring per individual'
        collector: statCollector titleize(type), (d) -> d.babies
        rows:      []
      id = chartDiv tab, "#{type}-age"
      charts.age =
        id:        id
        type:      'interval'
        htitle:    'Time (ticks)'
        vtitle:    'Age (ticks)'
        collector: statCollector titleize(type), (d) -> u.tick - d.tick
        rows:      []
      for gene, v of u.urThing(type).genes
        id = chartDiv tab, "#{type}-#{gene}"
        charts[gene] = geneChartSpec type, gene, id
evoData =
  generation: 0
