angular-gantt icon indicating copy to clipboard operation
angular-gantt copied to clipboard

How to display task with no date?

Open shyamal890 opened this issue 8 years ago • 3 comments

If I set to and from parameter of task to null the chart displays the task automatically. How to not display a task with no start or end date? User can choose to select the duration by clicking on the row later.

shyamal890 avatar Jun 30 '17 16:06 shyamal890

@Toilal Would appreciate your input here

shyamal890 avatar Jul 08 '17 06:07 shyamal890

Currently, you have to define both to and from date on task model for task to be properly displayed.

I understand the need, but this use case is not implemented at the moment.

If you are want to contribute, you can open a Pull Request to add support of such partially defined task.

  • If a task with undefined to and/or from properties, it should be displayed with a particular CSS class applied (task-undefined).
  • If only one property is defined (to or from), they should be displayed at the expected position though (left or right position).
  • If value of to/from property is undefined, it's displayed to match the left/right border of the gantt chart, and a "?" icon is shown to the user (Same position as task truncation icon)
  • If both to/from properties are undefined, it should fill the chart view width.

Toilal avatar Jul 24 '17 11:07 Toilal

If value of to/from property is undefined, it's displayed to match the left/right border of the gantt chart, and a "?" icon is shown to the user (Same position as task truncation icon)

Does this also apply to the 1.3 branch? I'm working with a modified version of the demo, and if I delete the to property from a task to get the desired behavior (displaying the task until the very right of the gantt), I have to set "Out of range" to expand and then toggle "Magnet" at least once for this to work. And I can't see a ? icon anywhere (though I don't really need it).

After reloading the data, the tasks snaps back to being "short", until I repeat the steps.

This is what the enclosing element looks like: <div class="gantt-task gantt-task-milestone jtk-endpoint-anchor" ng-class="task.model.classes" ng-repeat="task in row.visibleTasks track by task.model.id" id="jsPlumb_2_7" style="left: 344.413px;">

But w/o the steps mentioned, it has a width of only 8.39...px (independent of scale and/or zoom level).

This is the enclosing element after the mentioned steps: <div class="gantt-task gantt-task-milestone jtk-endpoint-anchor" ng-class="task.model.classes" ng-repeat="task in row.visibleTasks track by task.model.id" id="jsPlumb_2_7" style="left: 344.413px; width: 2784px;">

As you can see, it now has a fixed width defined in the style attribute.

mpf82 avatar Oct 19 '17 06:10 mpf82