 
 fig2 =  -> new PlotXY
     id: "fig2"
+    sheetIds: ["x1", "q"]
     data:
-        sheets: [$blab.sheet["x1"], $blab.sheet["q"]]
         x: "r0"
         types: 
             one: 'spline'

$blab.sheet['q'].colHeaders = ['i','ii','iii','iv','v','vi']


# slider

slid = (id) -> new Slider
    id:id
    width: 500
    value: 1
    min: 0
    max: 10
    step: 1
    compute: true

$blab.slider =
    z: slid "z"

# tables

tab = (id) -> new Table {id:id, compute:true}
$blab.table =
    A: tab "A"
    x: tab "x"
    b: tab "b"
    y: tab "y"

# figures

fig1 =  -> new PlotXY
    id: "fig1"
    data:
        sheets: [$blab.sheet["q"]]
        x: ""
        types: 
            one: 'area'

class Widget

    constructor: ->

    update: ->
        
    stringify: ->
        JSON.stringify(@spec)


class Sheet
    
