Changeset 13740 for branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/d3-gantt-jobstatus.js
- Timestamp:
- 03/30/16 17:30:01 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/d3-gantt-jobstatus.js
r13733 r13740 3 3 * @version 2.1 4 4 5 * Rewritten for Hive Web Job Manager 5 * Rewritten for Hive Web Job Manager by Jonas 6 6 */ 7 7 … … 33 33 return d.startDate + d.taskName + d.endDate; 34 34 }; 35 35 //Locks graph to specific timezone 36 //3600000 = +1 hour 37 var timeCorrector = 3600000 * (+1); //Currently: + 1 38 36 39 var rectTransform = function (d) { 37 return "translate(" + x(d.startDate - 3600000) + "," + y(d.taskName) + ")";40 return "translate(" + x(d.startDate - timeCorrector) + "," + y(d.taskName) + ")"; 38 41 }; 39 42 … … 66 69 67 70 var initAxis = function () { 68 x = d3.time.scale().domain([timeDomainStart - 3600000, timeDomainEnd - 3600000]).range([0, width]).clamp(true);71 x = d3.time.scale().domain([timeDomainStart - timeCorrector, timeDomainEnd - timeCorrector]).range([0, width]).clamp(true); 69 72 y = d3.scale.ordinal().domain(taskTypes).rangeRoundBands([0, height - margin.top - margin.bottom], .1); 70 73 if (new Date(timeDomainStart).toDateString() != new Date(timeDomainEnd).toDateString()) { … … 126 129 .attr("height", function (d) { return y.rangeBand(); }) 127 130 .attr("width", function (d) { 128 return (x(d.endDate - 3600000) - x(d.startDate - 3600000));131 return (x(d.endDate - timeCorrector) - x(d.startDate - timeCorrector)); 129 132 }) 130 133 .on('mouseover', tip.show) … … 221 224 .attr("height", function (d) { return y.rangeBand(); }) 222 225 .attr("width", function (d) { 223 return (x(d.endDate - 3600000) - x(d.startDate - 3600000));226 return (x(d.endDate - timeCorrector) - x(d.startDate - timeCorrector)); 224 227 }); 225 228 … … 228 231 .attr("height", function (d) { return y.rangeBand(); }) 229 232 .attr("width", function (d) { 230 return (x(d.endDate - 3600000) - x(d.startDate - 3600000));233 return (x(d.endDate - timeCorrector) - x(d.startDate - timeCorrector)); 231 234 }); 232 235
Note: See TracChangeset
for help on using the changeset viewer.