diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-09-12 17:36:15 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-09-12 17:36:15 -0400 |
commit | 0e4e566aa434ea1adaa9e94259877df110fc21f6 (patch) | |
tree | 3b88d54ea57c45de9c95e92267b67189999676a7 /assets/js/src | |
parent | 58199b6b293b4426157b058b1fe93dff6cf2967b (diff) |
Gantt chart: change bar color according to task progress (pull-request #1195)
Diffstat (limited to 'assets/js/src')
-rw-r--r-- | assets/js/src/Gantt.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/assets/js/src/Gantt.js b/assets/js/src/Gantt.js index 44722814..380371d1 100644 --- a/assets/js/src/Gantt.js +++ b/assets/js/src/Gantt.js @@ -198,6 +198,19 @@ Gantt.prototype.addBlocks = function(slider, start) { block.data("record", this.data[i]); this.setBarColor(block, this.data[i]); + + block.append(jQuery("<div>", { + "css": { + "z-index": 0, + "position": "absolute", + "top": 0, + "bottom": 0, + "background-color": series.color.border, + "width": series.progress, + "opacity": 0.4 + } + })); + jQuery(rows[rowIdx]).append(block); rowIdx = rowIdx + 1; } |