   initialize : (options) ->
     if not _.has(options, 'id')
       this.id = _.uniqueId('BokehView')
-  tag_id : (tag) ->
-    tag + "-" + this.id
-  tag_el : (tag) ->
-    @$el.find("#" + this.tag_id(tag))
-  tag_d3 : (tag) ->
-    val = d3.select(this.el).select("#" + this.tag_id(tag))
+  tag_id : (tag, id) ->
+    if not id
+      id = this.id
+    tag + "-" + id
+  tag_el : (tag, id) ->
+    @$el.find("#" + this.tag_id(tag, id))
+  tag_d3 : (tag, id) ->
+    val = d3.select(this.el).select("#" + this.tag_id(tag, id))
     if val[0][0] == null
       return null
     else

      options = _.extend({},
        spec.options,
        {'el' : @el,
        'model' : model}
      )
      view = new model.default_view(options)
      @renderers[view.id] = view;

    if  node == null
      node = d3.select(@el).append('svg')
        .attr('id', @tag_id('mainsvg'))
      node.append('g')
          .attr('id', @tag_id('flipY'))
          .append('g')
          .attr('id', @tag_id('plotcontent'))

    node.attr('width', @mget('outerwidth')).attr("height", @mget('outerheight'))
    #svg puts origin in the top left, we want it on the bottom left
    @tag_d3('flipY')
      .attr('transform',
        _.template('translate(0, {{h}} scale(1, -1)',
          {'h' : @mget('outerheight')}))
    @tag_d3('plotcontent').attr('transform',
      _.template('translate({{s}}, {{s}})', {'s' : @mget('border_space')}))

  render_frames : ->
    innernode = @tag_d3('innerbox')
    outernode = @tag_d3('outerbox')
    if innernode == null
      innernode = @tag_d3('plotcontent')
        .append('rect').attr('id', @tag_id('innerbox'))
      outernode = @tag_d3('flipY')
        .append('rect').attr('id', @tag_id('outerbox'))

    outernode.attr('fill', 'none')
  		.attr('stroke', @model.get('foreground-color'))
      .attr('width', @mget('outerwidth')).attr("height", @mget('outerheight'))

    innernode.attr('fill', 'none')
  		.attr('stroke', @model.get('foreground-color'))
      .attr('width', @mget('width')).attr("height", @mget('height'))

  render : ->
    @render_mainsvg();
    @render_frames();
    for own key, view of @renderers
      view.render()
    if not @model.get_ref('parent')
