private String getChart(String request) {
		int index = request.indexOf("#");
		String user;
		String project;
		user = request.substring(0, index);
		project = request.substring(index + 1);

		System.out.println("Requested user= " + user + ", project= " + project);

		int userId = 0, projectId = 0, hoursPerWeek = 0;
		boolean activeWeekend = false;
		String answer = "[";

		Date date;
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM/dd/yyyy");
		Calendar cal = Calendar.getInstance();

		userId = databaseDG.getUserIdByName(connection, user);
		ProjectInfoWithNameAndHPW projectInfo = databaseDG
				.getProjectInfoWithNameAndHPW(connection, project);

		projectId = projectInfo.projectId;
		hoursPerWeek = projectInfo.HPW;
		activeWeekend = projectInfo.activeWeekend;

		List<ProjectDataWithDateAndAmount> projectData = databaseDG
				.getProjectDataWithDateAndAmount(connection, userId, projectId);

		Date prevDate = null;
		int diffInDays;
		float amount = 0;
		String dateAsString;
		float currSum = 0;

		for (int p = 0; p < projectData.size(); p++) {
			if (!answer.equals("["))
				answer += ",";

			date = projectData.get(p).date;
			if (prevDate != null) {
				diffInDays = (int) ((date.getTime() - prevDate.getTime()) / (1000 * 60 * 60 * 24));
				for (int i = 0; i < diffInDays; i++) {
					
					System.out.println("DEBUG - counting, diff=" + diffInDays
							+ " curr i=" + i);
					// TODO add date step
					cal.setTime(prevDate);
					cal.add(Calendar.DATE, 1 * (i + 1));
					 	

					// add amount step
					int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
					
					/**
					 * (jesli aktywny weekend) lub ()
					 */
					if (activeWeekend || (dayOfWeek != Calendar.SATURDAY	&& dayOfWeek != Calendar.SUNDAY))
						currSum -= ((float) hoursPerWeek) / (activeWeekend == true ? 7: 5);
					
				}
			}

			System.out.println("DEBUG - normal");
			// date section
			dateAsString = simpleDateFormat.format(date);
			answer += "[";
			answer += "'";
			answer += dateAsString;
			answer += "',";

			// amount section
			amount = projectData.get(p).amount;
			currSum += amount;
			answer += currSum;
			answer += "]";

			prevDate = date;
		}
		answer = putToday(answer, prevDate, currSum, hoursPerWeek, simpleDateFormat);
		answer += "]";

		System.out.println("For project [" + project + "] answer is ["+answer + "]");
		if (answer.equals("[]"))// empty project
			answer = "[['" + simpleDateFormat.format(new Date()) + "',0]]";

		return answer;
	}