Skip to content
This repository was archived by the owner on Oct 16, 2019. It is now read-only.

Commit 46e5f3f

Browse files
author
Fabien Basmaison
committed
fixed a bug with SVG width on recent Chrome browsers + externalized data to separate more data and logic + added alternative views of the same data + more detailed README
1 parent 5d379da commit 46e5f3f

File tree

8 files changed

+894
-53
lines changed

8 files changed

+894
-53
lines changed

README

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.textile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
This project provides a fast "database free" way to update a burndown chart
2+
3+
The PHP could of course use classes and the like, this is far from clean.
4+
Feel free to improve by forking. :)
5+
6+
7+
# Usage
8+
9+
* Every day, you can update the file data.php to reflect points burned, User Story points removed and bugs fixing time;
10+
* If you don't want to differentiate points and User Story points, you can remove things related to User Story points;
11+
* If the sprint is unusualy long, the legends might not look really good. You can add the class ".long_sprint" to the "#grid" element.
12+
* Since you might have multiple sprints, you can move "common.css" to an other folder and refer to it accordingly to keep styles consistent whatever modifications are made on the CSS.
13+
14+
15+
16+
# Variables
17+
18+
All variables are defined in the $sprint array.
19+
* number: number of the current sprint (could be called sprintID);
20+
* days: amount of days in the sprint;
21+
* points: total number of points for Tasks commited to during the sprint;
22+
* USPoints: total number of points for User Stories in the sprint;
23+
* dailyPoints: array to be updated daily, based on the number of tasks points burned in the previous day;
24+
* dailyUSPoints: array to be updated daily, based on the number of points for User Stories finished the previous day;
25+
* dailyBugs: array to be updated daily, based on the time spent on bugs during the previous day.
26+
27+
28+
29+
# Projections
30+
31+
Two projections are are available:
32+
* a global projection: sprint success estimation based on the average points burned since the start of the sprint;
33+
* a local projection: sprint success estimation based on the points burned during the last day.
34+
35+
36+
37+
# Alternate views
38+
39+
* "burndown_chart_success.php" shows the sprint as if it was successful.
40+
* "burndown_chart_added_hours.php" shows the cumulative hours spent on bug fixing and burned hours. This can explain how much work was globally done, even if the sprint is unsuccessful.
41+
* "burndown_chart_embed.php" is an work in progress to show how a table could be used by the SVG with JS. You'll need to update the header of the SVG file for this to work. (Just add "/*" where necessary)

burndown_chart.php

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?php
2-
/* The 3 following lines should be commented when the files is direclty embedded in a HTML5 document.
3-
On the contrary, the 3 following lines shouldn't be commented if this php file is used as standalone
4-
Just add [starSlash] caracters at the end of this line for standalone use. */
2+
/* You don't want that when you embed the file direclty in the HTML.
3+
The 3 following lines should be commented when the files is direclty embedded in a HTML5 document.
4+
On the contrary, the 3 following lines shouldn't be commented if this php file is used as a standalone
5+
Just add [starSlash] caracters at the end of this line. */
56
header("Content-type: image/svg+xml");
67
echo '<?xml version="1.0" encoding="utf-8"?>
78
<?xml-stylesheet href="common.css" type="text/css"?>';
@@ -12,49 +13,16 @@
1213
*/
1314
$variation = isset($_GET['var']) ? $_GET['var'] : 12;
1415

15-
/*
16-
* Some data you'd like to change and update daily (dailyPoints & dailyUSPoints)
17-
* numbers in parentheses are added hours to the sprint
18-
*
19-
*/
20-
$sprint = array(
21-
'number' => 34,
22-
'days' => 15,
23-
'points' => 10+61+22+6+77+2+6+4+20+30,
24-
'USPoints' => 8+13+3+3+20+1+3+1+13+8,
25-
26-
/*
27-
* 2012
28-
*
29-
*/
30-
'dailyPoints' => array(
31-
1+3+5+1, // day 1
32-
1+5+2, // day 2
33-
6+6+6+6 // day 3
34-
),
35-
'dailyUSPoints' => array(
36-
0, // day 1
37-
1, // day 2
38-
3+5 // day 3
39-
),
40-
/*
41-
* 2012
42-
*
43-
*/
44-
'dailyBugs' => array(
45-
1+2+3, // day 1
46-
5+5+5, // day2
47-
2 // day 3
48-
)
49-
);
16+
/* Don't embed data in this file to allow more flexibility */
17+
require('data.php');
5018

5119
$graphWidth = 2000;
5220
$graphHeight = 1000;
5321
$GraphMargin = 150;
5422
$unitPoint = $graphHeight / $sprint['points'];
5523
$unitDay = $graphWidth / $sprint['days'];
5624
$coordsModifier = $sprint['points'] - $sprint['USPoints']; /* to adapt the number of US points to the scale of tasks points */
57-
$bugsModifier = 2; /* so that the chart is not too tiny compared to the rest */
25+
$bugsModifier = 2; /* so that the bug chart is not too tiny compared to the rest */
5826

5927
$arrayTasksCoords = array();
6028
$arrayUSCoords = array();

0 commit comments

Comments
 (0)