           'position': 'absolute'
           'top': "#{@sy[i] + @mget('y_offset') + @y_shift[i]}px"
           'left': "#{@sx[i] + @mget('x_offset') + @x_shift[i]}px"
-          # 'background-color': 'rgba(255, 255, 255, 0)'
+          # 'background-color': 'rgba(0, 255, 0, 0.2)'
           'font-size': "#{@text_font_size[i]}"
           'font-family': "#{@mget('text_font')}"
           })

      ctx.beginPath()
      ctx.rect(@x_shift[i], @y_shift[i], @width[i], @height[i])

      @visuals.fill.set_vectorize(ctx, i)
      ctx.fill()

      @visuals.line.set_vectorize(ctx, i)
      ctx.stroke()

      @visuals.text.set_vectorize(ctx, i)
      ctx.fillText(@text[i], 0, 0)
      ctx.restore()

  _css_text: () ->
    ctx = @plot_view.canvas_view.ctx

    for i in [0...@text.length]

      if @label_div[i].html() == ""
        @label_div[i].appendTo(@plot_view.$el.find('div.bk-canvas-events'))

      @label_div[i]
        .html(@text[i])

      x_shift = -width

    if ctx.textBaseline == 'top'
      y_shift = 0.0
    if ctx.textBaseline == 'middle'
      y_shift = -0.5 * height
    if ctx.textBaseline == 'bottom'
      y_shift = -1.0 * height
    if ctx.textBaseline == 'alphabetic'
      y_shift = -0.8 * height
    if ctx.textBaseline == 'hanging'
      y_shift = -0.17 * height

    return [x_shift, y_shift]

  render: () ->
    @map_data()
    if @mget('render_mode') == 'canvas'
      @_canvas_text()
    else
