       }]
   }
 
+clickCamera = (chart) ->
+  document.getElementById('cameraChart').onclick = (evt) ->
+    points = chart.getElementsAtEvent(evt)
+    camera = cameraIds[points[0]._index]
+    addParams({camera: camera})
+
+lensIds = []
 renderLensGraph = (elems) ->
   ctx = getCtx('lensChart')
   values = elems.map (elem) -> elem['count']
   labels = elems.map (elem) -> elem['lens']
+  lensIds = elems.map (elem) -> elem['id']
   new Chart ctx, {
     type: 'pie'
     data:

      }]
    options: barOptions('F-Number count')
  }

exposureGroup = [-30, -15, -8, -4, -2, 1, 2, 4, 8, 15, 30, 60, 125, 250, 500, 1000, 2000, 4000, 8000, 16000].reverse()
renderExposureGraph = (elems) ->

    .dropWhile (x) -> x['count'] == 0
    .dropRightWhile (x) -> x['count'] == 0
    .value()
  labels = _elems.map (elem) -> elem['fNumber']
  values = _elems.map (elem) -> elem['count']
  color = labels.map (fNumber) ->
