-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
First PR for Gantt Charts - Adding Tests Very Soon #460
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
Conversation
Awesome! I'm not gonna have time to take a solid peek at this until later in the week. One quick comment though. It might be cool to have a label for the color scale (about the %task done). |
You mean like 'Portland' over top the colorscale bar? |
It's cool if others think this is a bad call, but I wonder if folks who don't know what a gantt chart is would understand what those colors mean immediately. |
We should just paste the full doc string on the side of the graph. |
Makes sense to me, I didn't get what the color bar was for either. Should we make the color bar and sequential colorscale a kwarg rather than the default? I think the default color meaning on Gantt charts is usually categorical with a qualitative color palette. I'm thinking of this one, for example, http://moderndata.plot.ly/gantt-charts-in-r-using-plotly/. Or the colors simply help the eye differentiate between different tasks. In either case, no need for a color bar. |
Okay. Will get cracking on this shortly. |
I just need to add dictionary compatibility so a user can assign a color to a value in the indexing column. |
Tests are working. I want to get a legend working in this Gantt chart as well. @theengineear do you have any ideas on how to do this? I tried appending some stuff to data to just display the legend, but it didn't work. |
tls.FigureFactory.create_gantt, df, | ||
colors=colors_dict_good) | ||
|
||
def test_gantt_all_args(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great test!
Can you show me a mock of what you're trying to achieve? It can be incredibly rough, or even just a text description. |
Hey @Kully - You could try using the https://plot.ly/python/reference/#scatter-visible Then you could get optional labels in the legend like "Task 1", "Task 2", that match the color of the Gantt rectangles. |
@etpinard or @mdtusz could you give us a pointer on this one?
It seems like we need to get shapes to show in the legend. (1) possible? (2) is there a workaround that you can think of? The |
I tried it out but didn't have any luck. The legend wasn't showing up but I may have been doing it wrong. |
I think it should be possible (as I got the colormap to be visible via an invisible trace). I think I might be missing something with my syntax |
df = [dict(Task='Job A', | ||
Start='2009-02-01', | ||
Finish='2009-08-30', | ||
Complete='a')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No big deal (not worth changing here), but if your just using dict
, it's typically more common to use the literal notation {}
.
Awesome! 💃 after you've added those tests! The other comments are non-blocking. |
Adding Tests Very Soon