151 lines
27 KiB
HTML
151 lines
27 KiB
HTML
<div style="font-weight: bold;margin-left:15px;">gantticonex1.php</div><link rel="stylesheet" href="../phphl.css" type="text/css"><div class="hl-main"><table class="hl-table" width="100%"><tr><td class="hl-gutter" align="right" valign="top"><pre>1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
16
|
|
17
|
|
18
|
|
19
|
|
20
|
|
21
|
|
22
|
|
23
|
|
24
|
|
25
|
|
26
|
|
27
|
|
28
|
|
29
|
|
30
|
|
31
|
|
32
|
|
33
|
|
34
|
|
35
|
|
36
|
|
37
|
|
38
|
|
39
|
|
40
|
|
41
|
|
42
|
|
43
|
|
44
|
|
45
|
|
46
|
|
47
|
|
48
|
|
49
|
|
50
|
|
51
|
|
52
|
|
53
|
|
54
|
|
55
|
|
56
|
|
57
|
|
58
|
|
59
|
|
60
|
|
61
|
|
62
|
|
63
|
|
64
|
|
65
|
|
66
|
|
67
|
|
68
|
|
69
|
|
70
|
|
71
|
|
72
|
|
73
|
|
74
|
|
75
|
|
</pre></td><td class="hl-main" valign="top"><pre><span class="hl-inlinetags"><?php</span><span class="hl-code"> </span><span class="hl-comment">//</span><span class="hl-comment"> content="text/plain; charset=utf-8"</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> Gantt example</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-reserved">require_once</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">jpgraph/jpgraph.php</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-reserved">require_once</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">jpgraph/jpgraph_gantt.php</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> Basic Gantt graph</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-var">$graph</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttGraph</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">title</span><span class="hl-code">-></span><span class="hl-identifier">Set</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">Gantt chart with title columns and icons</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">title</span><span class="hl-code">-></span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-identifier">FF_ARIAL</span><span class="hl-code">, </span><span class="hl-identifier">FS_BOLD</span><span class="hl-code">,</span><span class="hl-number">12</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">title</span><span class="hl-code">-></span><span class="hl-identifier">SetMargin</span><span class="hl-brackets">(</span><span class="hl-number">10</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> Explicitely set the date range</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> (Autoscaling will of course also work)</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">SetDateRange</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">2001-10-06</span><span class="hl-quotes">'</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">2002-4-10</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> 1.5 line spacing to make more room</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">SetVMarginFactor</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-number">.5</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> Setup some nonstandard colors</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">SetMarginColor</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">darkgreen@0.95</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">SetBox</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">yellow:0.6</span><span class="hl-quotes">'</span><span class="hl-code">,</span><span class="hl-number">2</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">SetFrame</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">darkgreen</span><span class="hl-quotes">'</span><span class="hl-code">,</span><span class="hl-number">4</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">scale</span><span class="hl-code">-></span><span class="hl-identifier">divider</span><span class="hl-code">-></span><span class="hl-identifier">SetColor</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">yellow:0.6</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">scale</span><span class="hl-code">-></span><span class="hl-identifier">dividerh</span><span class="hl-code">-></span><span class="hl-identifier">SetColor</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">yellow:0.6</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> Display month and year scale with the gridlines</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">ShowHeaders</span><span class="hl-brackets">(</span><span class="hl-identifier">GANTT_HMONTH</span><span class="hl-code"> | </span><span class="hl-identifier">GANTT_HYEAR</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">scale</span><span class="hl-code">-></span><span class="hl-identifier">month</span><span class="hl-code">-></span><span class="hl-identifier">grid</span><span class="hl-code">-></span><span class="hl-identifier">SetColor</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">gray</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">scale</span><span class="hl-code">-></span><span class="hl-identifier">month</span><span class="hl-code">-></span><span class="hl-identifier">grid</span><span class="hl-code">-></span><span class="hl-identifier">Show</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">scale</span><span class="hl-code">-></span><span class="hl-identifier">year</span><span class="hl-code">-></span><span class="hl-identifier">grid</span><span class="hl-code">-></span><span class="hl-identifier">SetColor</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">gray</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">scale</span><span class="hl-code">-></span><span class="hl-identifier">year</span><span class="hl-code">-></span><span class="hl-identifier">grid</span><span class="hl-code">-></span><span class="hl-identifier">Show</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> For the titles we also add a minimum width of 100 pixels for the Task name column</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">scale</span><span class="hl-code">-></span><span class="hl-identifier">actinfo</span><span class="hl-code">-></span><span class="hl-identifier">SetColTitles</span><span class="hl-brackets">(</span><span class="hl-code">
|
|
</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">Note</span><span class="hl-quotes">'</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">Task</span><span class="hl-quotes">'</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">Duration</span><span class="hl-quotes">'</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">Start</span><span class="hl-quotes">'</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">Finish</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">,</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-number">30</span><span class="hl-code">,</span><span class="hl-number">100</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">scale</span><span class="hl-code">-></span><span class="hl-identifier">actinfo</span><span class="hl-code">-></span><span class="hl-identifier">SetBackgroundColor</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">green:0.5@0.5</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">scale</span><span class="hl-code">-></span><span class="hl-identifier">actinfo</span><span class="hl-code">-></span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-identifier">FF_ARIAL</span><span class="hl-code">,</span><span class="hl-identifier">FS_NORMAL</span><span class="hl-code">,</span><span class="hl-number">10</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">scale</span><span class="hl-code">-></span><span class="hl-identifier">actinfo</span><span class="hl-code">-></span><span class="hl-identifier">vgrid</span><span class="hl-code">-></span><span class="hl-identifier">SetStyle</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">solid</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">scale</span><span class="hl-code">-></span><span class="hl-identifier">actinfo</span><span class="hl-code">-></span><span class="hl-identifier">vgrid</span><span class="hl-code">-></span><span class="hl-identifier">SetColor</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">gray</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> Uncomment this to keep the columns but show no headers</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-comment">//</span><span class="hl-comment">$graph->scale->actinfo->Show(false);</span><span class="hl-comment"></span><span class="hl-code">
|
|
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> Setup the icons we want to use</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-var">$erricon</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">IconImage</span><span class="hl-brackets">(</span><span class="hl-identifier">GICON_FOLDER</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-number">.6</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$startconicon</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">IconImage</span><span class="hl-brackets">(</span><span class="hl-identifier">GICON_FOLDEROPEN</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-number">.6</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$endconicon</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">IconImage</span><span class="hl-brackets">(</span><span class="hl-identifier">GICON_TEXTIMPORTANT</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-number">.5</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> Store the icons in the first column and use plain text in the others</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-var">$data</span><span class="hl-code"> = </span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-code">
|
|
</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-number">0</span><span class="hl-code">,</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-var">$erricon</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">Pre-study</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">102 days</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">23 Nov '01</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">1 Mar '02</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">
|
|
, </span><span class="hl-quotes">"</span><span class="hl-string">2001-11-23</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">2002-03-1</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-identifier">FF_ARIAL</span><span class="hl-code">,</span><span class="hl-identifier">FS_NORMAL</span><span class="hl-code">,</span><span class="hl-number">8</span><span class="hl-brackets">)</span><span class="hl-code">,
|
|
</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">,</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-var">$startconicon</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">Prototype</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">21 days</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">26 Oct '01</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">16 Nov '01</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">,
|
|
</span><span class="hl-quotes">"</span><span class="hl-string">2001-10-26</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">2001-11-16</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-identifier">FF_ARIAL</span><span class="hl-code">,</span><span class="hl-identifier">FS_NORMAL</span><span class="hl-code">,</span><span class="hl-number">8</span><span class="hl-brackets">)</span><span class="hl-code">,
|
|
</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">,</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-var">$endconicon</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">Report</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">12 days</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">1 Mar '02</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">13 Mar '02</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">,
|
|
</span><span class="hl-quotes">"</span><span class="hl-string">2002-03-01</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">2002-03-13</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-identifier">FF_ARIAL</span><span class="hl-code">,</span><span class="hl-identifier">FS_NORMAL</span><span class="hl-code">,</span><span class="hl-number">8</span><span class="hl-brackets">)</span><span class="hl-code">
|
|
</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> Create the bars and add them to the gantt chart</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-reserved">for</span><span class="hl-brackets">(</span><span class="hl-var">$i</span><span class="hl-code">=</span><span class="hl-number">0</span><span class="hl-code">; </span><span class="hl-var">$i</span><span class="hl-code"><</span><span class="hl-identifier">count</span><span class="hl-brackets">(</span><span class="hl-var">$data</span><span class="hl-brackets">)</span><span class="hl-code">; ++</span><span class="hl-var">$i</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
|
|
</span><span class="hl-var">$bar</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttBar</span><span class="hl-brackets">(</span><span class="hl-var">$data</span><span class="hl-brackets">[</span><span class="hl-var">$i</span><span class="hl-brackets">]</span><span class="hl-brackets">[</span><span class="hl-number">0</span><span class="hl-brackets">]</span><span class="hl-code">,</span><span class="hl-var">$data</span><span class="hl-brackets">[</span><span class="hl-var">$i</span><span class="hl-brackets">]</span><span class="hl-brackets">[</span><span class="hl-number">1</span><span class="hl-brackets">]</span><span class="hl-code">,</span><span class="hl-var">$data</span><span class="hl-brackets">[</span><span class="hl-var">$i</span><span class="hl-brackets">]</span><span class="hl-brackets">[</span><span class="hl-number">2</span><span class="hl-brackets">]</span><span class="hl-code">,</span><span class="hl-var">$data</span><span class="hl-brackets">[</span><span class="hl-var">$i</span><span class="hl-brackets">]</span><span class="hl-brackets">[</span><span class="hl-number">3</span><span class="hl-brackets">]</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">[50%]</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-number">10</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-reserved">if</span><span class="hl-brackets">(</span><span class="hl-code"> </span><span class="hl-identifier">count</span><span class="hl-brackets">(</span><span class="hl-var">$data</span><span class="hl-brackets">[</span><span class="hl-var">$i</span><span class="hl-brackets">]</span><span class="hl-brackets">)</span><span class="hl-code">></span><span class="hl-number">4</span><span class="hl-code"> </span><span class="hl-brackets">)</span><span class="hl-code">
|
|
</span><span class="hl-var">$bar</span><span class="hl-code">-></span><span class="hl-identifier">title</span><span class="hl-code">-></span><span class="hl-identifier">SetFont</span><span class="hl-brackets">(</span><span class="hl-var">$data</span><span class="hl-brackets">[</span><span class="hl-var">$i</span><span class="hl-brackets">]</span><span class="hl-brackets">[</span><span class="hl-number">4</span><span class="hl-brackets">]</span><span class="hl-code">,</span><span class="hl-var">$data</span><span class="hl-brackets">[</span><span class="hl-var">$i</span><span class="hl-brackets">]</span><span class="hl-brackets">[</span><span class="hl-number">5</span><span class="hl-brackets">]</span><span class="hl-code">,</span><span class="hl-var">$data</span><span class="hl-brackets">[</span><span class="hl-var">$i</span><span class="hl-brackets">]</span><span class="hl-brackets">[</span><span class="hl-number">6</span><span class="hl-brackets">]</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$bar</span><span class="hl-code">-></span><span class="hl-identifier">SetPattern</span><span class="hl-brackets">(</span><span class="hl-identifier">BAND_RDIAG</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">yellow</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$bar</span><span class="hl-code">-></span><span class="hl-identifier">SetFillColor</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">gray</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$bar</span><span class="hl-code">-></span><span class="hl-identifier">progress</span><span class="hl-code">-></span><span class="hl-identifier">Set</span><span class="hl-brackets">(</span><span class="hl-number">0</span><span class="hl-number">.5</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$bar</span><span class="hl-code">-></span><span class="hl-identifier">progress</span><span class="hl-code">-></span><span class="hl-identifier">SetPattern</span><span class="hl-brackets">(</span><span class="hl-identifier">GANTT_SOLID</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">darkgreen</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$bar</span><span class="hl-code">-></span><span class="hl-identifier">title</span><span class="hl-code">-></span><span class="hl-identifier">SetCSIMTarget</span><span class="hl-brackets">(</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">#1</span><span class="hl-quotes">'</span><span class="hl-code">.</span><span class="hl-var">$i</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">#2</span><span class="hl-quotes">'</span><span class="hl-code">.</span><span class="hl-var">$i</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">#3</span><span class="hl-quotes">'</span><span class="hl-code">.</span><span class="hl-var">$i</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">#4</span><span class="hl-quotes">'</span><span class="hl-code">.</span><span class="hl-var">$i</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">#5</span><span class="hl-quotes">'</span><span class="hl-code">.</span><span class="hl-var">$i</span><span class="hl-brackets">)</span><span class="hl-code">,</span><span class="hl-reserved">array</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">11</span><span class="hl-quotes">'</span><span class="hl-code">.</span><span class="hl-var">$i</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">22</span><span class="hl-quotes">'</span><span class="hl-code">.</span><span class="hl-var">$i</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">33</span><span class="hl-quotes">'</span><span class="hl-code">.</span><span class="hl-var">$i</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">Add</span><span class="hl-brackets">(</span><span class="hl-var">$bar</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
</span><span class="hl-brackets">}</span><span class="hl-code">
|
|
|
|
</span><span class="hl-comment">//</span><span class="hl-comment"> Output the chart</span><span class="hl-comment"></span><span class="hl-code">
|
|
</span><span class="hl-var">$graph</span><span class="hl-code">-></span><span class="hl-identifier">Stroke</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
|
|
|
|
</span><span class="hl-inlinetags">?></span></pre></td></tr></table></div>
|