         if _elementSelection.empty()
           $log.error "Error: Element #{_element} does not exist"
         else
-          _genChart()
+          _genChartFrame()
         return me
 
     me.height = () ->

    me.id = () ->
      return _containerId

    _genChart = ()->
      _svg = _elementSelection.append('div').attr('class', 'd3-chart')
        .append('svg')
      _svg.append('defs').append('clipPath').attr('id', "clip-#{_containerId}").append('rect')
      _container= _svg.append('g').attr('class','d3-chart-container')
      _container.append('g').attr('class', 'x axis top')
      _container.append('g').attr('class', 'x axis bottom')
      _container.append('g').attr('class', 'y axis left')
      _container.append('g').attr('class', 'y axis right')
      _container.append('g').attr('class', 'x label top')
      _container.append('g').attr('class', 'x label bottom')
      _container.append('g').attr('class', 'y label left')
      _container.append('g').attr('class', 'y label right')
      _chartArea = _container.append('g').attr('class', 'chartArea')
      _overlay= _chartArea.append('rect').attr('class', 'overlay').style({opacity: 0, 'pointer-events': 'none'})
      _container.append('g').attr('class', 'brushArea')
      #_tooltip.behavior(_overlay)

    me.addLayout = (layout) ->
      _layouts.push(layout)

              a.transition().duration(d3Animation.duration).call(s.axis())
              if s.axisLabel()
                offs = axisConfig[s.kind()].labelOffset[s.axisOrient()]
                lbl = _getLabel(s.axisOrient())
                txt = lbl.selectAll('.label-text')
                if txt.empty()
                  txt = lbl.append('text').attr('class','label-text').attr('dy', (d) -> offs)
                txt.text(s.axisLabel()).attr('text-anchor','middle').style('font-size', axisConfig.labelFontSize)
              _removeAxis(s.axisOrientOld())
              _removeLabel(s.axisOrientOld())
              s.axisOrientOld(s.axisOrient())
          else
            if s.axisOrient()
              _removeAxis(s.axisOrient())
              _removeLabel(s.axisOrient())
              s.axisOrientOld(undefined)


