           at: 'top center'
 
     refresh: =>
-      @x = @x.domain([0, @max_x()])
-      @y = @y.domain([@max_y(), 0])
-      @inverted_y = @inverted_y.domain([0, @max_y()])
+      @x.domain([0, @max_x()])
+      @y.domain([@max_y(), 0])
+      @inverted_y.domain([0, @max_y()])
 
       # animate the y-axis
       @svg.selectAll(".y_axis").transition().call(@y_axis.scale(@inverted_y))
       @svg.selectAll(".x_axis").transition().call(@x_axis.scale(@x))
-
 
       @svg.selectAll('circle.serie')
         .data(@series, (d) -> d.get 'gquery_key')

      legend_margin = 30

      @series_height = @height - legend_height - legend_margin

      @svg = @create_svg_container @width, @height, @margins


        .orient("bottom")
      @svg.append("svg:g")
        .attr("class", "x_axis inner_grid")
        .attr("transform", "translate(0, #{@series_height})")
        .call(@x_axis)

      # rotated labels
      @svg.append('svg:g')
        .attr('transform', "translate(#{(@series_width) / 2}, #{@series_height + 25})")
        .append('text')
        .attr('class', 'label')
        .attr("text-anchor", "middle")
        .text(@x_axis_unit())
      @svg.append('svg:g')
        .attr('transform', "rotate(270) translate(#{-@series_height / 2}, -30)")
        .append('text')
        .attr('class', 'label')
        .attr("text-anchor", "middle")
