   footer_text = sprintf("Last Value: %0.2f%s", last_val, unit)
   footer.text(footer_text)
 
+  # draw graph
   opts = {
     labels: [ "Date/Time", "v" ]
     strokeWidth: 2

        g.updateOptions({ file: all_data })


  # draw
  g = new Dygraph(el, vals, opts)
  g._bixby_mode = "zoom"

    # set range if known
    opts.valueRange = [ 0, 100 ]

  ####
  # custom zoom/pan handling
  opts.interactionModel = _.clone(Dygraph.Interaction.defaultModel)

  # override mousedown to allow toggling pan mode
