а

Scheduler summarizing tasks in parent row on collapse


#1

I’m trying to summarize all the tasks in a parent row on collapse. I’m having trouble doing that and I’m having trouble setting up an example.

http://snippet.dhtmlx.com/c52cc8524

Do you have any examples of summarizing the child tasks in the parent?


#2

Hi @iabukhdair,

As I understand, you need the functionality from this sample:
https://docs.dhtmlx.com/scheduler/samples/06_timeline/17_timeline_cell_content.html

Details how to implement it please read in the documentation:
https://docs.dhtmlx.com/scheduler/timeline_view.html#customcontentincells


#3

Thanks Polina,

I’ve updated the snippet

http://snippet.dhtmlx.com/c52cc8524

but I still can’t get any tasks or summary labels to show.

Maybe I didn’t include the scripts correctly?


#4

The snippet you provided contains an outdated scheduler version.

Here is the link for the snippet with the same code as in the sample:
http://snippet.dhtmlx.com/c8f212fcd

You also can find this sample in your package to run it locally.


#5

Thank you! I will update the snippet and my question ASAP.


#6

I’ve updated the snippet

http://snippet.dhtmlx.com/c52cc8524

As you can see I have the bars summarized in the parent with the work hours label. Which is what I want, however I’m creating twice as many bars.

Would you recommend creating twice as many bars as per the example in the snippet? Or, should I create the HTML div like the label above?


#7

Hi,

I don’t completely understand why you need to create additional load-marker elements in this example https://snippet.dhtmlx.com/c52cc8524
Everything still looks the same if I remove the element after the line break:

    return "<div class='load-marker "+className+"'>"+
      events.length
      +"</div>"
    + "<br/>"
      + "<div class='load-marker "+className+"'>"+
      events.length
      +"</div>";

–>

    return "<div class='load-marker "+className+"'>"+
      events.length
      +"</div>";

https://snippet.dhtmlx.com/c52cc8524 – two labels per cell
vs
https://snippet.dhtmlx.com/68596eff0 – single label per cell
so far there are no changes that I can see.

If it looks different in your app, that may be caused by css differences between this demo and your app. Can you please share a screenshot that shows how it looks on your end?
Overall, I believe nothing bad should happen if you’ll have to add these extra elements. The performance impact should be minimal since it’s not that many elements and they don’t require any extra calculations.


#8

Overall, I believe nothing bad should happen if you’ll have to add these extra elements. The performance impact should be minimal since it’s not that many elements and they don’t require any extra calculations.

Thanks, that’s what I was looking for. I believe that was trying out some different labels and summary info, that’s why I had 2 of them in there. It’s not needed, you are correct. Thanks for the help!