app/controllers/your_data_controller.rb
def graph_xml
    prepare_graph_xml(:user_id => @current_user.id, :is_invoiced => nil)

    @t = []
    for week in @weeks
      @t << [0] * (week.maxweek.to_i - week.minweek.to_i + 1)
    end

    @skip_level = @t.flatten.length / 10 - 3
    @skip_level = [0, @skip_level].max

    start_year = @years[0].minyear.to_i
    for act in @activities
      min_year = act.year.to_i - start_year
      @t[min_year][act.week.to_i - @weeks[min_year].minweek.to_i] = act.minutes.to_i
    end
  end
#
# Generates XML data to for a flash graph
#

Generates XML data to for a flash graph
Generates XML data to for a flash graph
def graph_xml
    prepare_graph_xml(:user_id => @current_user.id, :is_invoiced => nil)
    @t = []
    for week in @weeks
      @t << [0] * (week.maxweek.to_i - week.minweek.to_i + 1)
    end
    @skip_level = @t.flatten.length / 10 - 3
    @skip_level = [0, @skip_level].max
    start_year = @years[0].minyear.to_i
    for act in @activities
      min_year = act.year.to_i - start_year
      @t[min_year][act.week.to_i - @weeks[min_year].minweek.to_i] = act.minutes.to_i
    end
  end
def graph_xml prepare_graph_xml ( :user_id => @current_user . id , :is_invoiced => nil ) @t = [ ] for week in @weeks @t << [ 0 ] * ( week . maxweek . to_i - week . minweek . to_i + 1 ) end @skip_level = @t . flatten . length / 10 - 3 @skip_level = [ 0 , @skip_level ] . max start_year = @years [ 0 ] . minyear . to_i for act in @activities min_year = act . year . to_i - start_year @t [ min_year ] [ act . week . to_i - @weeks [ min_year ] . minweek . to_i ] = act . minutes . to_i end end
Generates XML data to for a flash graph
Generates XML data to for a flash graph