MCPcopy Create free account
hub / github.com/plotly/plotly.py / gantt_dict

Function gantt_dict

plotly/figure_factory/_gantt.py:598–799  ·  view source on GitHub ↗

Refer to FigureFactory.create_gantt() for docstring

(
    chart,
    colors,
    title,
    index_col,
    show_colorbar,
    bar_width,
    showgrid_x,
    showgrid_y,
    height,
    width,
    tasks=None,
    task_names=None,
    data=None,
    group_tasks=False,
    show_hover_fill=True,
)

Source from the content-addressed store, hash-verified

596
597
598def gantt_dict(
599 chart,
600 colors,
601 title,
602 index_col,
603 show_colorbar,
604 bar_width,
605 showgrid_x,
606 showgrid_y,
607 height,
608 width,
609 tasks=None,
610 task_names=None,
611 data=None,
612 group_tasks=False,
613 show_hover_fill=True,
614):
615 """
616 Refer to FigureFactory.create_gantt() for docstring
617 """
618
619 if tasks is None:
620 tasks = []
621 if task_names is None:
622 task_names = []
623 if data is None:
624 data = []
625 showlegend = False
626
627 for index in range(len(chart)):
628 task = dict(
629 x0=chart[index]["Start"],
630 x1=chart[index]["Finish"],
631 name=chart[index]["Task"],
632 )
633 if "Description" in chart[index]:
634 task["description"] = chart[index]["Description"]
635 tasks.append(task)
636
637 # create a scatter trace for every task group
638 scatter_data_dict = dict()
639 # create scatter traces for the start- and endpoints
640 marker_data_dict = dict()
641
642 if show_hover_fill:
643 hoverinfo = "name"
644 else:
645 hoverinfo = "skip"
646
647 scatter_data_template = {
648 "x": [],
649 "y": [],
650 "mode": "none",
651 "fill": "toself",
652 "hoverinfo": hoverinfo,
653 "legendgroup": "",
654 }
655

Callers 1

create_ganttFunction · 0.85

Calls 2

_get_corner_pointsFunction · 0.85
sortMethod · 0.45

Tested by

no test coverage detected