Skip to content
This repository
Browse code

added a readme and fixed the fucked up gitignore

  • Loading branch information...
commit f1a2aab2a70d9d6795ac0f941a6b872bb69a70dc 1 parent 9196f81
Bastian Allgeier authored July 24, 2012
2  .gitignore.php
... ...
@@ -1,2 +0,0 @@
1  
-.sass-cache
2  
-sass.sh
108  readme.mdown
Source Rendered
... ...
@@ -0,0 +1,108 @@
  1
+# Gantti 
  2
+
  3
+A simple PHP Gantt Class
  4
+
  5
+## Features
  6
+
  7
+- Generates valid HTML5
  8
+- Very easy to customize with SASS stylesheet
  9
+- Works in all major browsers including IE7, IE8 and IE9
  10
+- No javascript required
  11
+
  12
+## Demo
  13
+
  14
+<http://bastianallgeier.com/gantti>
  15
+
  16
+## Usage
  17
+
  18
+```php
  19
+
  20
+<?php
  21
+
  22
+require('lib/gantti.php'); 
  23
+
  24
+date_default_timezone_set('UTC');
  25
+setlocale(LC_ALL, 'en_US');
  26
+
  27
+$data = array();
  28
+
  29
+$data[] = array(
  30
+  'label' => 'Project 1',
  31
+  'start' => '2012-04-20', 
  32
+  'end'   => '2012-05-12'
  33
+);
  34
+
  35
+$data[] = array(
  36
+  'label' => 'Project 2',
  37
+  'start' => '2012-04-22', 
  38
+  'end'   => '2012-05-22', 
  39
+  'class' => 'important',
  40
+);
  41
+
  42
+$data[] = array(
  43
+  'label' => 'Project 3',
  44
+  'start' => '2012-05-25', 
  45
+  'end'   => '2012-06-20'
  46
+  'class' => 'urgent',
  47
+);
  48
+
  49
+$gantti = new Gantti($data, array(
  50
+  'title'      => 'Demo',
  51
+  'cellwidth'  => 25,
  52
+  'cellheight' => 35
  53
+));
  54
+
  55
+echo $gantti;
  56
+
  57
+?>
  58
+
  59
+```
  60
+
  61
+## Data
  62
+
  63
+Data is defined as an associative array (see the example above).
  64
+
  65
+For each project you get the following options:
  66
+
  67
+- label: The label will be displayed in the sidebar
  68
+- start: The start date. Must be in the following format: YYYY-MM-DD
  69
+- end: The end date. Must be in the following format: YYYY-MM-DD
  70
+- class: An optional class name. (available by default: important, urgent)
  71
+
  72
+
  73
+## Options
  74
+
  75
+### title (optional, default: false)
  76
+
  77
+Set an optional title for your gantt diagram here. 
  78
+It will be displayed in the upper left corner.
  79
+
  80
+### cellwidth (optional, default: 40)
  81
+
  82
+Set the width of all cells.
  83
+
  84
+### cellheight (optional, default: 40)
  85
+
  86
+Set the height of all cells.
  87
+
  88
+### today (optional, default: true)
  89
+
  90
+Show or hide the today marker. It will be displayed by default.
  91
+
  92
+## Styles
  93
+
  94
+The default stylesheet is available as .scss ([SASS](http://sass-lang.com/)) It includes a set of predefined variables, which you can use to adjust the styles very easily.
  95
+
  96
+## Colors
  97
+The default color theme is an adaption of the wonderful 
  98
+[Solarized color theme by Ethan Schoonover](http://ethanschoonover.com/solarized)
  99
+
  100
+## Author
  101
+
  102
+Bastian Allgeier   
  103
+<http://bastianallgeier.com>   
  104
+<http://twitter.com/bastianallgeier>
  105
+
  106
+## License: 
  107
+
  108
+MIT License - <http://www.opensource.org/licenses/mit-license.php>

0 notes on commit f1a2aab

Please sign in to comment.
Something went wrong with that request. Please try again.