Skip to content

Commit f47a531

Browse files
MrMeisonignatvilesov
authored andcommitted
Fix calculate start date of tasks (#17)
* Fix calculate start date of tasks * Remove breakpoints * Add changelog, up version to 1.0.1
1 parent e33c68c commit f47a531

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## 1.0.1
2+
* Fixed start date calculation

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "powerbi-visuals-gantt",
3-
"version": "0.5.2",
3+
"version": "1.0.1",
44
"description": "A Gantt chart is a type of bar chart which illustrates a project timeline or schedule. The Gantt Chart visual shows the Tasks, Start Dates, Durations, % Complete, and Resources for a project. The Gantt Chart visual can be used to show current schedule status using percent-complete shadings and a vertical \"TODAY\" line. The Legend may be used to group or filter tasks based upon data values.",
55
"repository": {
66
"type": "git",

pbiviz.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"displayName": "Gantt",
55
"guid": "Gantt1448688115699",
66
"visualClassName": "Gantt",
7-
"version": "0.5.2",
7+
"version": "1.0.1",
88
"description": "A Gantt chart is a type of bar chart which illustrates a project timeline or schedule. The Gantt Chart visual shows the Tasks, Start Dates, Durations, % Complete, and Resources for a project. The Gantt Chart visual can be used to show current schedule status using percent-complete shadings and a vertical \"TODAY\" line. The Legend may be used to group or filter tasks based upon data values.",
99
"supportUrl": "http://community.powerbi.com",
1010
"gitHubUrl": "https://github.com/Microsoft/powerbi-visuals-gantt"

src/gantt.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ module powerbi.extensibility.visual {
738738
if (tasks.length < Gantt.MinTasks) {
739739
return;
740740
}
741-
let startDate: Date = tasks[0].start;
741+
let startDate: Date = _.minBy(tasks, (t) => t.start).start;
742742
let endDate: Date = _.maxBy(tasks, (t) => t.end).end;
743743
let dateTypeMilliseconds: number = Gantt.getDateType(this.viewModel.settings.dateType.type);
744744
let ticks: number = Math.ceil(Math.round(endDate.valueOf() - startDate.valueOf()) / dateTypeMilliseconds);

0 commit comments

Comments
 (0)