Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Gantt chart grouping #588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 21, 2016
Merged

Conversation

andreasschmitz
Copy link

Added an option to group Gantt Charts tasks.
Also added an option to add Texts to tasks in the chart via a 'Description' key.

The tests all ran successfully and I added another one for the new options: test_gannt_groups_and_descriptions
Test Location: plotly/tests/test_core/test_tools/test_figure_factory.py

df = [
    dict(Task='Task A', Description='Task A - 1', Start='2008-10-05',
         Finish='2009-04-15', IndexCol = 'TA'),
    dict(Task="Task B", Description='Task B - 1', Start='2008-12-06',
         Finish='2009-03-15', IndexCol = 'TB'),
    dict(Task="Task C", Description='Task C - 1', Start='2008-09-07',
         Finish='2009-03-15', IndexCol = 'TC'),
    dict(Task="Task C", Description='Task C - 2', Start='2009-05-08',
         Finish='2009-04-15', IndexCol = 'TC'),
    dict(Task="Task A", Description='Task A - 2', Start='2009-04-20',
         Finish='2009-05-30', IndexCol = 'TA')
]
fig = FigureFactory.create_gantt(df, colors=dict(TA = 'rgb(220, 0, 0)',TB = 'rgb(170, 14, 200)',TC = (1, 0.9, 0.16)), show_colorbar=True, index_col='IndexCol', group_tasks=True)

Generates:

gantt-chart-grouping

Did I forget anything?

@jackparmer
Copy link
Contributor

Thanks @spextrow!
And thanks for the test!

@johentsch
Copy link

This is a great feature, thank you for implementing!
Is it done on purpose the the ordering of the tasks (top down) is the opposite of the Gantt charts' standard behaviour (botten up)? I tried to invert the data but apparently the tasks are automatically sorted starting on top. Is there a way to change that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants